contango.trading.analysis.graphing.equity_curve_overlay
contango.trading.analysis.graphing.equity_curve_overlay
EquityCurveConfig
dataclass
EquityCurveConfig(target_metric: str, top_n: int, max_downsample_points: int = 1500)
Bases: GraphConfig
A graph configuration specific to the equity curve graph.
Attributes:
| Name | Type | Description |
|---|---|---|
target_metric |
str
|
The name for the targeted metric to graph. |
top_n |
int
|
The top amount of values to keep for the graph. |
max_downsample_points |
int
|
The maximum amount of downsample points to graph. Changing this value directly alters performance; however, it should usually not be changed for most uses. |
EquityCurveOverlay
EquityCurveOverlay(config: EquityCurveConfig)
Bases: GraphType[EquityCurveConfig]
A graph type that shows the equity over time for a specified metric.
Source code in src\contango\trading\analysis\graphing\equity_curve_overlay.py
36 37 | |
build
build(df: DataFrame) -> go.Figure
Builds an equity curve overlay for the top top_n experiments.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
df
|
DataFrame
|
The experiment DataFrame. |
required |
Returns:
| Type | Description |
|---|---|
Figure
|
A plotly Figure. |
Source code in src\contango\trading\analysis\graphing\equity_curve_overlay.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | |