SQLite Storage
Lightweight local storage for market data, forecasts, and trade history
Database Architecture
Three separate SQLite databases handle different data domains. This separation allows independent backup, migration, and performance tuning. SQLite was chosen for zero-config deployment, ACID compliance, and excellent single-writer performance that matches our sequential data collection pattern.
market_prices.db
Stores historical bracket prices from Polymarket with timestamps. Each snapshot captures all bracket prices for all 10 stations, enabling analysis of price movements, market efficiency, and optimal timing. The schema uses a composite key of (station, date, bracket, timestamp).
forecasts.db and trades.db
The forecast database stores every model prediction with input features for reproducibility and analysis. The trades database logs all paper and live trades with entry price, Kelly fraction, P&L, and resolution status. Together they enable backtesting, model drift detection, and performance attribution.