plot_allocation
| Name | Type | Default | Description |
|---|---|---|---|
data | vbt.Data | -- | Data object containing asset prices. |
signals | SignalsT | -- | Object containing trading signals. |
fig | vbt.FigureWidget | None | Existing figure to update. Defaults to None. |
| Type | Description |
|---|---|
vbt.FigureWidget | Figure containing the allocation plot. |
plot_signal_crossover
| Name | Type | Default | Description |
|---|---|---|---|
model_output | pd.Series | -- | Model output series. |
upper_crossed | pd.Series | -- | Series indicating upper boundary crossovers. |
lower_crossed | pd.Series | -- | Series indicating lower boundary crossovers. |
upper | float | -- | Upper threshold value. |
lower | float | -- | Lower threshold value. |
| Type | Description |
|---|---|
vbt.FigureWidget | Figure containing the crossover plot. |
plot_signals
| Name | Type | Default | Description |
|---|---|---|---|
data | vbt.Data | -- | A data object containing asset prices and other relevant information. |
symbol | str | -- | The asset symbol to plot. |
signals | SignalsT | -- | An object containing trading signals (long/short entries and exits). |
fig | vbt.FigureWidget | None | An existing figure to update. If None, a new figure is created. Defaults to None. |
plot_kwargs | tp.Kwargs | -- | Additional keyword arguments for customizing the plot. |
| Type | Description |
|---|---|
vbt.FigureWidget | A Plotly FigureWidget containing the signals plot. |
plot_signal_vlines
| Name | Type | Default | Description |
|---|---|---|---|
df | pd.DataFrame | -- | Dataframe containing price data. |
symbol | str | -- | Symbol for which to plot signals. |
signals | Signals | -- | Signal object containing entry points. |
plot_kwargs | tp.Kwargs | -- | Additional keyword arguments for plotting. |
| Type | Description |
|---|---|
vbt.FigureWidget | A figure with entry signals plotted as vertical lines. |
plot_dashboard
| Name | Type | Default | Description |
|---|---|---|---|
data | vbt.Data | -- | Market data. |
s1 | str | -- | First asset symbol. |
s2 | str | -- | Second asset symbol. |
pf | vbt.Portfolio | -- | Portfolio object. |
model_output | tp.Array | -- | Model output data. |
showlegend | bool | False | Show legend. Defaults to False. |
layout_kwargs | tp.Kwargs | -- | Additional keyword arguments for customizing the layout. |
| Type | Description |
|---|---|
vbt.FigureWidget | A dashboard figure displaying asset data, portfolio returns, and signals. |
plot_pie_chart
Pie class from systematica.utils.custom_plots.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
args | tp.Args | -- | Positional arguments passed to the Pie class. |
kwargs | tp.Kwargs | -- | Keyword arguments passed to the Pie class. |
| Type | Description |
|---|---|
vbt.FigureWidget | A Plotly FigureWidget containing the pie chart. |
plot_allocations
| Name | Type | Default | Description |
|---|---|---|---|
pfo | vbt.PortfolioOptimizer | -- | Portfolio optimizer object containing allocation data. |
market_returns | pd.DataFrame | -- | DataFrame containing market returns. |
categories | pd.DataFrame | None | DataFrame containing category information for assets. Defaults to None. |
group_by_category | bool | False | Whether to group allocations by category. Defaults to False. |
column | tp.Label | None | Column to select from the portfolio optimizer. Defaults to None. |
dropna | str | "head" | How to handle NaN values in allocations. Defaults to head. |
line_shape | str | "hv" | Shape of the lines in the area plot. Defaults to hv. |
plot_rb_dates | bool | None | Whether to plot rebalancing dates. Defaults to None. |
trace_kwargs | tp.KwargsLikeSequence | None | Additional keyword arguments for traces. Defaults to None. |
add_shape_kwargs | tp.KwargsLike | None | Additional keyword arguments for shapes. Defaults to None. |
add_trace_kwargs | tp.KwargsLike | None | Additional keyword arguments for adding traces. Defaults to None. |
fig | tp.BaseFigure | None | Existing figure to update. If None, a new figure is created. Defaults to None. |
layout_kwargs | tp.Kwargs | -- | Additional layout arguments for the figure. |
| Type | Description |
|---|---|
tp.BaseFigure | A Plotly BaseFigure containing the allocations plot. |
plot_performance_matrix
| Name | Type | Default | Description |
|---|---|---|---|
pf | tp.Any | -- | The portfolio object containing return data. |
plot_kwargs | tp.Kwargs | -- | Additional keyword arguments passed to the heatmap function. |
| Type | Description |
|---|---|
vbt.FigureWidget | A Plotly FigureWidget containing the performance matrix heatmap. |
plot_performance_reset
| Name | Type | Default | Description |
|---|---|---|---|
data | tp.SeriesFrame | -- | Time series data of performance values. |
by | str | M | Reset frequency: M for monthly or Y for yearly. Defaults to M. |
fig | vbt.FigureWidget | None | Existing figure to update. If None, a new figure is created. Defaults to None. |
| Type | Description |
|---|---|
vbt.FigureWidget | A Plotly FigureWidget containing the performance reset plot. |
plot_performance_rebase
| Name | Type | Default | Description |
|---|---|---|---|
df | tp.SeriesFrame | -- | Time series data of performance values. |
fig | vbt.FigureWidget | None | Existing figure to update. If None, a new figure is created. Defaults to None. |
| Type | Description |
|---|---|
vbt.FigureWidget | A Plotly FigureWidget containing the rebased performance plot. |
plot_cash
| Name | Type | Default | Description |
|---|---|---|---|
pf | tp.Any | -- | Portfolio object containing cash-related data. |
plot_kwargs | tp.Kwargs | -- | Additional keyword arguments for customizing the plot. |
| Type | Description |
|---|---|
vbt.FigureWidget | A Plotly FigureWidget containing the cash-related plots. |
plot_excursions
| Name | Type | Default | Description |
|---|---|---|---|
pf | tp.Any | -- | Portfolio object containing trade data. |
expanding | bool | True | Whether to plot expanding MAE/MFE. Defaults to True. |
plot_kwargs | tp.Kwargs | -- | Additional keyword arguments for customizing the plot. |
| Type | Description |
|---|---|
vbt.FigureWidget | A Plotly FigureWidget containing the excursion plots. |
plot_all_trades
| Name | Type | Default | Description |
|---|---|---|---|
port | tp.Any | -- | The portfolio object containing trade data. |
layout_kwargs | tp.Kwargs | -- | Additional keyword arguments for layout configuration. |
| Type | Description |
|---|---|
vbt.FigureWidget | A figure widget containing the plots for all trades. |
plot_drawdown
| Name | Type | Default | Description |
|---|---|---|---|
port | tp.Any | -- | The portfolio object containing drawdown data. |
plot_kwargs | tp.Kwargs | -- | Additional keyword arguments for customizing the plot. |
| Type | Description |
|---|---|
vbt.FigureWidget | A figure widget containing the drawdown plots. |
plot_trades
| Name | Type | Default | Description |
|---|---|---|---|
pf | tp.Any | -- | Portfolio object containing trade data. |
symbol | str | -- | Symbol for which to plot trades and asset flow. |
| Type | Description |
|---|---|
vbt.FigureWidget | A Plotly FigureWidget containing the trades and asset flow plots. |
plot_smas
| Name | Type | Default | Description |
|---|---|---|---|
close | pd.DataFrame | -- | DataFrame containing closing prices. |
timeperiods | list, optional | -- | List of time periods for SMAs. Defaults to [20, 50, 100, 200]. |
length | int, optional | -- | Number of data points to include in the plot. Defaults to None (all data). |
plot_kwargs | tp.Kwargs | -- | Additional keyword arguments for customizing the plot. |
| Type | Description |
|---|---|
vbt.FigureWidget | A Plotly FigureWidget containing the SMA plots. |
plot_bbands
| Name | Type | Default | Description |
|---|---|---|---|
close | pd.DataFrame | -- | DataFrame containing closing prices. |
length | int | None | Number of data points to include in the plot. Defaults to None (all data). |
plot_kwargs | tp.Kwargs | -- | Additional keyword arguments for customizing the plot. |
| Type | Description |
|---|---|
vbt.FigureWidget | A Plotly FigureWidget containing the Bollinger Bands plot. |
plot_slope_range
| Name | Type | Default | Description |
|---|---|---|---|
close | pd.DataFrame | -- | DataFrame containing closing prices. |
window | int | 50 | Window size for the moving average. Defaults to 50. |
length | int | None | Number of data points to include in the plot. Defaults to None (all data). |
plot_kwargs | tp.Kwargs | -- | Additional keyword arguments for customizing the plot. |
| Type | Description |
|---|---|
vbt.FigureWidget | A Plotly FigureWidget containing the slope range plot. |
plot_pattern
| Name | Type | Default | Description |
|---|---|---|---|
close | pd.DataFrame | -- | DataFrame containing closing prices. |
pattern | list | -- | or vbt.Param, default None Pattern to search for. Defaults None. |
window | int | 50 | Minimum window size for pattern matching. Defaults to 50. |
max_window | int | 120 | Maximum window size for pattern matching. Defaults to 120. |
min_similarity | float | 0.8 | Minimum similarity threshold for pattern matching. Defaults to 0.8. |
length | int | None | Number of data points to include in the plot. Defaults to None (all data). |
plot_kwargs | tp.Kwargs | -- | Additional keyword arguments for customizing the plot. |
| Type | Description |
|---|---|
vbt.FigureWidget | A Plotly FigureWidget containing the pattern match plot. |
plot_frontier
| Name | Type | Default | Description |
|---|---|---|---|
target_portfolio | pd.DataFrame | -- | Target_portfolio. |
efficient_frontier | pd.DataFrame | None | Efficient frontier. If None, the frontier is not displayed. |
portfolio_name | str | Target... | Portfolio name. Defaults to Target Portfolio. |
marker_color | str | red | Color of the portfolio star shaped marker. Defaults to red. |
marker_size | int | 20 | Size of the portfolio star shaped marker. Default to 20. |
make_figure_kwargs | tp.KwargsLike | None | Additional figure arguments. Defaults to None. |
fig | ttp.BaseFigure | None | Figure. Defaults to None. |
showscale | bool | True | Show scale. Defaults to True. |
layout_kwargs | tp.Kwargs | -- | Additional layout arguments for the figure. |
| Type | Description |
|---|---|
vbt.FigureWidget | A Plotly FigureWidget containing frontier plot. |
plot_scatter_matrix
| Name | Type | Default | Description |
|---|---|---|---|
df | pd.DataFrame | -- | Trial dataframe. |
metrics | tp.List[str] | -- | Metric columns. |
params | str | -- | Param columns. |
n_columns | int | 3 | Number of columns in the grid. Defaults to 3. |
layout_kwargs | tp.Kwargs | -- | Additional layout arguments for the figure. |
| Type | Description |
|---|---|
vbt.FigureWidget | A Plotly FigureWidget containing the trials. |
plot_histogram_matrix
| Name | Type | Default | Description |
|---|---|---|---|
df | pd.DataFrame | -- | Trial dataframe. |
metrics | tp.List[str] | -- | Metric columns. |
layout_kwargs | tp.Kwargs | -- | Additional layout arguments for the figure. |
| Type | Description |
|---|---|
vbt.FigureWidget | A Plotly FigureWidget containing the trials. |
plot_density_heatmap
| Name | Type | Default | Description |
|---|---|---|---|
df | pd.DataFrame | -- | Trial dataframe. |
metric | str | -- | Metric column. |
param | str | -- | Param column. |
kwargs | tp.Kwargs | -- | Additional layout arguments for the figure. |
| Type | Description |
|---|---|
vbt.FigureWidget | A Plotly FigureWidget containing the trials. |
plot_density_contour
| Name | Type | Default | Description |
|---|---|---|---|
df | pd.DataFrame | -- | Trial dataframe. |
metric | str | -- | Metric column. |
param | str | -- | Param column. |
kwargs | tp.Kwargs | -- | Additional layout arguments for the figure. |
| Type | Description |
|---|---|
vbt.FigureWidget | A Plotly FigureWidget containing the trials. |
plot_range_breakout_signals
| Name | Type | Default | Description |
|---|---|---|---|
data | vbt.Data | -- | A data object containing asset prices and other relevant information. |
symbol | str | -- | The asset symbol to plot. |
training_window | str | 2h | The split size of the training window used in splitter.from_grouper. Defaults to 2h |
by | str | D | Split data temporarily. Defaults to D for daily. |
freq | str | hours | Split data with by. Defaults to hours. |
tol | float | 0.5 | Range tolerance to trigger a long/short signal such as trigger = tol * range_values. Defauts to 0.5. |
use_close | bool | True | Use close or open price for signals. Defaults to True (close). |
layout_kwargs | tp.Kwargs | -- | Additional layout arguments for the figure. |
| Type | Description |
|---|---|
vbt.FigureWidget | A Plotly FigureWidget containing the trials. |
plot_range_breakout_model_output
| Name | Type | Default | Description |
|---|---|---|---|
data | vbt.Data | -- | A data object containing asset prices and other relevant information. |
symbol | str | -- | The asset symbol to plot. |
training_window | str | 2h | The split size of the training window used in splitter.from_grouper. Defaults to 2h. |
by | str | D | Split data temporarily. Defaults to D for daily. |
freq | str | hours | Split data with by. Defaults to hours. |
tol | float | 0.5 | Range tolerance to trigger a long/short signal such as trigger = tol * range_values. Defauts to 0.5. |
use_close | bool | True | Use close or open price for signals. Defaults to True (close). |
layout_kwargs | tp.Kwargs | -- | Additional layout arguments for the figure. |
| Type | Description |
|---|---|
vbt.FigureWidget | A Plotly FigureWidget containing the trials. |

