Optimisation is the act of finding the best decision subject to constraints. Almost every quantitative-finance problem reduces to one: building the maximum-Sharpe portfolio, hedging an option book, calibrating a yield-curve model, finding the cheapest bond to deliver into a futures contract, designing a transaction-cost-aware execution schedule.
The canonical form
minimize f(x)subject to g_i(x) ≤ 0, i = 1, ..., mh_j(x) = 0, j = 1, ..., pover x ∈ R^n
- x — the decision variables. Portfolio weights, hedge ratios, model parameters.
- f — the objective. Risk, cost, mis-pricing.
- g_i — inequality constraints. Long-only (w ≥ 0), exposure caps, turnover.
- h_j — equality constraints. Budget (Σw = 1), dollar-neutral, beta-target.
Local vs global optima
x* is a local minimum if f(x*) ≤ f(x) for all x in a neighbourhood; a global minimum if f(x*) ≤ f(x) for all feasible x. Finding global minima of arbitrary functions is hard. Convex problems are the exception: every local minimum is a global minimum. This is why convexity matters.
Existence
Weierstrass: if the feasible set is non-empty, closed, and bounded (compact), and f is continuous, then a global minimiser exists. Real-world finance problems often have unbounded feasible sets (no leverage limit, no short-sale constraint) — those problems can fail to have an optimum unless f penalises extreme positions.
Feasibility, optimality, sensitivity
- Feasibility: does any x satisfy all constraints?
- Optimality: among feasible x, which minimises f?
- Sensitivity: how does the optimum move when constraints or parameters shift?
The three things every solver answers
(1) Is the problem feasible? If not, the constraints are inconsistent — diagnose by relaxing one at a time. (2) If feasible, what's the optimum? Report f(x*) and x*. (3) Dual variables / shadow prices? These tell you what a 1-unit relaxation of each constraint would buy you in objective value.
Smoothness and differentiability
First-order methods (gradient, Newton) require f differentiable. Subgradient and proximal methods extend to non-smooth f (e.g., L¹ norm regularisation). Constraint smoothness matters analogously — interior-point methods need smooth boundary functions; barrier methods need strict feasibility.
Continuous, integer, mixed-integer
Variables can be continuous (portfolio weights), integer (number of shares, on/off indicators), or both (mixed-integer). Continuous convex problems are tractable; mixed-integer problems can be exponentially hard. Avoid integer constraints when continuous relaxations are close enough — and use branch-and-bound only when truly necessary.
Roadmap of this course
- Modules 2-3: convex foundations and unconstrained methods.
- Modules 4-5: Lagrangian, duality, KKT — the theory of constrained optimisation.
- Modules 6-7: LP and QP — closed-form and computationally tractable convex families.
- Modules 8-9: conic, robust, and stochastic optimisation — the modern toolkit.
- Module 10: solvers and software — turning math into running code.
Exercise
Formulate the long-only minimum-variance portfolio as an optimisation problem. Be explicit about variables, objective, and constraints.