quantlab.runs.backtest_attribution.annualized_log_growth#
- quantlab.runs.backtest_attribution.annualized_log_growth(curve, years)[source]#
Return a value curve’s log growth from its first to its last value, per year.
- Parameters:
- curvearray-like
Values on the window’s bars.
- yearsfloat
The window’s length in years.
- Returns:
- float
log(curve[-1] / curve[0]) / years.
Examples
>>> round(annualized_log_growth([1.0, 1.05, 1.21], years=2.0), 6) 0.09531