trading.analyzer.graphing.trade_quality_scatter
trading.analyzer.graphing.trade_quality_scatter
build_trade_quality_scatter
build_trade_quality_scatter(df: DataFrame, y_metric: str = 'profit_factor', color_by: str = 'calmar_ratio') -> go.Figure
Builds the trade-quality scatter plot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
df
|
DataFrame
|
Experiment DataFrame. |
required |
y_metric
|
str
|
Metric for the y-axis. "profit_factor" (default) or "expectancy" are best. |
'profit_factor'
|
color_by
|
str
|
Column to color points by. Defaults to "calmar_ratio". |
'calmar_ratio'
|
Returns:
| Type | Description |
|---|---|
Figure
|
A plotly Figure. |
Source code in src\contango\trading\analyzer\graphing\trade_quality_scatter.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | |