In mathematical finance, convexity refers to non-linearities in a financial model. In other words, if the price of an underlying variable changes, the price of an output does not change linearly, but depends on the second derivative (or, loosely speaking, higher-order terms) of the modeling function. Geometrically, the model is no longer flat but curved, and the degree of curvature is called the convexity.
Strictly speaking, convexity refers to the second derivative of output price with respect to an input price. In derivative pricing, this is referred to as Gamma (Γ), one of the Greeks. In practice the most significant of these is bond convexity, the second derivative of bond price with respect to interest rates.
As the second derivative is the first non-linear term, and thus often the most significant, "convexity" is also used loosely to refer to non-linearities generally, including higher-order terms. Refining a model to account for non-linearities is called "correcting for convexity" or adding a convexity correction.
Formally, the convexity adjustment arises from the Jensen inequality in probability theory: the expected value of a convex function is greater than or equal to the function of the expected value:
Geometrically, if the model price curves up on both sides of the present value (the payoff function is convex up, and is above a tangent line at that point), then if the price of the underlying changes, the price of the output is greater than is modeled using only the first derivative. Conversely, if the model price curves down (the convexity is negative, the payoff function is below the tangent line), the price of the output is lower than is modeled using only the first derivative.
The precise convexity adjustment depends on the model of future price movements of the underlying (the probability distribution) and on the model of the price, though it is linear in the convexity (second derivative of the price function).
The convexity can be used to interpret derivative pricing: mathematically, convexity is optionality – the price of an option (the value of optionality) corresponds to the convexity of the underlying payout.