Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Options Desk

Interactive long call / long put profit calculator for planning option trades. Enter strike, spot, premium, contracts, and fees — see break-even, max loss, dollar/% P/L across a stock-price range, and scrub scenarios on the chart.

Screenshots

Options Desk — long call payoff, metrics, and scenario net profit

Options Desk — Black-Scholes pricing panel and theo value vs spot

Setup

With uv (recommended):

uv sync

Or with pip:

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install -e .

Run

uv run options-app

Or:

uv run streamlit run options_app/app.py

Open http://127.0.0.1:8501 only. The app binds to loopback (server.address = 127.0.0.1 in .streamlit/config.toml), so it is not reachable from other devices on your LAN.

Tests & lint

uv run pytest
uv run ruff check .
uv run black --check .

Features

v1 — Expiration payoff

  • Call / Put tabs with independent inputs
  • Total debit (premium × shares + fees), break-even, max loss / max profit
  • Net profit callout at the scenario stock price
  • DTE, moneyness, spot-vs-strike %, intrinsic / extrinsic
  • Interactive P/L chart with win/loss shading
  • Markers for strike, spot, break-even, and scenario (click chart to set scenario)
  • Toggle $ vs % return on the chart
  • Compare vs buying the underlying stock
  • CSV export of the payoff table

v1.1 — Black-Scholes

  • Pricing inputs: risk-free rate $r$, dividend yield $q$, volatility $\sigma$ (decimals)
  • Optional pricing panel: theo value, edge vs premium, Δ Γ Θ ν ρ
  • Theo value vs spot curve at fixed $T$ and $\sigma$

Docs

Math (expiration)

Long call P/L:

[ \text{PnL}(S) = \max(S-K,0)\cdot M - D \quad\text{break-even}=K+D/M ]

Long put P/L:

[ \text{PnL}(S) = \max(K-S,0)\cdot M - D \quad\text{break-even}=K-D/M ]

where (M = 100\times\text{contracts}) and (D = \text{premium}\cdot M + \text{fees}).

About

An interactive Python app for planning call and put option trades. Enter your strike price, current price, option cost, shares, and fees to instantly see profit/loss across a range of stock prices. Drag along the chart to find your break-even point and test "what if" scenarios before you trade.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages