compare_multiple_portfolios#

API documentation for tradeexecutor.analysis.multi_asset_benchmark.compare_multiple_portfolios Python function.

compare_multiple_portfolios(portfolios, indexes=None, mode=AdvancedMetricsMode.basic, periods_per_year=365, display=False)[source]#

Compare multiple portfolios.

  • Assets against each other: BTC vs. ETH

  • Strategy against index: Strategy vs. BTC

  • Multiple assets in the same table: Strategt vs. BTC vs. ETH

Parameters:
  • portfolios (DataFrame) –

    A DataFrame of different daily series of actively trading portfolios.

    See tradeexecutor.visual.equity_curve.calculate_returns().

    Each portfolio must have the returns series for the same time period, time periods are not matched.

  • indexes (pandas.core.frame.DataFrame | None) – A DataFrame of different daily returns passive buy and hold indexes.

  • mode (AdvancedMetricsMode) –

Returns:

QuantStats comparison of all different returns.

Return type:

DataFrame