Skip to main content

Module types

Module types 

Source
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§

CapitalUtilization
Represents the allocation and utilization of capital within a trading strategy.
DrawdownAnalysis
Represents a comprehensive analysis of drawdown periods within a financial time series.
DrawdownEvent
Represents a single drawdown event in a time series, typically of asset prices or portfolio values.
TimeSeriesData
Represents time-series data for tracking various portfolio metrics over time.
TradeRecord
Represents a detailed record of an individual trade, capturing all relevant information from entry to exit.
TradeStatistics
Represents detailed statistical information aggregated from a collection of individual trades.
VolatilityData
Represents volatility surface information captured during a backtest.

Enums§

ExitReason
Represents the reason why a trading position was closed or exited.