liveBook · Manning

Reference portfolio

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

A reference portfolio is a portfolio selected as the baseline against which another portfolio's characteristics or performance are compared.

A reference portfolio is a portfolio whose weights provide a baseline for constraining, comparing, or interpreting another portfolio. In practical Black–Litterman applications, it is generally the market portfolio, with asset weights proportional to market capitalizations and scaled to a chosen total weight or risk level. section 10.2.2 section 12.1.1

Optimization can limit how far portfolio weights move from the reference. The covariance-weighted variance of the return difference is (w − p)ᵀΣ(w − p); its square root is tracking error. A separate norm1 constraint limits the sum of absolute weight deviations, supporting controlled changes during rebalancing. section 10.2.2 section 10.2.2

Implied returns from a reference portfolio

If p is assumed to maximize expected return minus risk penalty, reverse optimization infers expected returns as μ = λΣp. This makes p the optimal solution without solving an optimization problem. section 12.1.1

constraints.append(cp.quad_form(w - p, Sigma) <= te_bound ** 2)

Inspect a cvxpy constraint that bounds tracking error relative to the reference weights. section 10.2.2

constraints.append(cp.norm1(w - p) <= dev_bound)

Inspect a cvxpy constraint that bounds total absolute deviations from the reference portfolio. section 10.2.2

def compute_equilibrium_ers(weights, sigma, risk_aversion):  #1
    return risk_aversion * sigma @ weights    

Inspect the Python function that computes equilibrium expected returns from reference weights, covariance, and risk aversion. section 12.1.1

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

How deep it goes
Derives tracking-error and absolute-deviation constraints, then derives implied returns algebraically; it does not develop a full rebalancing procedure.
Examples
Uses a market-capitalization-weighted market portfolio, tracking-error bounds, absolute weight deviations, and implied returns calculated from covariance.
What it assumes
Assumes portfolio weights, covariance matrices, expected returns, and risk-aversion parameters; defines the reference portfolio’s optimization role.
What you can do after
Apply it via cvxpy to constrain tracking error or weight deviations, or compute implied expected returns with reverse optimization.
How it connects
Connects portfolio optimization, tracking error, rebalancing, covariance matrices, risk aversion, and the Black–Litterman model.

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.