Playbook & Deployment Guides
Everything you need to explore Options Desk, monetize Wheel Mode, and ship a production-ready deployment.
1. Keep option data current
Options Desk and Wheel Mode both rely on a fresh snapshot of call/put walls. Seed the cache locally, then let the GitHub Action or a cron job keep it warm.
- Run `python scripts/cache_options_levels.py --tickers TQQQ,SOFI,...` to seed local option walls.
- Schedule `scripts/cache_options_levels.py` (or the GitHub Action) every 30 minutes to keep `.cache/signals/technical_snapshots.json` fresh.
- If you deploy on a VPS, add a cron job (`*/5 * * * * git -C /path/to/app pull --ff-only`) so the web app always sees the updated cache.
2. Work the Wheel Mode scoring
Once the cache is live, Wheel Mode ranks strikes by premium-per-day, wall distance, delta, and flow so CSP/covered-call trades are obvious.
- Open /options and switch between the *Options Desk* and *Wheel Mode* tabs to see analytics and wheel scoring in one view.
- Wheel score blends premium-per-day, wall distance, delta, and signals like flow surge or roll warning—sort by score to find prime CSP/CC candidates.
- Download recommended strikes via the “Build wheel automation” link or copy premium/day thresholds into your own playbook.
3. Use the natural-language backtester
The parser supports wheel and regime phrasing out of the box. Provide an OpenAI key to run it in production or stick with the bundled staging key for demos.
- Run the Ollama app locally and set `OLLAMA_HOST` / `OLLAMA_MODEL` in `.env.local` - no PATH edits or CLI calls required.
- Describe strategies like "Buy TQQQ when SPY is > SPY's 200MA, otherwise hold GLD since 2010." Inspect the JSON, then click *Run backtest*.
- If the shortcut parser misses, the request automatically falls back to whichever LLM provider you configured.
4. Getting production-ready
Before onboarding paying customers, wire up auth, billing, automation deliverables, and monitoring.
Authentication & user store
- Decide on NextAuth + Supabase/Postgres (recommended) or your own JWT service.
- Implement `/api/auth/*` routes against the database and expose `subscriptionTier` on the AuthUser payload.
- Protect dashboards by wrapping sensitive routes in the auth provider and redirecting anonymous users to `/login`.
Billing with Stripe
- Create Stripe products for Desk, Automation, and Quant plans; record their price IDs in environment variables.
- Build checkout-session and customer-portal endpoints, then handle `checkout.session.completed` and `customer.subscription.updated` webhooks to set the user’s `subscriptionTier`.
- Update the pricing section on the homepage and lock premium dashboards to the correct tiers.
Automation deliverables
- Package the Schwab Flask executor with secure token storage and document the Windows automation steps.
- Expose REST/webhook endpoints for wheel signals and option walls if you advertise “REST access.”
- Ship sample scripts that call those endpoints or drop trades directly into Schwab.
Monitoring & deployment
- Add logging/alerts for the intraday GitHub Action so missed runs trigger notifications.
- Automate deployment (GitHub Actions, Render, Vercel, or a VPS script) to run `npm install`, `npm run build`, and restart the server after each push.
- Back up `.cache/signals` or migrate it to durable storage (S3/Redis) if multiple instances need shared access.