See: Description
| Class | Description |
|---|---|
| MarkowitzByCLM |
Solves for the optimal weights in the Markowitz formulation by critical line
method.
|
| MarkowitzByQP |
Modern portfolio theory (MPT) is a theory of investment which attempts to
maximize portfolio expected return for a given amount of portfolio risk, or
equivalently minimize risk for a given level of expected return, by carefully
choosing the proportions of various assets.
|
Choose an ordered asset list and retain it for the expected-return vector, covariance rows/columns, bounds and reported weights. Supply fractional returns for a common horizon; for example 0.08 is eight percent, and covariance is in squared-return units. A benchmark used for Sharpe calculations uses that same horizon.
These optimizers take estimated future moments. They do not obtain prices, align calendars, forecast moments, correct look-ahead bias or estimate trading costs. Use only information available at the rebalance time when evaluating historical decisions. Estimation quality and covariance conditioning remain caller responsibilities.
MarkowitzByQP
with explicit weight bounds or a constraint object.PortfolioUtils.The objective is \(q w^{\mathsf T}\Sigma w-\mu^{\mathsf T}w\). The fw() method returns this minimized value, not its negative utility. Variance and volatility are different quantities. The budget equality is added automatically; componentwise bound constraints alone do not encode the budget.
Changing q solves again and replaces the stored portfolio. Retain the weights and independently calculated metrics for each successful frontier point. Check necessary bound feasibility (lower sum at most one, upper sum at least one) before solving. If a solve fails, reject that point rather than labeling old weights as a new solution. A frontier is not a backtest: apply the trading calendar, realized returns, turnover and costs in a separate evaluation layer.
Copyright © 2010-2026 NM Group. All Rights Reserved.