visualise_advanced_metrics#
- visualise_advanced_metrics(returns, mode=AdvancedMetricsMode.basic)[source]#
Calculate advanced strategy performance statistics using Quantstats.
Calculates multiple metrics used to benchmark strategies for risk-adjusted returns in one go.
See Quantstats for more information.
Example:
from tradeexecutor.visual.equity_curve import calculate_equity_curve, calculate_returns from tradeexecutor.analysis.advanced_metrics import visualise_advanced_metrics equity = calculate_equity_curve(state) returns = calculate_returns(equity) df = visualise_advanced_metrics(returns) display(df)
See also
calculate_advanced_metrics()
.- Parameters:
returns (Series) –
Returns series of the strategy.
See :py:`tradeeexecutor.visual.equity_curve.calculate_returns`.
mode (AdvancedMetricsMode) – Full or basic stats
- Returns:
A DataFrame ready to display
- Return type: