.env.example
Set these on your host before deploying. Each platform has an “Environment Variables” section in the deploy flow.
UID
User mapping to prevent permission issues in Docker Set these to your host user ID and group ID: UID=$(id -u) # Usually 1000 GID=$(id -g) #…
GID
EDGAR_IDENTITY
SEC EDGAR required for Ch04 NB02 (SEC filing explorer) and NB14 (text extraction). The SEC mandates a real User-Agent (your name + email)…
FRED_API_KEY
secret
FRED Federal Reserve Economic Data (free API key) Get key: https://fred.stlouisfed.org/docs/api/api_key.html
DATABENTO_API_KEY
secret
DataBento Futures and market data (paid) Get key: https://databento.com
OANDA_API_KEY
secret
Oanda Forex data (free tier available) Get key: https://www.oanda.com/
ALPACA_API_KEY
secret
Alpaca Equity and crypto trading (free tier available) Get key: https://alpaca.markets/
ALPACA_SECRET_KEY
secret
POLYGON_API_KEY
secret
Polygon Multi-asset market data (free tier available) Get key: https://polygon.io/
ANTHROPIC_API_KEY
secret
LLM providers for Ch. 24 Autonomous Agent demo (any one is enough; the client auto-selects Anthropic -> OpenAI -> Google -> OpenRouter ->…
OPENAI_API_KEY
secret
GOOGLE_API_KEY
secret
OPENROUTER_API_KEY
secret
OpenRouter: one key, any model. Optionally pin OPENROUTER_MODEL.
TAVILY_API_KEY
secret
Tavily Agentic web search for Ch. 24 Autonomous Agent demo
TABPFN_TOKEN
secret
TabPFN Ch. 12 (12_gradient_boosting/03_dl_vs_gbm). The tabpfn package requires a one-time license acceptance to download model weights for…
brew install flyctl && fly launch --from https://github.com/stefan-jansen/machine-learning-for-trading
curl -L https://fly.io/install.sh | sh && fly launch --from https://github.com/stefan-jansen/machine-learning-for-trading
iwr https://fly.io/install.ps1 -useb | iex; fly launch --from https://github.com/stefan-jansen/machine-learning-for-trading