Home/Projects/Kalsher
Prototype
Quantitative FinanceBacktestingOptionsData Engineering

Kalsher

Most retail options backtesting tools conflate strategy logic with execution assumptions, producing Sharpe ratios that don't survive contact with real fill prices. Kalsher separates signal generation, position sizing, execution modeling (with realistic bid/ask spread), and performance attribution into four distinct, independently testable modules — making it possible to actually measure where edge comes from, and where it disappears.

recruiter perspective

Built a quantitative trading system with rigorous, auditable architecture

  • ›Modular design separates signal logic from execution assumptions — enabling real A/B testing
  • ›Supports 8 option strategies, 5+ years of market data, regime-segmented performance analytics
  • ›Realistic fill modeling produces Sharpe ratios that survive contact with real spreads
See the system
Hiring Summary

Kalsher is a quantitative options backtesting system I built with a strict four-module architecture: signal generation, position sizing, execution modeling, and performance attribution. Each module implements a typed protocol, making them independently testable and swappable. It supports 8 option strategies, 5+ years of data from Polygon.io and CBOE, and produces regime-segmented performance analytics. The core insight it surfaces: most option-selling strategies have positive expected value only in specific VIX regimes — a result that aggregated metrics hide.

Each claim is paired with evidence that a recruiter can request or verify.

“Kalsher's strict module boundary (SignalEngine → SizingEngine → ExecutionEngine → AttributionEngine) allows swapping signal logic without touching execution or risk code.”
diagramFour-Module Architecture Diagram● coming soon✓
engineerquant
“Backtests on SPX 0DTE credit spreads show measurable edge degradation when execution timing is modeled with perfect fills vs. realistic bid/ask spread — a difference that naive tools ignore.”
benchmarkSPX 0DTE Backtest Results● local / internal✓
quant
“Regime tagging on every bar makes it measurable that most tested strategies have positive expected value only in low-VIX regimes — a result that aggregated metrics obscure.”
benchmarkSPX 0DTE Backtest Results● local / internal✓
quantengineer

Metrics marked with context indicate the measurement scope (local benchmark, prototype, qualitative estimate, etc.).

8
implemented
Option Strategies
Credit spreads, iron condors, calendars, straddles, ratio spreads, 0DTE scalps, covered calls, protective puts
5+
years
Historical Data
OHLCV + options chain via Polygon.io; CBOE volatility surface data
4
regimes
VIX Regimes Tracked
Low (<15), Medium (15-25), High (25-40), Crisis (>40) — every bar is tagged
Configurable
slippage model
Fill Model Realism
Bid/ask midpoint + fraction of spread; configurable per-strategy (local benchmark)

Existing options backtesting tools either assume perfect execution (making results untrustworthy) or provide no separation between signal logic and position management (making systematic improvement impossible). When a strategy underperforms, you can't tell whether the signal is bad, the sizing is wrong, or the execution assumptions are unrealistic. Kalsher was built to make this decomposition possible.

Challenges Addressed
  • Must model realistic bid/ask spread costs per strategy — perfect fills are not acceptable
  • Signal, sizing, execution, and attribution modules must be independently testable with mock inputs
  • Must support options chain data at both daily and intraday resolution
  • All state must be immutable between bars to prevent lookahead bias
△KalsherQUANTITATIVE FINANCE/visual-placeholder

Kalsher is built around four independent modules, each implementing a defined protocol interface. SignalEngine: receives a Bar (OHLCV + options chain + VIX), returns EntrySignal or ExitSignal with metadata. SizingEngine: receives a signal and PortfolioState (current Greeks exposure, margin used), returns PositionSize with risk limits. ExecutionEngine: receives a position target and bar data, returns FillPrice modeled as bid/ask midpoint + configurable spread fraction. AttributionEngine: runs post-hoc on the full trade log, decomposes P&L by signal type, market regime, and leg. Each module is a class with a typed protocol — swapping implementations requires no changes to other modules.

Stack
PythonPandasNumPyPolygon.ioCBOE DataPlotlyFastAPI
Decision
Strict four-module separation with protocol interfaces
Conflating signal and execution logic makes systematic improvement impossible. You can't A/B test signals when execution assumptions are baked in. Clean boundaries make each module independently testable and swappable.
Decision
VIX regime tagging on every backtest bar
Strategy P&L aggregated across all regimes is misleading. Most option-selling strategies have sharply different expected values in low vs. high volatility regimes. Regime tags make this measurable rather than assumed.
Decision
Immutable bar state between modules
Any module that can modify bar state creates subtle lookahead bias. Immutability enforces that each module only reads the data it was given, and that all side effects flow through the explicit return types.
Tradeoff
Execution realism vs. simulation speed
Chose: Realistic fill modeling with configurable slippage
Unrealistic fills (perfect midpoint execution) produce Sharpe ratios that don't survive live trading. The cost: simulation is slower because fill price must be computed per trade. Acceptable for strategy research; a fast-path is available for parameter sweeps.
Tradeoff
Attribution depth vs. attribution cost
Chose: Post-hoc attribution on the full trade log
Real-time attribution during simulation adds overhead and complexity. Running attribution post-hoc on the trade log allows richer decomposition (by regime, signal type, holding period, leg) without affecting simulation performance.
01Live paper trading mode via Interactive Brokers API — validate signals in real-time without capital risk
02ML-based signal generation: replace hand-coded signals with gradient-boosted models trained on regime-labeled data
03Multi-leg position management for complex structures (ratio spreads, broken wings)
04Walk-forward optimization with expanding window to detect signal decay over time