Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Option Trading Analyzer (prototype)

Overview

  • Minimal prototype: FastAPI backend + simple static frontend to call analysis endpoint.

Run backend (Windows PowerShell):

python -m venv venv
venv\Scripts\Activate.ps1
pip install -r backend/requirements.txt
uvicorn app.main:app --reload --port 8000 --app-dir backend

Open the frontend by opening frontend/index.html in a browser and click "Run Analysis". The front-end will call http://localhost:8000/analyze.

Next steps you can ask me to do:

  • Integrate real market data (Webull/Robinhood connectors) or a market data provider.
  • Improve the analysis engine (add ATR, MACD, IV rank handling).
  • Build a React UI with charts and options chain table.
  • Add authentication and brokerage order routing.

Launch-ready React app

  • The launchable frontend is now in frontend/app/.
  • Copy frontend/app/.env.example to frontend/app/.env if you want to change the backend URL.

Run the full app:

python -m venv venv
venv\Scripts\Activate.ps1
pip install -r backend/requirements.txt
cd frontend/app
npm install
npm run dev
  • Backend runs on http://localhost:8000
  • Frontend runs on http://localhost:5173
  • The app fetches /provider-data and /analyze, then renders the dashboard, chart, trade ticket, and options chain.

Free hosting plan

Use only free tiers:

  • Frontend: GitHub Pages via .github/workflows/deploy-frontend.yml
  • Backend: Render free web service via render.yaml

How to test online without spending money:

  1. Push the repo to GitHub.
  2. Enable GitHub Pages in repo settings after the workflow runs.
  3. Deploy the backend on Render using render.yaml.
  4. Set the frontend secret VITE_API_URL to your Render backend URL, for example https://your-app.onrender.com.

If you skip step 4, the frontend still opens in demo mode using fallback data, so you can test the UI for free even before the backend is live.

Windows launch script

  • Run start-all.ps1 from the repo root to start both backend and frontend in separate PowerShell windows.
  • Run backend/run.ps1 if you only want the API.

One-command launch

.\start-all.ps1

Integration: connectors and mock provider

  1. Configuration
  • Copy backend/.env.example to backend/.env and populate credentials for Webull or Robinhood if you plan to use them. Set DATA_PROVIDER to mock, webull, or robinhood.
  1. Connector templates
  • Connector templates are in backend/app/connectors/:
    • market_provider.py — abstract interface
    • mock_provider.py — in-repo mock provider returning sample candles/options/news
    • webull_connector.py — template to implement Webull API calls (requires adding auth logic)
    • robinhood_connector.py — template to implement Robinhood API calls
  1. Using the mock provider (quick start)
  • The backend already works with the mock provider. It returns realistic-looking sample candles and an options chain so you can develop UI and the analysis engine without API keys.
  1. Next steps to enable real providers
  • Obtain API access or credentials for the broker/data vendor (Webull/Robinhood or a market-data provider).
  • Implement authentication flows (token exchange, refresh) and the request wrappers in the corresponding connector file.
  • Normalize provider responses to the input schema expected by analyze (see backend/app/schemas.py).
  • For safety, never commit credentials to the repo; use environment variables or a secrets manager.

If you want, I can implement the full Webull or Robinhood integration (I will need the API spec or your permission to use credentials locally). Alternatively I can wire a public market-data provider (IEX, Polygon, Tradier) — tell me which one you prefer.

Quick test pages

  • A mock provider test UI is available at frontend/mock_test.html. It calls /provider-data to fetch normalized mock data.
  • Example sample input and response are under backend/mock_data/.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages