contango.trading.analysis.graph_type
contango.trading.analysis.graph_type
GraphType
GraphType(config: C)
Bases: ABC, Generic[C]
A generic abstract class that all graphs should implement.
Attributes:
| Name | Type | Description |
|---|---|---|
C |
The |
|
graph_name |
str
|
The unique name for the graph. |
Initializes GraphType.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
C
|
The matching configuration for the graph type. |
required |
Source code in src\contango\trading\analysis\graph_type.py
26 27 28 29 30 31 32 33 | |
config
property
config: C
The config for the graph type.
build
abstractmethod
build(df: DataFrame) -> go.Figure
Builds the graph type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
df
|
DataFrame
|
The pre-validated experiments dataframe. |
required |
Returns:
| Type | Description |
|---|---|
Figure
|
go.Figure: A plotly graph figure. |
Source code in src\contango\trading\analysis\graph_type.py
43 44 45 46 47 48 49 50 51 52 53 54 | |