contango.trading.metrics.calculate
contango.trading.metrics.calculate
calculate_metrics
calculate_metrics(data: ExecutionData) -> Metrics
Calculates readable metrics for backtest data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
ExecutionData
|
The backtest data to derive metrics from. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Metrics |
Metrics
|
A metrics object representing returns, drawdown, risks, and trade information about the strategy. |
Source code in src\contango\trading\metrics\calculate.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | |