Skip to content

Commit db2e1f5

Browse files
michaelchuclaude
andcommitted
docs: update README for v0.1.0 release
- Add HMM regime filtering section and examples - Add covered call / stock-leg strategy mentions - Update signal count (40+ → 67) and strategy count (31 → 32) - Update pre-release notice - Add hmm_regime() to formula DSL examples Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 28cc311 commit db2e1f5

1 file changed

Lines changed: 22 additions & 10 deletions

File tree

README.md

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,17 @@
77
A high-performance options and stock backtesting engine exposed as an [MCP](https://modelcontextprotocol.io/) server. Connect it to Claude Desktop, Claude Code, or any MCP-compatible client and backtest strategies, optimize parameters, and analyze price patterns through natural language.
88

99
> [!NOTE]
10-
> This project is currently in a pre-release state. We are iterating quickly, which means breaking changes to the API and configuration may occur without prior notice. Use in production environments at your own risk.
10+
> This project is under active development. Breaking changes to the API and configuration may occur between minor versions. Pin to a specific release tag for stability.
1111
1212
## What You Can Do
1313

1414
### Backtest Options Strategies
1515

16-
Run event-driven simulations across 31 built-in options strategies — from simple singles to multi-leg iron condors, butterflies, calendars, and diagonals. Full position management with stop-loss, take-profit, max-hold exits, and 5 dynamic position sizing methods.
16+
Run event-driven simulations across 32 built-in options strategies — from simple singles to multi-leg iron condors, butterflies, calendars, diagonals, and stock-leg strategies (covered calls, protective puts). Full position management with stop-loss, take-profit, max-hold exits, and 5 dynamic position sizing methods.
1717

1818
```
1919
"Backtest an iron condor on SPY with $100k capital, 30-delta wings, and a 50% stop loss"
20+
"Run a covered call strategy on AAPL with a 30-delta short call"
2021
"Run a short put selling strategy with RSI < 30 as the entry filter"
2122
```
2223

@@ -47,6 +48,16 @@ Walk-forward analysis with rolling train/test windows and permutation testing fo
4748
"Is this backtest result statistically significant or just luck?"
4849
```
4950

51+
### Filter by Market Regime
52+
53+
Gate entries using Hidden Markov Model regime detection. Fit on historical data, classify forward in real-time (no look-ahead bias), and only trade in favorable regimes.
54+
55+
```
56+
"Only enter covered calls when SPY is in a bullish HMM regime"
57+
"Skip trades during bearish regimes: hmm_regime(3, 5) != bearish"
58+
"Combine regime with technicals: hmm_regime(2, 5) == bullish and rsi(close, 14) < 30"
59+
```
60+
5061
### Analyze Price Patterns
5162

5263
Discover seasonality and time-based patterns with aggregate statistics, distribution analysis, correlation matrices, rolling metrics, and regime detection.
@@ -59,7 +70,7 @@ Discover seasonality and time-based patterns with aggregate statistics, distribu
5970

6071
### Build Custom Signals
6172

62-
Create entry/exit signals with a formula DSL covering 35+ functions (momentum, trend, volatility, volume, derived stats). Save, rename, and reuse signals across sessions.
73+
Create entry/exit signals with a formula DSL covering 67 functions (momentum, trend, volatility, volume, regime, derived stats). Save, rename, and reuse signals across sessions.
6374

6475
```
6576
"Create a signal that fires when RSI < 30 and price is below the lower Bollinger Band"
@@ -71,7 +82,7 @@ Create entry/exit signals with a formula DSL covering 35+ functions (momentum, t
7182
| Tool | Description |
7283
|------|-------------|
7384
| `list_symbols` | Discover available symbols in the data cache |
74-
| `list_strategies` | Browse all 31 built-in options strategies with leg definitions |
85+
| `list_strategies` | Browse all 32 built-in options strategies with leg definitions |
7586
| `build_signal` | Create, validate, save, rename, search, and manage custom signals (CRUD + catalog) |
7687
| `run_options_backtest` | Full event-driven options simulation with trade log and metrics |
7788
| `run_stock_backtest` | Signal-driven stock/equity backtest on OHLCV data |
@@ -84,7 +95,7 @@ Create entry/exit signals with a formula DSL covering 35+ functions (momentum, t
8495
| `distribution` | Return distribution analysis with normality testing |
8596
| `correlate` | Cross-symbol or cross-metric correlation matrices |
8697
| `rolling_metric` | Rolling window calculations (Sharpe, volatility, returns, etc.) |
87-
| `regime_detect` | Market regime detection using volatility or returns clustering |
98+
| `regime_detect` | Market regime detection (volatility clustering, trend state, Gaussian HMM) |
8899
| `generate_hypotheses` | Auto-scan for statistically significant patterns with FDR correction |
89100
| `portfolio_backtest` | Run multiple stock strategies as a weighted portfolio |
90101
| `drawdown_analysis` | Full drawdown distribution with episode tracking and Ulcer Index |
@@ -133,9 +144,9 @@ To change the cache directory, set `DATA_ROOT` in the config:
133144

134145
## Key Capabilities
135146

136-
### 31 Options Strategies
147+
### 32 Options Strategies
137148

138-
Singles, verticals, straddles, strangles, butterflies, condors, iron condors/butterflies, calendars, and diagonals — with multi-expiration support for calendar and diagonal spreads.
149+
Singles, verticals, straddles, strangles, butterflies, condors, iron condors/butterflies, calendars, diagonals, and stock-leg strategies (covered call, protective put) — with multi-expiration support for calendar and diagonal spreads.
139150

140151
### 4 Slippage Models
141152

@@ -145,9 +156,9 @@ Mid, spread (bid/ask worst-case), liquidity-based (volume-scaled), and per-leg f
145156

146157
Fixed quantity, fixed fractional, risk per trade, Kelly criterion, and volatility targeting.
147158

148-
### 40+ Built-in Signals
159+
### 67 Built-in Signals
149160

150-
RSI, MACD, Stochastic, Bollinger Bands, Keltner Channels, Supertrend, Aroon, ATR, OBV, MFI, IV Rank/Percentile, and more — plus AND/OR/NOT combinators and cross-symbol signals (e.g., VIX as a filter for SPY trades).
161+
RSI, MACD, Stochastic, Bollinger Bands, Keltner Channels, Supertrend, Aroon, ATR, OBV, MFI, IV Rank/Percentile, HMM regime filter, and more — plus AND/OR/NOT combinators and cross-symbol signals (e.g., VIX as a filter for SPY trades).
151162

152163
### Formula DSL
153164

@@ -158,10 +169,11 @@ close > sma(close, 50) and rsi(close, 14) < 30
158169
macd_hist(close) > 0 and rel_volume(volume, 20) > 2.0
159170
consecutive_down(close) >= 3 and volume > sma(volume, 20) * 1.5
160171
iv_rank(iv, 252) > 50 and bbands_lower(close, 20) > close
172+
hmm_regime(3, 5) == bullish and rsi(close, 14) < 30
161173
day_of_week() == 1 and pct_change(close, 1) < -0.005
162174
```
163175

164-
Supports lookback (`close[1]`), date/time functions (`day_of_week()`, `month()`, `hour()`), conditionals (`if(cond, then, else)`), and 35+ rolling/statistical functions.
176+
Supports lookback (`close[1]`), date/time functions (`day_of_week()`, `month()`, `hour()`), conditionals (`if(cond, then, else)`), HMM regime gating (`hmm_regime()`), cross-symbol references (`VIX > 20`), and 67 rolling/statistical functions.
165177

166178
## Data
167179

0 commit comments

Comments
 (0)