Skip to content

Absolute value

Absolute value measures distance without direction. See why gross stock exposure differs from net exposure, express a price tolerance, and understand the kink at zero.

The absolute value of a real number xx, written ∣x∣\lvert x\rvert, is its distance from zero on the number line. It measures size without retaining direction: ∣−12∣=12\lvert-12\rvert=12, ∣12∣=12\lvert12\rvert=12 and ∣0∣=0\lvert0\rvert=0.

A trading loss of USD 12 has signed profit and loss of −12-12 dollars and absolute magnitude of 12 dollars. Taking the absolute value measures the loss's size; it does not turn the loss into a profit.

Algebraically,

∣x∣={x,x≥0,−x,x<0.\lvert x\rvert=\begin{cases} x,&x\ge0,\\ -x,&x<0. \end{cases}

The second branch is positive because xx is negative there. Consequently, x2=∣x∣\sqrt{x^2}=\lvert x\rvert, rather than always xx: squaring erases the original sign, and the square root returns the nonnegative magnitude.

Why a small net position can hide a larger book

Consider two hypothetical stock positions whose signed market values are divided by the same positive net asset value. Stock A has weight 0.700.70 and stock B has weight −0.30-0.30: a long position and a short position, respectively. These are stock-exposure weights; they are not a complete balance sheet or weights required to sum to one.

The net stock exposure allows the signs to offset:

Net=0.70+(−0.30)=0.40.\text{Net}=0.70+(-0.30)=0.40.

The gross stock exposure counts the size of each position:

Gross=∣0.70∣+∣−0.30∣=1.00.\text{Gross}=\lvert0.70\rvert+\lvert-0.30\rvert=1.00.
Thus net exposure is 40% of NAV while gross stock exposure is 100% of NAV. Taking the absolute value after adding would give only ∣0.40∣=0.40\lvert0.40\rvert=0.40. That answers a different question: how large is the net position after cancellation?
Synthetic stock weights: A is positive 0.70 and B negative 0.30, giving net 0.40; their absolute magnitudes sum to gross 1.00. Both panels use fractions of the same NAV.
Synthetic stock weights: A is positive 0.70 and B negative 0.30, giving net 0.40; their absolute magnitudes sum to gross 1.00. Both panels use fractions of the same NAV.
Original synthetic stock-exposure ledger. Both panels show the same positions relative to the same NAV; cash is excluded from these stock-exposure totals.

Gross exposure preserves position size that netting hides, but it does not measure all portfolio risk. Two stocks can have different volatilities and respond differently to market moves. Neither total specifies a margin requirement or the loss in a stress scenario. Derivative exposure also needs an explicit measurement convention; a market-value weight and a notional exposure are different inputs.

The algebra behind cancellation is the triangle inequality:
∣x+y∣≤∣x∣+∣y∣.\lvert x+y\rvert\le\lvert x\rvert+\lvert y\rvert.

Opposite signs can reduce the magnitude of a sum. Equality holds when both numbers have the same sign, including when either is zero.

Distance from a price, not just from zero

To measure how far a price pp is from a reference aa, first form the signed difference and then take its magnitude: ∣p−a∣\lvert p-a\rvert. A quote of USD 99.80 is USD 0.20 from a reference of USD 100, even though its signed difference is negative.

A symmetric tolerance of USD 0.25 can be written

∣p−100∣≤0.25⟺99.75≤p≤100.25,\lvert p-100\rvert\le0.25 \quad\Longleftrightarrow\quad 99.75\le p\le100.25,

with prices expressed in dollars per share. Absolute value preserves the units of its input. An absolute price error is in dollars per share; an absolute return error remains a return. It does not automatically become a percentage error: that requires division by a specified nonzero reference.

The corner matters in optimisation

The graph of f(x)=∣x∣f(x)=\lvert x\rvert is V-shaped. Its slope is −1-1 to the left of zero and +1+1 to the right, so its ordinary derivative does not exist at zero, even though the function is continuous there.
This matters when a model charges a proportional trading cost C(q)=c∣q∣C(q)=c\lvert q\rvert, where qq is signed shares traded and c>0c>0 is dollars per share. Both buying and selling incur a nonnegative dollar cost. Away from zero, differentiate the appropriate branch; at zero, a routine that assumes a smooth objective needs special treatment. The owned Transaction Costs and Implementation lesson develops the resulting no-trade region in a portfolio model (public preview; full lesson requires membership).

Sources

Last updated
  • absolute value
  • magnitude
  • distance
  • gross exposure
  • algebra
← Back to the glossaryBack to top ↑