Skip to content
Tech/SQLite Storage

SQLite Storage

Lightweight local storage for market data, forecasts, and trade history

Database Architecture

Multiple SQLite databases handle different data domains with separation for independent backup, migration, and performance tuning. SQLite was chosen for zero-config deployment, ACID compliance, and excellent single-writer performance that matches the sequential data collection pattern.

Market Price Storage

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.

Raw price data per bracket per timestamp
Normalized prices adjusted to sum to 1.0
Indexed by station and date for fast lookups
Continuous snapshots across all stations

Forecasts and Trade History

The forecast storage keeps every model prediction with input features for reproducibility and analysis. The trade log records 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.

Forecast records: station, date, predicted mean, predicted std
Trade records: station, bracket, side, price, size, P&L, resolution
Paper trades and live trades tracked with a mode flag
Full audit trail for every decision the system makes
Tech Stack · NOX Weather Alpha Engine — How the Trading Bot Works