|
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Previously the backtest API instantiated a _NoAlpaca stub that returned an empty DataFrame for every fetch_daily_bars call, so the mention-driven engine had no price data to mark trades against and every backtest reported total_return=0 / trade_count=0. Replace with _AlpacaHistoricalFetcher which: - Uses StockHistoricalDataClient (alpaca-py) with Day timeframe - Reads creds from TRADING_ALPACA_API_KEY/SECRET_KEY env vars (already injected via trading-bot-secrets ESO) - DataFeed.IEX (free tier — same as services/market_data uses) - Lazy-instantiates the SDK clients on first use to avoid import cost in the api-gateway hot path - Returns indexed DataFrame matching KevinPriceLoader's expected shape ([open, high, low, close, volume], timestamp index) - Returns empty DataFrame on Alpaca failure (loader has its own cache-miss fallback that no-ops gracefully) is_asset_tradable also wired to the real Alpaca TradingClient so the backtest doesn't trade non-tradable tickers. |
||
|---|---|---|
| .. | ||
| api_gateway | ||
| kevin_signal_bridge | ||
| learning_engine | ||
| market_data | ||
| meet_kevin_watcher | ||
| news_fetcher | ||
| sentiment_analyzer | ||
| signal_generator | ||
| trade_executor | ||
| __init__.py | ||