generate_buy_and_hold_returns#
API documentation for tradeexecutor.visual.equity_curve.generate_buy_and_hold_returns Python function.
- generate_buy_and_hold_returns(buy_and_hold_price_series)[source]#
Create a benchmark series based on price action.
Create a returns series that can be used as a benchmark in
tradeexecutor.analysis.advanced_metrics.visualise_advanced_metrics()
Example:
eth_index = strategy_universe.data_universe.candles.get_candles_by_pair(eth_pair)["close"] benchmark_returns = generate_buy_and_hold_returns(eth_index)
- Parameters:
buy_and_hold_price_series (Series) –