The v2 prompt produces expected_move for every ticker mention. This
commit makes KevinStrategy.evaluate_mention USE it as a hard signal
rather than just a display field.
Three new rules, all guarded by KevinStrategyConfig knobs so the
behaviour can be turned off if it over-filters:
1) SELL + non-bearish expected_move => NO_OP (require_forward_for_
bearish, default True). This is THE anti-capitulation rule —
Kevin saying "I sold" without articulating where the stock goes
next becomes NO_OP. Reactive sells stop translating into
trades.
2) AVOID + bullish expected_move => NO_OP (don't close, don't
blocklist). Same idea — if the LLM's forward call contradicts the
avoid action, treat as inconsistent and skip.
3) BUY + bearish/sideways expected_move => NO_OP (schema veto).
Catches LLM inconsistency.
4) BUY + unknown expected_move => bump min_conviction floor by
unknown_conviction_bonus (default +0.05). Forces stronger
conviction when there's no forward direction.
Tests: 6 new (one per rule above), 22 regression — total 28 GREEN.
Backtest stub _mention factory now defaults expected_move from
action (buy/sell/avoid maps) so existing backtest scenarios stay
green; the test_backtest_sell_mid_position_closes_early case was
the only one that needed the fix.
Side note: strategy is backward-compatible. If a mention has no
expected_move attribute (e.g. v1 stub from older code), it defaults
to UNKNOWN and the legacy code paths still work — just with the
stricter conviction floor on buys.
Stateless: mention + account_state -> KevinDecision. Conviction-weighted
sizing, time_horizon-derived hold periods, hard per-ticker cap. The
bridge and the backtest mini-engine both call evaluate_mention so
behaviour cannot drift.
- Point Ollama to local instance via host.docker.internal, use gemma3 model
- Remove Docker Ollama service (using host's Ollama instead)
- Add company-name-to-ticker mapping (Apple→AAPL, Tesla→TSLA, etc.) for RSS articles
- Lower signal thresholds for faster feedback with paper trading:
- FinBERT confidence: 0.6→0.4, signal strength: 0.3→0.15
- News strategy: article_count 2→1, confidence 0.5→0.3, score ±0.3→±0.15
- Fix market data BarSet access bug (BarSet.__contains__ returns False incorrectly)
- Fix market data SIP feed error by switching to IEX feed for free Alpaca accounts
- Fix nginx proxy routing for /api/auth/* to api-gateway /auth/*
- Add seed_sample_data script
- Update tests for new thresholds and alpaca mock modules