liveBook · Manning

MinTrackingErrorObjective

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

MinTrackingErrorObjective is an optimization objective that selects portfolio trades to minimize tracking error relative to a target portfolio without considering taxes.

MinTrackingErrorObjective selects portfolio positions that minimize deviation from target weights, without accounting for tax consequences. It is useful when rebalancing should prioritize target alignment. section 13.3.2

Initialize it with target weights and a sigma matrix. During optimization, the implementation converts positions to portfolio weights, selects the target assets, computes weight differences, and minimizes their sigma-scaled squared magnitude.

Target allocation

For a portfolio targeting 60% VTI and 40% AGG, the objective evaluates candidate positions after dividing them by total investment value, then favors the allocation with the smallest risk-adjusted tracking deviation.

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

How deep it goes
Implements weight normalization, target selection, sigma scaling, and convex minimization, but does not address tax effects.
Examples
Uses a VTI-and-AGG target portfolio and a Python implementation built around candidate positions and a sigma matrix.
What it assumes
Assumes portfolio positions, investment value, target weights, and optimization variables are already defined.
What you can do after
Build it from scratch by defining target weights and sigma, then generating a minimization objective from portfolio variables.
How it connects
Connects portfolio rebalancing, target weights, optimization objectives, positions, and tax minimization.

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.