Skip to main content

Welcome to OptionStrat AI

OptionStrat AI is an advanced derivatives simulator that combines Black-Scholes-Merton pricing, AI-powered portfolio analysis, and real-time options data to help you build and analyze complex options strategies.
This quickstart guide will have you analyzing your first options strategy in under 5 minutes.

Prerequisites

Before you begin, make sure you have:
  • Python 3.8+ installed
  • Node.js 16+ and npm installed
  • An OpenAI API key (for AI insights feature)

Quick Setup

1

Clone the Repository

If you haven’t already, clone or download the OptionStrat AI source code to your local machine.
cd ~/workspace/source
2

Start the Backend Server

Navigate to the backend directory and launch the FastAPI server:
cd backend

# Create and activate virtual environment
python -m venv venv

# Windows
venv\Scripts\activate

# Linux/Mac
source venv/bin/activate

# Install dependencies
pip install -r requeriments.txt

# Start the server
uvicorn app.main:app --reload
The backend will start on http://127.0.0.1:8000
3

Configure Environment Variables

Create a .env file in the backend directory:
cp .env.example .env
Edit the .env file and add your OpenAI API key:
AI_PROVIDER=openai
OPENAI_API_KEY=your_openai_api_key_here
OPENAI_DEFAULT_CHAT_MODEL=gpt-4o
Without an OpenAI API key, the AI Insights feature will not work. However, all other features including option chains, heatmaps, and strategy recommendations will function normally.
4

Start the Frontend Client

Open a new terminal window and navigate to the frontend directory:
cd frontend

# Install dependencies
npm install

# Start the development server
npm run dev
The frontend will start on http://localhost:5173 (or another port shown in your terminal).
5

Access the Application

Open your browser and navigate to the URL shown in your terminal (typically http://localhost:5173).You should see the OptionStrat AI welcome screen with example tickers: AAPL, TSLA, NVDA, and SPY.

Your First Strategy

Now that OptionStrat AI is running, let’s build your first options strategy!
1

Load a Ticker

In the search box at the top right, type a ticker symbol (e.g., AAPL) and press Enter.The system will:
  • Fetch the current spot price from Yahoo Finance
  • Load all available expiration dates
  • Display the default option chain (closest expiration ≥7 days)
Popular tickers include AAPL, TSLA, NVDA, SPY, MSFT, AMZN, and META. You can also click the quick-select buttons for instant access.
2

Build a Covered Call

A covered call is a popular strategy where you own 100 shares and sell a call option.
  1. Add the stock position: In the Strategy Builder panel, click “+100 Acciones (Covered)”
  2. Sell a call: In the option chain, find a strike price above the current price (e.g., 5-10% OTM)
  3. Click the green BID price in the CALL column to sell the call
Your positions will appear in the “Opciones Activas” section.
3

View the Risk Profile

The Heatmap panel automatically updates to show your profit/loss across different scenarios:
  • X-axis: Underlying price changes (from -30% to +30%)
  • Y-axis: Days until expiration (time decay)
  • Colors:
    • Green = Profit
    • Red = Loss
    • Brighter colors = Higher magnitude
Use the sliders to simulate:
  • Volatility Shock: Impact of IV changes (Vega risk)
  • Days Forward: Fast-forward to see theta decay
The heatmap updates in real-time as you add or remove positions. You can have multiple legs including stocks, calls, and puts for complex spreads like Iron Condors or Butterflies.
4

Get AI Analysis

Click “Analizar con IA” in the AI Insights panel to get:
  • Risk Score (1-10 scale)
  • Net Greeks summary (Delta, Gamma, Theta, Vega)
  • Quick Tips for portfolio adjustments
  • LLM Analysis with contextual market sentiment from FinViz news and insider trading data
The AI analyzes your complete portfolio and provides actionable insights based on:
  • Your net Greek exposures
  • Recent news sentiment (bullish/bearish/neutral)
  • Insider trading activity (C-suite buying/selling)
  • Analyst price targets
5

Explore Strategy Recommendations

Scroll down to the Strategy Recommender section to get AI-optimized strategies:
  1. Select your market bias: Bullish, Neutral, or Bearish
  2. Choose your risk profile:
    • Conservative (~85% probability of profit)
    • Balanced (~70% POP)
    • Aggressive (~50% POP, higher premium)
  3. Set your DTE range (Days to Expiration)
Click “Recomendar Estrategias” to get:
  • Bull Put Spreads (bullish/neutral)
  • Iron Condors (neutral, high-probability)
  • Credit Spreads (directional bets)
Each recommendation shows expected credit, max profit/loss, and probability metrics.
The recommender automatically filters out “zombie options” by requiring minimum volume (>10) and open interest (>50) for reliable execution.

API Verification

Want to verify the backend is working? Test the API endpoints:
# Health check
curl http://127.0.0.1:8000/

# Get available expirations for AAPL
curl http://127.0.0.1:8000/api/options/expirations/AAPL

# Get option chain for specific expiration
curl "http://127.0.0.1:8000/api/options/chain/AAPL?expiration=2026-12-18"
Expected response for health check:
{
  "status": "ok",
  "message": "OptionStrat Backend is running."
}

Next Steps

Installation Guide

Detailed setup instructions, troubleshooting, and system requirements

API Reference

Explore all available endpoints and their parameters

Strategy Builder

Learn how to build complex multi-leg strategies

AI Insights

Understand how the AI analyzes your portfolio risk

Common Use Cases

Building a Protective Put

  1. Click “+100 Acciones (Covered)” to add stock
  2. Click the red ASK price on a PUT below current price
  3. View the limited downside risk in the heatmap

Creating an Iron Condor

  1. Use the Strategy Recommender with “neutral” bias
  2. Click “Cargar al Simulador” on a recommended Iron Condor
  3. View the profit zone in the heatmap (profits when underlying stays in range)

Analyzing Theta Decay

  1. Build any credit spread (sell options)
  2. Move the “Days Forward” slider to see profit increase over time
  3. Check the “Net Theta” in AI Insights to see daily profit from time decay
Risk Disclaimer: OptionStrat AI is for educational and analytical purposes only. Options trading involves substantial risk of loss. Always paper trade and consult a licensed financial advisor before trading real capital.

Need Help?

Troubleshooting

Common issues and solutions

GitHub Issues

Report bugs or request features

Build docs developers (and LLMs) love