Quadratic programming solver: convex QP online, solved and checked
Type a quadratic objective (squares and products of variables) with linear constraints, such as a minimum-variance portfolio, and solve it here, no account needed. A convex problem is solved to optimality and checked; a nonconvex one is labelled as a local answer, never passed off as the best.
Solve it here
The example below is the Markowitz minimum-variance portfolio worked example; its saved answer, checked by the solver, is 0.0159946 (optimal).
How to type it
- First line:
maximizeorminimizeand the objective, such as3*a + 2*b. - Then
subject toand one constraint per line with<=,>=or=. a, b >= 0for nonnegative variables;integer: aorbinary: zfor whole-number or yes/no ones.- Lines starting with
#are notes, such as what a variable means.
What you get here
- the optimal value and the value of each variable
- a check that every constraint holds at the answer, within the solver's tolerance
- the proof label: optimal and numerically checked, or a labelled local optimum for a nonconvex problem
With a free account: the full step-by-step walkthrough, word problems, photos and voice, and your history.
Worked examples
- Markowitz minimum-variance portfolio
- Least squares line fit
- Ridge regression
- Maximum Sharpe ratio portfolio
Questions
What if my quadratic is not convex?
The app says so, tries many starting points, and labels the answer a local optimum, not certified as global.
How do I type a product of two variables?
As 0.008*w1*w2, and a square as w1^2.
More: all calculators · 50 solved examples · what the app solves
Try ProvenDecisions free: type, photograph or say an optimization problem; every answer is checked by a solver.