Expand description
This module defines the core data structures needed to analyze trading performance, risk, and capital utilization for backtests or live trading systems.
It captures: Global trading statistics like number of trades, average returns, win/loss rates, and trade holding times. Full analysis of drawdown events, including severity, duration, and recovery tracking. Usage of capital and margin over time, including how efficiently capital is deployed. Time-series tracking for key metrics like equity curve, drawdowns, margin usage, and options Greeks exposure. Full trade-by-trade recording, storing all relevant information from entry to exit (including slippage, PnL, Greeks, exit reasons). Implied volatility data recorded during trades to analyze volatility conditions at trade times.
It is designed to be fully serializable (serde) for easy storage, reporting, or integration into larger analytics systems.
Structs§
- Capital
Utilization - Represents the allocation and utilization of capital within a trading strategy.
- Drawdown
Analysis - Represents a comprehensive analysis of drawdown periods within a financial time series.
- Drawdown
Event - Represents a single drawdown event in a time series, typically of asset prices or portfolio values.
- Time
Series Data - Represents time-series data for tracking various portfolio metrics over time.
- Trade
Record - Represents a detailed record of an individual trade, capturing all relevant information from entry to exit.
- Trade
Statistics - Represents detailed statistical information aggregated from a collection of individual trades.
- Volatility
Data - Represents volatility surface information captured during a backtest.
Enums§
- Exit
Reason - Represents the reason why a trading position was closed or exited.