Reference
Environment setup
Local environment variables, credentials, and package extras for hosted AlphaLens workflows.
AlphaLens Core docs
Keep secrets in your shell, .env, or .env.local. alphalens-core loads local env files automatically.
AlphaLens
bash
ALPHALENS_API_KEY=alens_...Create this in Dashboard → Settings → API Keys.
Use the key to:
- Mint authenticated cloud sessions.
- Sync backtest data.
- Access AlphaLens-hosted market data endpoints.
- Emit live deployment telemetry.
Alpaca
bash
ALPACA_API_KEY=...
ALPACA_SECRET_KEY=...
ALPACA_PAPER=trueThe live runner defaults to paper trading from the CLI. Use --live only when you want live Alpaca routing.
Package extras
| Extra | Use |
|---|---|
live | Alpaca live runner and market data polling dependencies |
cloud | Supabase sync client |
fast | Faster parquet-backed cache when pyarrow is available |
viz | Local report/dashboard dependencies |
polygon | Direct Polygon data source outside the hosted AlphaLens path |
Recommended hosted install:
bash
pip install "alphalens-core[live,cloud,fast]"Local files
Common runtime paths:
| Path | Use |
|---|---|
.alphalens/cache | Local OHLCV cache |
.alphalens/live/<strategy>.json | Live runner checkpoint |
~/.alphalens/supabase_session.json | Cached AlphaLens session from alphalens connect |