trading.analyzer.graphing.pairwise_heatmap_grid
trading.analyzer.graphing.pairwise_heatmap_grid
build_pairwise_heatmap_grid
build_pairwise_heatmap_grid(df: DataFrame, param_x: str, param_y: str, facet_param: str, target_metric: str = 'calmar_ratio', max_cols: int = 4) -> go.Figure
Builds a grid of 2D heatmaps: param_x vs. param_y, one panel per unique value of facet_param.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
df
|
DataFrame
|
Experiment DataFrame. |
required |
param_x
|
str
|
Parameter column for the heatmap x-axis. |
required |
param_y
|
str
|
Parameter column for the heatmap y-axis. |
required |
facet_param
|
str
|
Parameter column to facet panels by. |
required |
target_metric
|
str
|
Metric column used for cell color. Defaults to "calmar_ratio" (risk-adjusted, better for spotting robust regions than raw return). |
'calmar_ratio'
|
max_cols
|
int
|
Maximum number of panels per row before wrapping. |
4
|
Returns:
| Type | Description |
|---|---|
Figure
|
A plotly Figure with one subplot per facet_param value. |
Source code in src\contango\trading\analyzer\graphing\pairwise_heatmap_grid.py
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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | |