定量金融 · 凸 QP · LP

平均・分散と条件付きリスク価値

分散は扱いやすい。損失をもたらすのは左裾である。一方は二次計画、他方は線形計画である。

同一の資産と同一の目標収益の下で、古典的な平均・分散(凸二次計画)と Rockafellar–Uryasev の条件付きリスク価値(線形計画)を比較する。共分散はソルバーに渡す前に Ledoit–Wolf 収縮を施し、危機再生パックで二つの効率的フロンティアと保有がどのように分かれるかを示す。危機パックは既定で静穏期の期待収益を保持する。

運用上の課題
分散は上振れと下振れを等しく罰し、CVaR は最悪尾部シナリオの期待損失に集中します。
決定の比較
同一リターンと目標で、平均・分散二次計画と Rockafellar–Uryasev CVaR 線形計画を解きます。
読み取る指標
平穏・危機リプレイでフロンティア、尾部損失、保有を比較します。

A mean–variance investor pays for variance, including upside variance. A CVaR investor pays for the expected loss in the worst \(1-\alpha\) of scenarios. When returns are roughly elliptical, the two answers often agree. When they are skewed or heavy-tailed, they need not.

The modelling punchline is not that one number is morally better. It is that the tail model remains a linear programme, so it will still be solvable later with integer trading constraints, whereas a cardinality-constrained Markowitz model would be a mixed-integer quadratic programme that this lab’s solver cannot take.

All bundled return packs are labelled illustrative skeletons of generic books. They are not official index histories.

数学定式を表示

Markowitz as a convex QP

Let \(x\) be portfolio weights, \(\mu\) the vector of expected returns, and \(\hat\Sigma\) a positive definite covariance. For a target \(R\):

\[ \min_x \tfrac12 x^\top\hat\Sigma x \quad\text{s.t.}\quad \mu^\top x \ge R,\quad \mathbf{1}^\top x = 1,\quad x_i \ge \underline{x}. \]

The default teaching model has no short sales (\(\underline{x}=0\)). The Hessian passed to HiGHS is \(Q=\hat\Sigma\), and the shared solver compiles this as \(\tfrac12 x^\top Q x\), so the quadratic term is neither doubled nor halved. \(\hat\Sigma\) is a Ledoit–Wolf shrinkage of the sample covariance towards a constant-correlation target, then a tiny ridge if needed so the smallest eigenvalue is at least \(10^{-8}\). A “raw sample” toggle is available to show the pathology of a noisy Hessian.

The target grid runs up to the largest single-asset mean under the long-only bound. A requested target below the risk-minimising return is kept: the return constraint goes slack and the page returns that risk-minimising portfolio, rather than calling the solve infeasible.

CVaR as an LP

CVaR here is of loss \(L_s=-r_s^\top x\), not of return. Following Rockafellar and Uryasev (2000), a threshold \(\zeta\) (VaR at optimality) and slacks \(u_s\ge 0\) give

\[ \min_{x,\zeta,u}\; \zeta + \frac{1}{1-\alpha}\sum_{s=1}^{S} p_s u_s \quad\text{s.t.}\quad u_s \ge L_s-\zeta,\quad \mu^\top x \ge R,\quad \mathbf{1}^\top x=1,\quad x_i\ge\underline{x}. \]

If the pack does not supply weights, \(p_s=1/S\). Axes and the reading line are in loss units (also shown with a simple annualisation for comparison with the target, without compounding).

Sandbox

Mean–variance expected return (annualised)
0.08
CVaR expected return (annualised)
0.08
Mean–variance volatility (annualised)
0.059
CVaR volatility (annualised)
0.062
Mean–variance CVaR (annualised)
0.918
CVaR portfolio CVaR (annualised)
0.9

At annualised target 0.08, mean–variance return is 0.08 and CVaR-portfolio return is 0.08. CVaR of loss at α = 0.95 is 0.9182 versus 0.8996. Largest weight difference: EQ4 at -0.1843.

平均・分散ポートフォリオと CVaR ポートフォリオの収益・ボラティリティ座標。
目標収益グリッド全体の CVaR。
平均・分散モデルと CVaR モデルにおけるポートフォリオ・ウェイト。

選択した CVaR しきい値を示すシミュレーション損失テール。
QuantityMean–varianceCVaR
StatusOptimalOptimal
Expected return (annualised)8%8%
Volatility (annualised)5.9329%6.1956%
CVaR of loss (annualised)91.8203%89.9596%
Checksumpasspass
空間的な教材ビュー
求解済みの収益・ボラティリティ・CVaR 座標。教材データであり、投資助言ではありません。

求解済みの収益・ボラティリティ・CVaR 座標。教材データであり、投資助言ではありません。

Notes and limits

References

  1. Markowitz, H. (1952). Portfolio selection. The Journal of Finance, 7(1), 77–91.
  2. Rockafellar, R. T. and Uryasev, S. (2000). Optimization of conditional value-at-risk. Journal of Risk, 2(3), 21–41.
  3. Ledoit, O. and Wolf, M. (2004). Honey, I shrunk the sample covariance matrix. The Journal of Portfolio Management, 30(4), 110–119.