You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Release v2.3.0 — remove AI Chat UI from README, bump to stable
Phase out AI Chat UI references from README while keeping the code.
Update CI badge and star history URLs to goldspanlabs org.
Bump version from 2.3.0b5 to 2.3.0 stable release.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
An AI-powered research and backtesting tool for options strategies.
11
+
A nimble backtesting and statistics library for options strategies.
12
12
13
-
Optopsy combines a Python backtesting engine with an optional conversational AI interface that fetches data from online or local sources, runs strategies, and interprets results — so you can go from *"How do 45-DTE iron condors on SPX perform with a 50% profit target and 2x stop loss vs holding to expiration?"* to detailed performance statistics in seconds, not spreadsheets.
13
+
Optopsy is a Python backtesting engine that lets you go from *"How do 45-DTE iron condors on SPX perform with a 50% profit target and 2x stop loss vs holding to expiration?"* to detailed performance statistics in seconds, not spreadsheets.
An AI-powered chat interface that lets you fetch data, run backtests, and interpret results using natural language.
56
-
57
-

58
-
59
-
### Setup & Configuration
60
-
61
-
Install the beta pre-release with the `ui` extra:
62
-
63
-
```bash
64
-
pip install --pre optopsy[ui]
65
-
```
66
-
67
-
Configure your environment variables in a `.env` file at the project root (the app auto-loads it):
68
-
69
-
```env
70
-
ANTHROPIC_API_KEY=sk-ant-... # or OPENAI_API_KEY for OpenAI models
71
-
EODHD_API_KEY=your-key-here # enables live data downloads (optional)
72
-
OPTOPSY_MODEL=anthropic/claude-haiku-4-5-20251001 # override the default model (optional)
73
-
```
74
-
75
-
At minimum you need an LLM API key (`ANTHROPIC_API_KEY` or `OPENAI_API_KEY`). Set `EODHD_API_KEY` to enable downloading historical options data directly from [EODHD](https://eodhd.com/). The `OPTOPSY_MODEL` variable accepts any [LiteLLM model string](https://docs.litellm.ai/docs/providers) if you want to use a different model.
76
-
77
-
### Downloading Data
78
-
79
-
The recommended workflow is to download data first via the CLI, then use the chat agent to analyze it:
80
-
81
-
```bash
82
-
# Download historical options data (requires EODHD_API_KEY)
> **Note:** If developing with `uv`, prefix commands with `uv run` (e.g., `uv run optopsy-chat download SPY`).
89
-
90
-
Data is stored locally as Parquet files at `~/.optopsy/cache/`. Re-running the download command only fetches new data since your last download — it won't re-download what you already have. A Rich progress display shows download progress in the terminal.
91
-
92
-
Once downloaded, the chat agent can query this data instantly without needing to re-fetch. Stock price history (via yfinance) is also cached locally and fetched automatically when the agent needs it for charting or signal analysis — no manual download required.
93
-
94
-
### Cache Management
95
-
96
-
```bash
97
-
optopsy-chat cache size # show per-symbol disk usage
98
-
optopsy-chat cache clear # clear all cached data
99
-
optopsy-chat cache clear SPY # clear specific symbol
100
-
```
101
-
102
-
### Launching the Chat
103
-
104
-
```bash
105
-
optopsy-chat # launch (opens browser)
106
-
optopsy-chat run --port 9000 # custom port
107
-
optopsy-chat run --headless # don't open browser
108
-
optopsy-chat run --debug # enable debug logging
109
-
```
110
-
111
-
### What the Agent Can Do
112
-
113
-
-**Run any of the 38 strategies** — ask in plain English (e.g. *"Run iron condors on SPY with 30-45 DTE"*) and the agent picks the right function and parameters
114
-
-**Fetch live options data** — pull options chains from EODHD and cache them locally for fast repeat access
115
-
-**Fetch stock price history** — automatically download OHLCV data via yfinance for charting and signal analysis
116
-
-**Load & preview CSV data** — drag-and-drop a CSV into the chat or point to a file on disk; inspect shape, columns, date ranges, and sample rows
117
-
-**Scan & compare strategies** — run up to 50 strategy/parameter combinations in one call and get a ranked leaderboard
118
-
-**Suggest parameters** — analyze your dataset's DTE and OTM% distributions and recommend sensible starting ranges
119
-
-**Build entry/exit signals** — compose 80+ technical analysis signals (momentum, overlap, volatility, trend, volume, IV rank, calendar) with AND/OR logic
120
-
-**Simulate trades** — run chronological simulations with starting capital, position limits, and a full equity curve with metrics (win rate, profit factor, max drawdown, etc.)
121
-
-**Create interactive charts** — generate Plotly charts (line, bar, scatter, histogram, heatmap, candlestick with indicator overlays) from results, simulations, or raw data
122
-
-**Multi-dataset sessions** — load multiple symbols, run the same strategy across each, and compare side-by-side
123
-
-**Session memory** — the agent tracks all strategy runs and results so it can reference prior analysis without re-running
124
-
125
-
### Data Providers
126
-
127
-
EODHD is the built-in data provider for downloading historical options and stock data. The provider system is pluggable — you can build custom providers by subclassing `DataProvider` in `optopsy/data/providers/` to integrate your own data sources.
128
-
129
-
> **Note:** The download and cache commands are also available via the standalone `optopsy-data` CLI (`pip install optopsy[data]`) without the Chainlit dependency. See [Data Management](https://michaelchu.github.io/optopsy/data/) for details.
130
-
131
-
See the [Chat UI documentation](https://michaelchu.github.io/optopsy/chat-ui/) for more details.
132
-
133
49
## Data Management
134
50
135
-
Optopsy includes a standalone data CLI for downloading and caching historical market data — no chat UI or Chainlit required.
51
+
Optopsy includes a standalone data CLI for downloading and caching historical market data.
136
52
137
53
```bash
138
54
pip install optopsy[data]
@@ -234,13 +150,12 @@ The simulator works with all 38 strategies. It selects one trade per entry date,
-[Examples](https://michaelchu.github.io/optopsy/examples/) - Common use cases and recipes
239
154
-[API Reference](https://michaelchu.github.io/optopsy/api-reference/) - Complete function documentation
240
155
241
156
## Star History
242
157
243
-
[](https://app.repohistory.com/star-history)
158
+
[](https://app.repohistory.com/star-history)
0 commit comments