liveBook · Manning

Max-deviation constraint

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

A max-deviation constraint bounds each optimized position within an interval around its target position.

A max-deviation constraint keeps every optimized position within an interval around its target position. The interval width is a fraction of the total invested amount. section 13.3.2

A $10,000 portfolio

For a $4,000 AGG target and a tolerance of 0.05, optimization must keep AGG between $3,500 and $4,500. section 13.3.2

The constraint implementation:

  • Works alongside nonnegativity and full-investment constraints during rebalancing optimization. section 13.3.2

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

How deep it goes
Defines target-relative bounds and shows class-level implementation, but does not develop the complete generated expression.
Examples
Uses a $10,000 portfolio with a $4,000 AGG target and 0.05 tolerance to calculate a $3,500–$4,500 interval.
What it assumes
Assumes target weights, invested value, optimization positions, and basic constraint-class structure.
What you can do after
Build it from scratch by adding scalar or asset-specific target-deviation limits to a rebalancing optimizer.
How it connects
Connects portfolio rebalancing with target portfolios, optimization constraints, volatility-based deviations, and tracking error.

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.