Interpreting the Risk-Aversion Parameter in Efficient-Frontier Optimization
Summary
The document asks why a portfolio optimization example fits a quadratic to the efficient frontier, derives a parameter from the fitted coefficients, and then uses that parameter in another quadratic program. The optimization itself balances expected return against variance subject to fully invested, long-only weights. The sequence of parameter values used to trace the frontier represents risk aversion: it controls the relative penalty on variance, rather than serving as a list of expected returns.
One response interprets the fitted parabola’s vertex as identifying a risk-aversion setting associated with the minimum-standard-deviation portfolio, then links that setting to the final optimization. Another response offers a geometric explanation, but is tentative and less clear. The exchange gives no numerical example, derivation of the fitted curve’s validity, or discussion of fitting error and numerical stability. As a result, it helps identify the intended role of the parameter, but does not fully establish that the particular quadratic fit and coefficient formula are reliable in all cases.
Key ideas
- The optimization traces portfolios by varying a parameter that controls the penalty on variance.
- That parameter represents risk aversion rather than an expected return target.
- The answer interprets the fitted frontier’s vertex as corresponding to a minimum-risk portfolio setting.
- The method depends on fitting a quadratic to the computed frontier and using its coefficients to select the parameter.
- The document does not assess fit quality, numerical stability, or whether the interpretation holds for every frontier.
Tags
Full text
# Optimal Portfolio from Efficient Frontier
# Optimal Portfolio from Efficient Frontier
I found this code on plotly site, using CVXOPT to find the efficient frontier, and then, the optimal Portfolio. The optimal function is
```
def optimal_portfolio(returns):
n = len(returns)
returns = np.asmatrix(returns)
N = 100
mus = [10**(5.0 * t/N - 1.0) for t in range(N)]
# Convert to cvxopt matrices
S = opt.matrix(np.cov(returns))
pbar = opt.matrix(np.mean(returns, axis=1))
# Create constraint matrices
G = -opt.matrix(np.eye(n)) # negative n x n identity matrix
h = opt.matrix(0.0, (n ,1))
A = opt.matrix(1.0, (1, n))
b = opt.matrix(1.0)
# Calculate efficient frontier weights using quadratic programming
portfolios = [solvers.qp(mu*S, -pbar, G, h, A, b)['x']
for mu in mus]
## CALCULATE RISKS AND RETURNS FOR FRONTIER
returns = [blas.dot(pbar, x) for x in portfolios]
risks = [np.sqrt(blas.dot(x, S*x)) for x in portfolios]
## CALCULATE THE 2ND DEGREE POLYNOMIAL OF THE FRONTIER CURVE
m1 = np.polyfit(returns, risks, 2)
x1 = np.sqrt(m1[2] / m1[0])
# CALCULATE THE OPTIMAL PORTFOLIO
wt = solvers.qp(opt.matrix(x1 * S), -pbar, G, h, A, b)['x']
return np.asarray(wt), returns, risks
weights, returns, risks = optimal_portfolio(return_vec)
```
My question refers to the lines where the code fits a parabola to the efficient frontier
```
m1 = np.polyfit(returns, risks, 2)
```
takes the square root of the division the intercept by the coefficient of the x-squared
```
x1 = np.sqrt(m1[2] / m1[0])
```
and puts it in the optimization
```
t = solvers.qp(opt.matrix(x1 * S), -pbar, G, h, A, b)['x']
```
Can anyone please shed light on why this is done?
Thanks!
## Answer by RoeeBoo (score 1)
https://quant.stackexchange.com/a/44338
In quadratic equation of the form $y= ax^2+bx+c = 0$, while $b=0$ then $+/-\sqrt{(c/a)}$ is the values of cutting with the $x$-axis. Also, this is the solution of the equation. Using Vieta's formulas one can see that: $x1*x2 = c/a$ Also, using Trigonometric solution: $x= \sqrt{(c/a)}*tan(\theta)$ So maybe there is a need to rotate the axis in 90 degrees right to better understand it and change the axis of symmetry. And I guess there is a connection to focus of the parabola
## Answer by Lorry (score 0)
https://quant.stackexchange.com/a/71913
Note that `mus` is not a series of expected return values; it is a series of 'weights' representing the risk aversion parameter, i.e., the relative importance of variance in the return-variance trade-off, also the Lagrange multiplier in a bi-criterion optimization problem. (See page 187, Figure 4.12 of the book Convex Optimization)
Compare `solvers.qp(mu*S, -pbar, G, h, A, b)['x']` with `solvers.qp(opt.matrix(x1 * S), -pbar, G, h, A, b)['x']`, note that $(x_1, x_2)=(\sqrt{c/a}, \sqrt{c/a})$ is the vertex of the parabola, thus $x_1$ represents the risk aversion parameter that leads to the optimal portfolio with least `std`.Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.