Backend falls back to fetched_at when published_at is NULL in the database,
so the API always returns a meaningful date. Frontend also handles null
defensively to avoid new Date(null) producing Unix epoch 0.
Create nginx-k8s.conf that proxies to localhost:8000 instead of
api-gateway:8000 for K8s pods where both containers share a network
namespace. Update Dockerfile.dashboard to accept a NGINX_CONF build arg
(defaults to docker/nginx.conf for docker-compose compatibility).
- Change BacktestRequest from strategy_weights dict to strategies list to match frontend
- Add tickers field so users can select which stocks to backtest
- Fetch historical bars from Alpaca StockHistoricalDataClient instead of empty data loader
- Register all 9 strategies (momentum, mean_reversion, news_driven, value, macd_crossover,
bollinger_breakout, vwap, liquidity, ma_stack) filtered by user selection
- Fix response format: use frontend field names (max_drawdown, total_trades, win_rate as
0-1 decimal), include equity_curve and run_id in response
- Add ticker selector with checkboxes and custom ticker input to dashboard
- Add alpaca-py to api dependency group in pyproject.toml
8 tasks covering: MarketSnapshot schema changes, indicator computations,
fundamental data providers, DB caching, 6 new strategies, signal generator
wiring, and deployment steps.
6 new strategies (Value, MACD Crossover, Bollinger Breakout, VWAP,
Liquidity, MA Stack) plus fundamental data pipeline with 3 providers
(Alpha Vantage, FMP, Yahoo Finance) and DB-backed caching.
ArticleSentiment referenced db_article.id before the Article was flushed,
causing a NotNullViolationError on the article_id column. Adding an explicit
flush after session.add(db_article) ensures the UUID is populated before
creating the foreign key reference.
- 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
- Add pytz to trading extras (alpaca-py requires it but doesn't declare it)
- Remove host port mapping from ollama container to avoid conflict with
local ollama instance
Wire the trading bot to real Alpaca market data and persist pipeline
state to the database so the dashboard displays live information.
- Add market-data service fetching OHLCV bars from Alpaca, publishing
to market:bars Redis Stream; signal generator consumes bars and
injects current_price into signals for position sizing
- Sentiment analyzer now persists Article + ArticleSentiment rows to
DB after scoring, with duplicate and error handling
- API gateway runs a background portfolio sync task that snapshots
Alpaca account state into PortfolioSnapshot/Position DB tables
during market hours
- TradeSignal carries a signal_id UUID; signal generator and trade
executor both persist their records to DB with cross-references
- 303 unit tests pass (57 new tests added)
I1: Add graceful shutdown (SIGTERM/SIGINT) to all 5 background services
I2: Fix Dockerfile healthcheck to use curl on /metrics endpoint
I3: Fix StreamConsumer.ensure_group() to only catch BUSYGROUP errors
I4: Fix SimulatedBroker to reject orders with insufficient cash/shares
I5: Move ORM attribute access inside DB session context in trades routes
I6: Add Redis-based rate limiting (10 req/min/IP) on all auth endpoints
I8: Prevent backtest background task garbage collection
I9: Use Numeric(16,6) instead of Float for financial columns in migration
I10: Add index on trades.created_at for time-range queries
I11: Bind infrastructure ports to 127.0.0.1 in docker-compose
I12: Add migrations init service; all app services depend on it
I13: Fix user enumeration in login_begin (return options for non-existent users)
C1: Fix BacktestDataLoader constructor args (was passing wrong kwargs)
C2: Fix BacktestResult attribute names (max_drawdown_pct, avg_hold_duration)
C3: Remove insecure JWT secret default (now required via env var)
C4: Fix .env.example to use TRADING_ prefix for all config vars
C5: Add missing fields to portfolio endpoint (daily_pnl_pct, total_pnl, trading_active)
C6: Add missing /portfolio/metrics endpoint
C7: Add 'value' field to equity curve response for frontend compatibility
C8: Add 6M/ALL periods and case-insensitive period enum parsing
Also: make app creation lazy to avoid config validation at import time
Add integration tests for the news pipeline (test_news_pipeline.py) and
trading flow (test_trading_flow.py) using real Redis with mocked FinBERT
and Alpaca. Add seed_strategies.py to insert default strategies (momentum,
mean_reversion, news_driven) with equal weights. Add smoke_test.sh for
end-to-end stack validation. Update pyproject.toml with integration marker
and scripts package discovery.
Add Layout with sidebar navigation and top bar (portfolio value, trading
status indicator). Implement Portfolio page with equity curve (TradingView
lightweight-charts), positions table, and metrics row. Add TradeLog with
filters, pagination, and expandable row details. Add Strategies page with
weight allocation pie chart and weight history line chart (Recharts). Add
NewsFeed with sentiment badges and ticker filtering. Add Backtest page
with config form, run submission, and results panel. Include WebSocket
hook for real-time cache invalidation and portfolio query hooks.
Scaffold Vite + React + TypeScript project with Tailwind CSS dark theme.
Add Axios API client with JWT interceptor and auto-refresh, WebAuthn
passkey auth flow (register/login), protected route wrapper, and React
Router with public and protected routes.
- pyproject.toml with core deps and optional dep groups per service
- shared/config.py: Pydantic BaseSettings with TRADING_ env prefix
- shared/redis_streams.py: StreamPublisher/StreamConsumer wrappers
- shared/telemetry.py: OpenTelemetry + Prometheus metric export
- tests for Redis Streams helpers (5 passing)