One valley, one answer
A function is convex if the straight segment between any two points of its graph lies on or above the graph: for every . For a twice-differentiable function there is a practical test: is convex exactly when its Hessian is positive semidefinite everywhere, meaning all eigenvalues are . Sums of convex functions, positive multiples of them and the maximum of convex functions are convex again, which is how large convex objectives are built from small pieces.
Convexity is what makes optimisation reliable. Every local minimum is a global minimum, a zero gradient is enough to stop, and the answer does not depend on where the solver starts. If the function is strictly convex the minimiser is also unique, and if it is strongly convex, with curvature at least in every direction, gradient descent converges at the geometric rate you saw before. Without convexity none of this is guaranteed: the solver may stop in a valley that is not the deepest one.
In finance the convex objectives include the portfolio variance (because a covariance matrix is positive semidefinite), least-squares losses, the norm and the expected shortfall (CVaR) as a function of the weights. Value-at-risk, a cap on the number of non-zero weights and the Sharpe ratio taken as it stands are not convex. A sample covariance matrix estimated from fewer observations than assets is positive semidefinite but singular, so the variance is convex without being strictly convex, and many weight vectors tie for the minimum.
- Hessian test: all eigenvalues everywhere means convex; one negative eigenvalue means not convex.
- Payoff: every local minimum is global, so the start point does not matter.
- Building blocks: sums, positive multiples and maxima of convex functions stay convex.
Lab · what's graded
- A convexity gap15 pts
- The eigenvalue that breaks convexity15 pts
- Which Hessian is convex15 pts
- Convex objectives in finance15 pts
- A zero gradient10 pts
- Convexity vocabulary15 pts
- Why solvers like convex problems15 pts