Skip to content

Quadratic formula

Derive the quadratic formula by completing the square, then solve a synthetic hedge-risk target whose two roots have opposite factor exposures.

The quadratic formula gives the roots of a quadratic equation directly from its coefficients:
ax2+bx+c=0,a≠0⟹x=−b±b2−4ac2a.ax^2+bx+c=0,\quad a\ne0 \qquad\Longrightarrow\qquad x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}.

Here a,b,ca,b,c are fixed real numbers. The symbol ±\pm means evaluate the expression twice, once with addition and once with subtraction; when the square-root term is zero, the answers coincide. The entire numerator is divided by 2a2a.

In quantitative finance, a risk limit can lead to a quadratic equation even when the underlying position depends linearly on hedge size: variance squares the exposure. Two formula roots can then represent very different hedges with the same measured risk.

Why this formula works

The formula packages one operation: complete the square, then undo the square while keeping both signs. Starting from ax2+bx+c=0ax^2+bx+c=0, multiply by 4a4a and move the constant term:
4a2x2+4abx=−4ac.4a^2x^2+4abx=-4ac.

Add b2b^2 to both sides:

4a2x2+4abx+b2⏟(2ax+b)2=b2−4ac.\underbrace{4a^2x^2+4abx+b^2}_{(2ax+b)^2}=b^2-4ac.
Write Δ=b2−4ac\Delta=b^2-4ac, the discriminant. When Δ≥0\Delta\ge0,
2ax+b=±Δ,x=−b±Δ2a.2ax+b=\pm\sqrt{\Delta}, \qquad x=\frac{-b\pm\sqrt{\Delta}}{2a}.

This derivation works for either sign of aa because a≠0a\ne0. If a<0a<0, the “plus” expression need not be the larger root. If a=0a=0, division by 2a2a is invalid; solve the resulting linear or constant equation instead.

The square identity also explains the root count: Δ>0\Delta>0 gives two real roots, Δ=0\Delta=0 gives a repeated root, and Δ<0\Delta<0 gives no real roots. Allowing complex numbers extends the formula to a negative discriminant, but a complex hedge size does not satisfy a real trading constraint.

Two hedge sizes, the same variance

Consider an original synthetic model for P&L over one fixed period. Let ZZ be a market-factor shock and EE a residual shock. Both are dimensionless, have mean zero and variance one, and have zero covariance. No distributional shape is assumed.

Before hedging, the position has three units of factor exposure. Each hedge unit removes one. With dimensionless hedge size x≥0x\ge0, suppose

ΔVx=1,000[(3−x)Z+E] USD.\Delta V_x=1{,}000\big[(3-x)Z+E\big]\,\text{USD}.

This assumes a linear hedge with fixed exposure per unit, no additional hedge noise and no transaction costs. It illustrates algebra, rather than a calibrated trading strategy.

Using the variance rule for a sum, the covariance term vanishes:
Var(ΔVx)=1,000,000[(3−x)2+1] USD2.\text{Var}(\Delta V_x) =1{,}000{,}000\big[(3-x)^2+1\big]\,\text{USD}^2.
Suppose the target is variance of 5,000,000 USD25{,}000{,}000\,\text{USD}^2, equivalent to P&L standard deviation of approximately USD 2,236.07. Dividing by the fixed scale gives
(3−x)2+1=5⟺x2−6x+5=0.(3-x)^2+1=5 \quad\Longleftrightarrow\quad x^2-6x+5=0.

Identify a=1a=1, b=−6b=-6, c=5c=5. Keep the sign of bb inside parentheses when squaring:

Δ=(−6)2−4(1)(5)=36−20=16,x=6±42.\Delta=(-6)^2-4(1)(5)=36-20=16, \qquad x=\frac{6\pm4}{2}.
The two answers are x=1x=1 and x=5x=5. An independent check avoids the formula entirely: (x−3)2=4(x-3)^2=4 gives x−3=±2x-3=\pm2. Substitution into the original variance expression gives (3−1)2+1=5(3-1)^2+1=5 and (3−5)2+1=5(3-5)^2+1=5.
Synthetic one-period P&L variance is 5 million USD squared at hedge sizes x = 1 and x = 5. Their remaining market-factor exposures are +2 and minus 2. Minimum variance is 1 million USD squared at x = 3.
Synthetic one-period P&L variance is 5 million USD squared at hedge sizes x = 1 and x = 5. Their remaining market-factor exposures are +2 and minus 2. Minimum variance is 1 million USD squared at x = 3.
Original synthetic model. Equal variance sits on either side of the minimum-risk hedge. The horizontal axis measures dimensionless hedge units; variance has squared currency units.
At x=1x=1, two positive factor units remain. At x=5x=5, the position is overhedged: the factor exposure is −2-2. The equal variances do not establish equal P&L distributions or equal tail risk under the stated assumptions. A positive factor shock moves the two factor components in opposite directions.

Neither answer minimizes variance. The completed-square form shows the minimum at x=3x=3, where factor exposure vanishes and residual variance remains 1,000,000 USD21{,}000{,}000\,\text{USD}^2—standard deviation USD 1,000.

If the target is a cap rather than an equality, all 1≤x≤51\le x\le5 satisfy it, subject to position constraints. If overhedging is prohibited by x≤3x\le3, only x=1x=1 meets the target exactly, while 1≤x≤31\le x\le3 stays within the cap. The formula finds equality boundaries; the risk mandate determines how to use them.

From algebra to a calculation you can trust

First put the equation in zero-equals-polynomial form, then identify coefficients, evaluate the discriminant, calculate both branches and substitute into the original model. Check domain restrictions after solving. Useful cross-checks are

x1+x2=−ba,x1x2=ca.x_1+x_2=-\frac{b}{a}, \qquad x_1x_2=\frac{c}{a}.

Here the sum is 66 and the product is 55.

The formula is an exact algebraic identity; a direct computer evaluation can still lose precision when −b-b and Δ\sqrt{\Delta} nearly cancel in one branch. See numerical stability for that separate computational issue.
For equation operations and domains, Arithmetic, Algebra, Equations and Functions provides a membership lesson with a public preview. To develop the risk calculation, Expectation, Variance and Covariance is available in full with a free signed-in account; its public page is a preview.

Sources

Last updated
  • algebra
  • roots
  • hedging
  • risk limits
  • variance
← Back to the glossaryBack to top ↑