That’s the philosophy behind ThetaVault 2.0. It’s a professional-grade options trading journal I built from scratch in Rust, purpose-built for traders who follow the tastytrade methodology: sell premium, manage at 21 DTE, take 50% profits, keep undefined-risk under control.
Most traders track their trades in a broker dashboard or a spreadsheet. That’s fine when you have 5 positions. When you’re running 15–25 concurrent options positions across 8 tickers, managing rolls, tracking Greeks portfolio-wide, and trying to understand whether your entry criteria are actually working — you need something better.
ThetaVault 2.0 is open source. You can clone and run it yourself: https://github.com/leviceroy/ThetaVault
The Problem With Existing Tools #
Every options trader eventually hits the same wall.
Your broker dashboard shows you open P&L and Greeks, but nothing historical. It doesn’t tell you what your average ROC on iron condors was last quarter, whether you’re actually better when IV rank is above 50%, or how your win rate changes when you close at 21 DTE vs holding longer.
Spreadsheets help — but they require manual data entry, they break when you add multi-leg strategies, and the math is on you to get right. One wrong formula and your ROC calculations are silent garbage for months.
Web-based journals exist (OptionAlpha, Tradersync, etc.) but they’re subscription-based, slow, and don’t give you the raw data access serious analysis requires.
What I wanted was:
- Instant startup — no loading screens, no browser
- Single binary — works on any machine, no installation drama
- 100% correct math — typed language guarantees, not just hope
- tastytrade KPI alignment — the metrics that actually matter for premium selling
So I built it in Rust.
Why Rust for a Trading Journal? #
Rust is an unusual choice for a terminal app. Most people reach for Python or Go. Here’s why Rust made sense:
| Capability | Spreadsheet | Web App | ThetaVault (Rust) |
|---|---|---|---|
| Startup time | Instant | 3–10s | Instant |
| Formula safety | None | Varies | Compile-time guaranteed |
| Portability | File share | Browser | Single binary |
| Complex multi-leg math | Error-prone | Depends | Correct by type system |
| Offline operation | ✓ | ✗ | ✓ |
| Custom analytics | Manual | Limited | Fully custom |
The key advantage is type safety. When you define that a strike is f64 and a quantity is i32 and the compiler enforces every calculation that uses them, formula bugs don’t survive past build time. The Black-Scholes implementation, the Reg-T BPR calculations, the Kelly Criterion — they’re either right at compile time, or they don’t compile.
The single binary matters more than it sounds. Clone the repo, cargo build --release, and you have a 30 MB binary that runs on any macOS or Linux machine with zero dependencies. No Node.js. No Docker. No npm install nightmares.
16 Strategies, All the Math #
ThetaVault supports every major tastytrade strategy — and gets the math right for each one.
| Strategy | Code | Type | Notes |
|---|---|---|---|
| Short Put Vertical | SPV | Defined-risk | Width − credit = BPR |
| Short Call Vertical | SCV | Defined-risk | Width − credit = BPR |
| Long Put Vertical | LPV | Defined-risk | Debit spread |
| Long Call Vertical | LCV | Defined-risk | Debit spread |
| Iron Condor | IC | Defined-risk | max(put width, call width) − credit |
| Iron Butterfly | IB | Defined-risk | ATM strangle + wings |
| Put Broken Wing Butterfly | PBWB | Defined-risk | Special case: offset strikes |
| Cash Secured Put | CSP | Undefined-risk | Reg-T margin formula |
| Covered Call | CC | Undefined-risk | 50% of underlying × 100 |
| Strangle | STR | Undefined-risk | max(put margin, call margin) |
| Straddle | STD | Undefined-risk | ATM strangle |
| Calendar Spread | CAL | Time spread | Same strike, different expirations |
| Poor Man’s Covered Call | PMCC | Defined-risk CC | Deep ITM long + OTM short |
| Long Diagonal | LDS | Debit spread | Different strikes + expirations |
| Short Diagonal | SDS | Credit spread | Sell longer DTE, buy shorter |
| Custom / Ratio | — | Any | Manual leg entry |
Each strategy has a canonical leg template — the app knows which legs are “short” vs “long” and applies the correct BPR, max profit, max loss, and breakeven formulas automatically.
The PBWB (Put Broken Wing Butterfly) is the most complex. It requires three long put legs at different strikes plus the short leg, and the max profit/loss formula differs from a standard condor. Getting that wrong means your risk display is lying to you. ThetaVault’s PBWB implementation uses the correct offset formula and validates strike ladders — if the strikes are wrong, it flags the position in the journal rather than showing a false max profit number.
All tastytrade mechanics are baked in by default:
- 21 DTE management target per position
- 50% profit GTC target (customizable per trade)
- Undefined-risk allocation target (admin setting, default 75%)
- VIX-adaptive heat thresholds for position sizing
The Journal View #
The heart of ThetaVault is the trade journal — a 22-column table that gives you complete situational awareness on every open and closed position.
Every column is toggleable via a column picker (press v). You only show what you need.
| Column | What It Shows |
|---|---|
| Date | Trade entry date |
| Ticker | Symbol + [!] if playbook violation |
| Spot | Live price, colored green/red vs entry |
| ER | Earnings date countdown (RED if ≤4d) |
| Str | Strategy badge |
| Qty | Contract quantity |
| Credit | Net credit received |
| GTC | Good-till-cancel close target (e.g., $1.15DB) |
| BE | Breakeven(s) — both sides for IC/strangle |
| BPR | Buying power reduction |
| BPR% | BPR as % of account (traffic-light) |
| MaxPft | Max profit at entry |
| P&L | Realized P&L (open = “open”) |
| ROC% | Return on capital, ★ if 50% hit |
| $V/d | P&L per day held |
| DTE | Days to expiration (RED ≤14, YELLOW ≤21) |
| Exit | Exit date |
| Held | Days held |
| Status | OPEN / CLOSED / ROLLED / EXPIRD |
| OTM% | How far short strike is from current price |
| EM | Expected move: spot × IV × √(DTE/365) |
| Mgmt | Management trigger date (21 DTE target) |
The Mgmt column is something I haven’t seen in other journals. It computes the date by which you should be looking to manage or close the trade to stay on the 21 DTE schedule. It turns RED when that date has passed, YELLOW when you’re within 5 days.
Chain View #
Press G to toggle Chain View — a hierarchical grouping of all trades by ticker, showing roll chains together:
▼ SPY 3 open · 5 closed net P&L: +$2,847
├─ [IC] Feb 15 Rolls: 2 Credit: $4.85 Net P&L: +1,203 CLSD ✓
├─ [IC] Mar 01 Rolls: 1 Credit: $3.20 Net P&L: +847 CLSD ✓
└─ [STR] Mar 08 Rolls: 0 Credit: $6.40 Net P&L: — OPEN ●This is invaluable for understanding your total exposure in a campaign. If you’ve rolled a strangle three times, you want to see the cumulative P&L and commissions across the entire chain, not just the current leg.
Dashboard: Portfolio-Wide Intelligence #
The dashboard gives you a real-time overview of everything open.
Heat Card — the most important number in your account. It shows total BPR as a percentage of account size, with adaptive thresholds: when VIX is elevated, the “safe zone” threshold tightens automatically. Includes a Kelly fraction footer showing your optimal position size.
Greeks Card — portfolio-wide net theta, beta-weighted delta, and net vega. These numbers aggregate across all open positions and tell you: how much time decay are you collecting per day? How directionally biased is the book? How exposed are you to volatility changes?
POP Health — average probability of profit across all open positions. If any position is trading within 3% of its breakeven, it’s flagged in red. This is your “stress radar.”
Monthly Pace — if you’ve set a monthly P&L target in admin settings, this card shows your current month’s P&L and whether you’re on track.
Strategy Distribution — a visual bar showing the BPR breakdown by strategy type. At a glance: are you over-allocated to strangles? Underweighted in iron condors?
The Calculations Are Actually Correct #
I ran the entire calculation stack through a rigorous audit against tastytrade mechanics and academic finance formulas. The verdict: A+ accuracy.
Black-Scholes Greeks #
The Greek estimation uses the standard Black-Scholes model with the Abramowitz & Stegun approximation for the normal CDF:
$$d_1 = \frac{\ln(S/K) + (r + \sigma^2/2)t}{\sigma\sqrt{t}}$$$$d_2 = d_1 - \sigma\sqrt{t}$$$$\Delta_{call} = N(d_1), \quad \Delta_{put} = N(d_1) - 1$$$$\Theta = \frac{-S \cdot n(d_1) \cdot \sigma}{2\sqrt{t}} \pm rKe^{-rt}N(\pm d_2)$$The sign convention on theta is tastytrade-aligned: positive theta means you’re the premium seller collecting time decay. This is the opposite of academic convention, but it’s how tastytrade displays Greeks — and it’s the convention that makes intuitive sense for a credit-seller’s journal.
Buying Power Reduction #
BPR is computed using Reg-T margin rules per strategy type:
| Strategy | BPR Formula |
|---|---|
| Vertical / IC / IB | (max_width − credit) × 100 × qty |
| Cash Secured Put | max(20% × S − OTM + prem, 10% × S + prem) × 100 × qty |
| Strangle | max(put_leg_margin, call_leg_margin) × 100 × qty |
| Covered Call | 50% × underlying × 100 × qty |
Probability of Profit #
$$POP_{put} = N(d_2) \times 100$$$$POP_{IC} = N(d_{2,put}) + N(-d_{2,call}) - 1$$Kelly Criterion #
$$K = win\_rate - \frac{1 - win\_rate}{avg\_RR}$$Capped at 25% to prevent ruin. Negative Kelly (negative edge) is shown in red — “reduce size.”
All formulas are implemented in a single src/calculations.rs file. Every calculation is pure Rust — no floating-point surprises, no silent NaN propagation.
Performance Analytics: 14 Sections #
The Performance tab gives you a full post-trade analysis engine. 14 collapsible sections, toggled individually with keys 1–0.
| Section | What You Learn |
|---|---|
| Health | Win rate, scratch rate, avg win/loss, profit factor |
| Returns | Avg ROC, Sharpe ≥1.0, Sortino ≥1.5, Calmar ≥1.0, avg credit/DTE |
| Advanced | Expected value, Kelly fraction, premium recapture % |
| Growth | Account balance history, drawdown curve |
| Strategy | Win rate, avg P&L, avg ROC broken down by strategy |
| Ticker | Win rate, avg ROC, avg IVR, avg entry DTE per ticker |
| Monthly | P&L calendar, monthly win rate sparklines |
| IVR | Win rate bucketed by IV Rank at entry (<25%, 25-50%, 50-75%, 75%+) |
| VIX | Performance by VIX regime: Calm / Normal / Elevated / High / Stress |
| DTE | Win rate and avg ROC by DTE bucket at entry and close |
| IVR Entry Histogram | Distribution of your IVR entries — are you entering at the right time? |
| P&L Distribution | How wins and losses are distributed (bell curve shape) |
| Held Duration | Distribution of how long positions were held |
| Commissions | Total commissions, avg per trade, % impact on gross P&L |
The IVR and VIX sections are what tell you whether your entry timing is actually working. If your win rate in the 25-50% IVR bucket is 71% but drops to 52% in the <25% bucket — that’s the data you need to tighten your entry rules.
Playbook Compliance System #
This is the feature that separates ThetaVault from every spreadsheet approach.
You define a trading playbook — a set of entry criteria for a specific strategy:
- Min/Max IV Rank range (e.g., “only enter when IVR > 40”)
- Min Probability of Profit (e.g., “POP must be ≥ 68%”)
- Max Delta at entry (e.g., “delta ≤ 0.16”)
- DTE range (e.g., “30–45 DTE only”)
- Max BPR % of account
- Target profit %, stop loss %, management DTE
When you log a trade, ThetaVault automatically matches it to the best-fitting playbook. If exactly one playbook matches, it auto-assigns. If the trade violates any criterion, a [!] flag appears in the journal next to the ticker.
The [!] flag isn’t a hard block — you can still log the trade. It’s a reminder that you’re operating outside your own rules. The performance section then lets you compare: matched vs unmatched win rates. If your win rate is 72% when you follow the playbook and 51% when you don’t, that’s data you can’t ignore.
Getting Started #
ThetaVault requires Rust (the toolchain, not just the language). Install it once, then you’re set for all future builds.
1. Install Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh2. Clone and build:
git clone https://github.com/leviceroy/ThetaVault.git
cd ThetaVault
cargo build --release3. Run:
./target/release/theta-vault-rustThat’s it. The SQLite database (trades.db) is created automatically on first run. No setup wizard, no config files, no cloud account.
First steps inside the app:
- Press
Tabto navigate to Admin (Tab 5) and set your account size - Press
Tabto Playbook (Tab 3) and create your first strategy playbook - Press
Tabto Journal (Tab 2) and pressnto log your first trade - Press
Tabto Dashboard (Tab 1) to see your portfolio Greeks and heat
Conclusion #
ThetaVault 2.0 is what a serious options journal should be. Not a subscription SaaS, not a fragile spreadsheet — a fast, reliable, open-source tool that knows the tastytrade playbook as well as you do.
The math is right. The strategy coverage is complete. The analytics go deep enough to actually improve your trading.
If you’re a tastytrade-style premium seller who wants real data on whether your process is working, give it a shot. Star the repo if it’s useful — it’s how I know this work matters.
https://github.com/leviceroy/ThetaVault
Built with Rust, ratatui, and SQLite. Copyright © 2025 Chris Wenk.