liveBook · Manning

Tracking error

As explained in Build a Robo-Advisor with Python (From Scratch)

Tracking error is the variability or magnitude of an investment's return difference from the benchmark or reference portfolio it is intended to follow.

Tracking error measures the volatility of return differences between a portfolio and a reference portfolio. For portfolio weights w, reference weights p, and covariance matrix Σ, it is √((w − p)^TΣ(w − p)). A limit on this quantity keeps an optimized portfolio close to its reference in risk-adjusted return behavior rather than merely constraining its total volatility. section 10.2.2

This makes tracking error a practical trade-off control: a portfolio can pursue another objective while limiting how far it may depart from the reference. ESG-tilted indices use that trade-off differently; some permit larger departures to emphasize social-responsibility characteristics, while others allow only small tilts. section 4.4.2 section 10.3.4

In constrained portfolio optimization, tracking error can be used to:

  • Bound the quadratic active-risk expression with a tracking-error tolerance. section 10.2.2
  • Compare optimized weights with reference weights; separately constrain total absolute weight deviations with an L1 norm when needed. section 10.2.2
  • Trace an ESG frontier by resolving the portfolio at progressively larger permitted tracking-error levels. section 10.3.4

ESG portfolio versus a reference portfolio

Maximize the weighted average ESG score while requiring full investment, nonnegative weights, and tracking error no greater than σb. With a 10% volatility reference portfolio, increasing permitted tracking error from 0.00% to 2.50% raises the reported ESG quality score from 6.02 to 8.13, while reported volatility remains near 12.8%. The result depends on the covariance estimate and available ETF return history. section 10.3.4

Table 10.3 Results from the ESG frontier
Tracking error Volatility ESG quality score
0.00% 12.87% 6.02
0.25% 12.84% 6.34
0.50% 12.83% 6.66
0.75% 12.80% 6.97
1.00% 12.78% 7.27
1.25% 12.75% 7.52
1.50% 12.74% 7.68
1.75% 12.75% 7.81
2.00% 12.76% 7.92
2.25% 12.77% 8.03
2.50% 12.82% 8.13

Compare the reported ESG-score gain against each permitted tracking-error level and the accompanying portfolio volatility. section 10.3.4

How Build a Robo-Advisor with Python (From Scratch) covers it

How deep it goes
Defines tracking error as a covariance-based quadratic form and implements it as a Python optimization constraint.
Examples
Uses ESG-tilted ETFs and a 10% volatility reference portfolio across tracking-error tolerances from 0.00% to 2.50%.
What it assumes
Assumes portfolio weights, covariance matrices, and reference portfolios; introduces the tracking-error expression directly.
What you can do after
Apply it via Python optimization to cap active risk while improving a portfolio’s ESG score.
How it connects
Connects portfolio optimization with covariance matrices, reference portfolios, volatility, ESG scores, and rebalancing.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build a Robo-Advisor with Python (From Scratch). The section links point to the parts of the book it draws on.