visualise_long_short_benchmark#

API documentation for tradeexecutor.visual.benchmark.visualise_long_short_benchmark Python function.

visualise_long_short_benchmark(state, name=None, height=None)[source]#

Visualise separate benchmarks for both longing and shorting

Note

This chart is inaccurate for strategies that can have multiple positions open at the same time.

Parameters:
  • state (State) – state of the strategy

  • name (str | None) – name of the plot

  • height (int | None) – height of the plot

Returns:

plotly figure

Return type:

Figure