PortfolioAnalyzer
vbt.Portfolio.
Method generated by attrs for class PortfolioAnalyzer.
Class variables
-
data: vectorbtpro.data.base.Data: Data object. -
s1: str: First symbol. -
s2: str: Second symbol. -
vbt: vectorbtpro.portfolio.base.Portfolio: VectorBT PRO Portfolio object. -
model_output: pandas.core.frame.DataFrame | numpy.ndarray: Model output used in the strategy. Defaults toNone. -
window: int: Rolling window used in the model. Defaults toNone. -
minp: int: Minimum number of observations required in the model. Defaults toNone.
Instance variables
-
freq: pandas._libs.tslibs.timedeltas.Timedelta: Get the frequency of the data. -
column_wrapper: List[str]: Get the column wrapper for the portfolio. If MultiIndex (where group_by isFalse), Get the first level only. -
categories: pandas.core.frame.DataFrame | None: Retrieve asset categories. -
drawdowns_readable: Get the drawdowns of the portfolio. -
pfo: vectorbtpro.portfolio.pfopt.base.PortfolioOptimizer: Pick allocations from an already filled array. -
pfo_allocations: pandas.core.frame.DataFrame: Get the portfolio allocations. -
latest_allocation: pandas.core.frame.DataFrame: Get the latest allocation of the portfolio. -
current_holdings: Get the current holdings of the portfolio. -
pfo_describe: pandas.core.frame.DataFrame: Get descriptive statistics of portfolio allocations. -
average_allocation: Get the average allocation of the portfolio. -
allocation_records_readable: Get readable allocation records. -
latest_allocation_records: Get the latest allocation records.
Methods
get_signals
group_by=False to disable grouping.
Parameters:
Returns:
get_market_returns
get_rolling_metrics
Raises:
Returns:
all_stats
Returns:
plot_rolling_metrics
Returns:
plot_equity_curve
Returns:
plot_performance_pnl
Returns:
plot_running_edge_ratio
Returns:
plot_performance_reset
Returns:
plot_performance_rebase
Returns:
plot_performance_matrix
Returns:
plot_drawdown_and_underwater
Returns:
plot_allocation_report
Returns:
plot_pie_allocation
Returns:
plot_average_allocation
Returns:
plot_cash_report
Returns:
plot_expanding_excursions
Returns:
plot_excursions
Returns:
plot_trades_by_symbol
Returns:
plot_all_trades
Returns:
plot_dashboard
Returns:

