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_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_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_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. |
RegressionLine
vbt.Scatter.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
data | pd.DataFrame | -- | Data in any format that can be converted to NumPy. Must be of shape (x_labels, trace_names). |
x_labels | tp.Labels | None | Labels for the x-axis. Must be of shape (data.shape[0],). |
trace_names | tp.TraceNames | None | Trace names, corresponding to columns in pandas. Must be of shape (data.shape[1],). |
trace_kwargs | tp.KwargsLikeSequence | None | Keyword arguments passed to plotly.graph_objects.Scatter. Can be specified per trace as a sequence of dicts. |
add_trace_kwargs | tp.KwargsLike | None | Keyword arguments passed to add_trace. |
make_figure_kwargs | tp.KwargsLike | None | Keyword arguments passed to vectorbtpro.utils.figure.make_figure. |
fig | tp.BaseFigure | None | Figure to add traces to. |
use_gl | bool | None | Whether to use WebGL for rendering. If None, it will be set to True if the data is large enough, otherwise False. |
layout_kwargs | tp.Kwargs | -- | Keyword arguments for layout. |
Ancestors
vectorbtpro.generic.plotting.Scattervectorbtpro.generic.plotting.TraceTypevectorbtpro.utils.config.Configuredvectorbtpro.utils.config.HasSettingsvectorbtpro.utils.caching.Cacheablevectorbtpro.utils.checks.Comparablevectorbtpro.utils.pickling.Pickleablevectorbtpro.utils.formatting.Prettifiedvectorbtpro.utils.chaining.Chainablevectorbtpro.generic.plotting.TraceUpdatervectorbtpro.utils.base.Base
TargetPortfolio
vbt.Scatter.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
data | pd.Series | None | Data in any format that can be converted to pandas Series. Must be of shape (trace_names,). |
trace_names | tp.TraceNames | None | Trace names, corresponding to columns in pandas. Must be of shape (data.shape[0],). |
trace_kwargs | tp.KwargsLikeSequence | None | Keyword arguments passed to plotly.graph_objects.Scatter. Can be specified per trace as a sequence of dicts. |
add_trace_kwargs | tp.KwargsLike | None | Keyword arguments passed to add_trace. |
make_figure_kwargs | tp.KwargsLike | None | Keyword arguments passed to vectorbtpro.utils.figure.make_figure. |
fig | tp.BaseFigure | None | Figure to add traces to. |
use_gl | bool | None | Whether to use WebGL for rendering. If None, it will be set to True if the data is large enough, otherwise False. |
layout_kwargs | tp.Kwargs | -- | Keyword arguments for layout. |
Ancestors
vectorbtpro.generic.plotting.Scattervectorbtpro.generic.plotting.TraceTypevectorbtpro.utils.config.Configuredvectorbtpro.utils.config.HasSettingsvectorbtpro.utils.caching.Cacheablevectorbtpro.utils.checks.Comparablevectorbtpro.utils.pickling.Pickleablevectorbtpro.utils.formatting.Prettifiedvectorbtpro.utils.chaining.Chainablevectorbtpro.generic.plotting.TraceUpdatervectorbtpro.utils.base.Base
Frontier
vbt.Scatter.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
data | pd.Series | None | Data in any format that can be converted to pandas Series. Must be of shape (trace_names,). |
trace_names | tp.TraceNames | None | Trace names, corresponding to columns in pandas. Must be of shape (data.shape[0],). |
trace_kwargs | tp.KwargsLikeSequence | None | Keyword arguments passed to plotly.graph_objects.Scatter. Can be specified per trace as a sequence of dicts. |
add_trace_kwargs | tp.KwargsLike | None | Keyword arguments passed to add_trace. |
make_figure_kwargs | tp.KwargsLike | None | Keyword arguments passed to vectorbtpro.utils.figure.make_figure. |
fig | tp.BaseFigure | None | Figure to add traces to. |
use_gl | bool | None | Whether to use WebGL for rendering. If None, it will be set to True if the data is large enough, otherwise False. |
layout_kwargs | tp.Kwargs | -- | Keyword arguments for layout. |
Ancestors
vectorbtpro.generic.plotting.Scattervectorbtpro.generic.plotting.TraceTypevectorbtpro.utils.config.Configuredvectorbtpro.utils.config.HasSettingsvectorbtpro.utils.caching.Cacheablevectorbtpro.utils.checks.Comparablevectorbtpro.utils.pickling.Pickleablevectorbtpro.utils.formatting.Prettifiedvectorbtpro.utils.chaining.Chainablevectorbtpro.generic.plotting.TraceUpdatervectorbtpro.utils.base.Base
Pie
vbt.Configured and vbt.TraceUpdater.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
data | tp.Array | None | Data in any format that can be converted to NumPy. Must be of shape (trace_names). |
rp_kwargs | tp.Kwargs | None | Keyword arguments for vectorbtpro.portfolio.utils.rp. If data is not None, it will be used to compute the portfolio. If data is None, it will be used to compute the portfolio from trace_names. |
trace_names | tp.TraceNames | None | Trace names, corresponding to columns in pandas. Must be of shape (data.shape[0],) if data is not None. If data is None, it must be of shape (trace_names,). If trace_names is a string, it will be used as the name for all traces. |
trace_kwargs | tp.KwargsLikeSequence | None | Keyword arguments passed to plotly.graph_objects.Pie. Can be specified per trace as a sequence of dicts. If data is not None, it will be used to compute the portfolio. If data is None, it will be used to compute the portfolio from trace_names. |
add_trace_kwargs | tp.KwargsLike | None | Keyword arguments passed to add_trace. If data is not None, it will be used to compute the portfolio. If data is None, it will be used to compute the portfolio from trace_names. |
make_figure_kwargs | tp.KwargsLike | None | Keyword arguments passed to vectorbtpro.utils.figure.make_figure. If data is not None, it will be used to compute the portfolio. If data is None, it will be used to compute the portfolio from trace_names. |
fig | tp.BaseFigure | None | Figure to add traces to. If None, a new figure will be created. If data is not None, it will be used to compute the portfolio. If data is None, it will be used to compute the portfolio from trace_names. |
layout_kwargs | tp.Kwargs | None | Keyword arguments for layout. If data is not None, it will be used to compute the portfolio. If data is None, it will be used to compute the portfolio from trace_names. |
Ancestors
vectorbtpro.utils.config.Configuredvectorbtpro.utils.config.HasSettingsvectorbtpro.utils.caching.Cacheablevectorbtpro.utils.checks.Comparablevectorbtpro.utils.pickling.Pickleablevectorbtpro.utils.formatting.Prettifiedvectorbtpro.utils.chaining.Chainablevectorbtpro.generic.plotting.TraceUpdatervectorbtpro.utils.base.Base
Static methods
update_trace
| Name | Type | Default | Description |
|---|---|---|---|
trace | BaseTraceType | -- | Trace to update. |
data | tp.Array1d | -- | Data in any format that can be converted to NumPy. Must be of shape (trace_names,). |
Methods
update
| Name | Type | Default | Description |
|---|---|---|---|
data | tp.ArrayLike | -- | Data in any format that can be converted to NumPy. Must be of shape (trace_names,). |

