sigmaquant.performance.metrics.tracking_error#
- sigmaquant.performance.metrics.tracking_error(returns, factor_returns)#
Compute tracking error as the sample standard deviation of active returns.
- Parameters:
returns (Iterable[float]) – Time series of portfolio returns.
factor_returns (Iterable[float]) – Time series of factor or benchmark returns. Must be aligned in time with returns.
- Returns:
Sample standard deviation of active returns (ddof=1).
- Return type:
float
Notes
NaN values are ignored.
Tracking error is defined as the sample standard deviation of
active returns:
Let \(a_t = r_t - b_t\) denote the active returns.
The tracking error estimator is:
\[\widehat{\text{TE}} = \sqrt{ \frac{1}{T - 1} \sum_{t=1}^{T} (a_t - \bar{a})^2 }\]