| Ticker | Strike | Dir | Kalshi | Opt Prob | Opt Edge | Opt Signal | Hist Prob | Hist Edge | Hist Signal | Volume |
|---|
| Ticker | City | Date | Metric | Thresh | Dir | Kalshi | Model Prob | Source | Status | Edge | Conf | Signal |
|---|
| Date | Trades | Wins | Losses | Win Rate | P&L | Best | Worst | Avg Edge |
|---|
| Time | Ticker | Strike | Side | Entry | Exit | Qty | Edge | Signal | P&L | Status | Telegram Line |
|---|
The Big Picture
Think of this like a weather forecast, but for the stock market. We have a robot that:
- Gets data — pulls real-time prices from Kalshi (a prediction market) and other sources
- Runs the numbers — uses two different math models to predict what the S&P 500 will do
- Finds mispricings — looks for cases where our prediction differs from what the market thinks
- Logs trades — keeps track of "paper trades" (fake money, no real risk)
- Shows results — displays everything on a dashboard you can open in your browser
What Each Part Does
| Component | What It Does |
|---|---|
Kalshi API | Connects to the prediction market to get prices |
S&P 500 Screener | Scans through all the markets, runs the math, decides if there's a good trade |
Historical Model | Uses past stock movements to guess future volatility |
Options Model | Uses options prices (like side bets on stocks) to extract what the market expects |
Paper Trader | Keeps a log of what trades we'd make — like a video game save file |
Web Dashboard | The pretty interface you see at localhost:5050 |
The Idea
Imagine you've been watching how jumpy the stock market is for the past year. Some days it moves a lot, some days it's calm. This model asks: "Based on how volatile it's been recently, what's a reasonable guess for how much it could move today?"
How It Works (Plain English)
- Get past prices — Download the last ~2 years of daily S&P 500 closing prices
- Calculate volatility — Figure out how much the index typically moves each day (this is called "volatility")
- Weight recent data more — Recent movements matter more than old ones (last month is more relevant than last year)
- Scale for time — Adjust the prediction based on how much of the trading day is left (more time = more opportunity to move)
- Convert to probability — Use a math formula (Student-t distribution) that accounts for rare but extreme moves
Why This Matters
Volatility is basically "how scared should I be?" for stocks. When volatility is high, stocks can move a lot in either direction. When it's low, things are calmer. Our model uses this to estimate the probability of the S&P 500 hitting different price levels by the end of the day.
remaining_vol = daily_vol * sqrt(remaining_fraction)
Before market open, remaining_fraction = 1.0 (full daily vol). After close, probabilities collapse to 0 or 1.
Probability Computation
For each strike K with current price S, uses a Student-t distribution with df=5 for fat tails (assigns ~3x more probability to 3-sigma moves vs Normal):
z = ln(K / S) / remaining_vol P(close >= K) = 1 - T_5(z)