Everything you need to run Day_Trader — locally, with Docker, or on a 24/7 cloud server.
| Path | Best For | Cost | Effort | Runs 24/7? |
|---|---|---|---|---|
| Local Python | Development, testing, quick start | Free | Easy | Only when laptop is on |
| Local Docker | Cleaner local setup, matches cloud deployment | Free | Easy | Only when laptop is on |
| Oracle Cloud VPS ⭐ | Production, set-and-forget, always running | Free | Medium | Yes — always on |
| DigitalOcean Droplet | Production, simpler setup than Oracle | ~$6/mo | Easy | Yes — always on |
Recommendation: Start with Local Python to verify your API keys work, then migrate to Oracle Cloud for 24/7 operation.
| Item | Where to Get It | Required? |
|---|---|---|
| Alpaca API Key + Secret | app.alpaca.markets → Paper Trading → API Keys | Required |
| Alpha Vantage Key | alphavantage.co — free tier | Recommended |
| NewsAPI Key | newsapi.org — free tier | Recommended |
| FRED API Key | fred.stlouisfed.org — free | Recommended |
| Anthropic API Key | console.anthropic.com | Optional (AI Advisor) |
The simplest way to get started. Requires Python 3.11+ installed on your machine.
# 1. Clone the repository git clone https://github.com/BoxOfllc/Day_Trader.git cd Day_Trader # 2. Install dependencies pip install -r requirements.txt # 3. Configure environment cp .env.example .env # Open .env in any text editor and fill in your API keys # 4. Run the scheduler (paper trading by default) python scheduler.py # 5. In a separate terminal, run the dashboard python override_server.py
Open http://localhost:8000 to access the dashboard.
Requires Docker Desktop installed. Runs both services automatically.
# 1. Clone the repository git clone https://github.com/BoxOfllc/Day_Trader.git cd Day_Trader # 2. Configure environment cp .env.example .env # Edit .env with your API keys # 3. Create data files (required for bind mounts) touch trading_journal.db mkdir -p reports logs # 4. Start everything docker compose up -d --build
Open http://localhost:8000 to access the dashboard.
# Useful commands docker compose logs -f # Watch live logs from both services docker compose ps # Check service status docker compose down # Stop everything docker compose up -d --build # Rebuild and restart after git pull
Runs 24/7 on a free Linux server. Never misses a market cycle. No laptop required.
Full step-by-step instructions: Oracle Cloud Free Tier Setup Guide — covers account creation, VM setup, networking, SSH, Docker deployment, and budget protection. ~30 minutes total.
Once set up, updating is one command:
cd ~/Day_Trader && git pull && sudo docker compose up -d --build
Same process as Oracle, but with a simpler UI and $6/month cost. Create a Basic Droplet with Ubuntu 22.04, then follow the same steps as the Oracle guide from "Connect via SSH" onward — the Linux setup is identical.
# Dry-run mode (test without placing orders) python scheduler.py --dry-run # View logs (Docker) docker compose logs -f # View logs (Local Python) # Logs write to ./logs/trader_YYYY-MM-DD.log # Backup the database cp trading_journal.db trading_journal_backup_$(date +%Y%m%d).db # Update to latest version (Docker) git pull && docker compose up -d --build # Update to latest version (Local Python) git pull && pip install -r requirements.txt # Stop (Docker) docker compose down # Stop (Local Python) # Press Ctrl+C in the terminal running scheduler.py
Do not switch ALPACA_PAPER_MODE to false until all of these are checked:
Day_Trader is a 7-agent autonomous trading swarm. Agents communicate via shared state (SQLite + in-memory). No trade executes without SENTINEL approval.
| Agent | File | Role |
|---|---|---|
| ORACLE | agents/oracle.py | Master orchestrator. Processes your commands. Coordinates all other agents. |
| RADAR | agents/radar.py | Intelligence gathering. News, sentiment, macro conditions, government contracts. |
| QUANT | agents/quant.py | Signal generation. Runs 8 technical indicators, scores signals 0–1. Includes 4-phase options strategy. |
| SENTINEL | agents/sentinel.py | Risk manager. Approves/rejects every trade. Kelly Criterion sizing, circuit breakers. |
| LEDGER | agents/ledger.py | Portfolio monitor. Tracks P&L, generates daily Commander's Report at 6:30 PM ET. |
| EXECUTOR | agents/executor.py | Trade execution via Alpaca (equities/options) and Coinbase (crypto). |
| RETROSPECTIVE | agents/retrospective.py | Weekly self-improvement. Analyses closed trades, flags anomalies, bounded auto-tunes. |
Day_Trader degrades gracefully — only Alpaca is required. All other sources are optional and enhance signal quality when available.
| Source | Key | Cost | Used for |
|---|---|---|---|
| Alpaca Markets | ALPACA_API_KEY + ALPACA_SECRET_KEY | Free | Order execution, account data, real-time quotes |
| Source | Key | Free Limit | Used for |
|---|---|---|---|
| Alpha Vantage | ALPHA_VANTAGE_KEY | 25 req/day | Technical indicators, intraday data |
| FRED | FRED_API_KEY | Unlimited | Macro indicators (VIX supplement, yield curve) |
| NewsAPI | NEWS_API_KEY | 100 req/day | News sentiment for watchlist tickers |
| Financial Modeling Prep | FMP_API_KEY | 250 req/day | Earnings calendar with EPS estimates |
| Source | Key | Cost | Used for |
|---|---|---|---|
| Anthropic | ANTHROPIC_API_KEY | Pay-per-token | AI Advisor chat in the dashboard |
| Coinbase Advanced | COINBASE_API_KEY | Trading fees | Crypto order execution (no sandbox — real money when paper=false) |
All settings live in your .env file. Copy .env.example to get started.
| Variable | Description | Required? |
|---|---|---|
| ALPACA_API_KEY | Alpaca broker API key | Yes |
| ALPACA_SECRET_KEY | Alpaca broker secret key | Yes |
| ALPACA_PAPER_MODE | true for paper trading (safe default) | Yes |
| OVERRIDE_API_KEY | Dashboard protection key — required for cloud. Generate: python -c "import secrets; print(secrets.token_urlsafe(32))" | Cloud only |
| ALPHA_VANTAGE_KEY | Alpha Vantage market data (free tier) | Recommended |
| FRED_API_KEY | Federal Reserve macro data (free) | Recommended |
| NEWS_API_KEY | News sentiment analysis (free tier, 100 req/day) | Recommended |
| ANTHROPIC_API_KEY | Enables the AI Advisor chat in the dashboard | Optional |
| ALERT_WEBHOOK | Discord or Slack webhook for circuit breaker alerts | Optional |
| COINBASE_API_KEY | Coinbase Advanced Trade (crypto). No sandbox — crypto orders are real when paper mode is false. | Optional |
| OVERRIDE_SERVER_PORT | Dashboard port (default 8000) | No |
| DB_PATH | SQLite database path (default ./trading_journal.db) | No |
| Deployment | URL |
|---|---|
| Local (any path) | http://localhost:8000 |
| Oracle / DigitalOcean | http://<your-server-ip>:8000 |
When OVERRIDE_API_KEY is set, the dashboard will prompt for the key on first load. It's stored in localStorage — you only enter it once per browser.