Skip to content
All library documents

How Optimization and Linear Programming Apply to Quant Finance

Article Quant Q&A · Author: mathsam

Summary

The document explains why mathematical optimization is useful in quantitative finance, focusing on derivative pricing, portfolio construction, and mean-reverting baskets. It connects the duality theorem in linear programming to the arbitrage theorem, which provides a framework for arbitrage-free pricing of financial instruments. It also describes portfolio choice as maximizing utility over expected return and risk subject to constraints such as fully invested weights, with a mean-variance utility example motivated by CAPM.

For statistical arbitrage, it presents the search for asset weights that form a cointegrated, mean-reverting portfolio as a constrained optimization problem. Quadratic programming can accommodate objectives and restrictions such as position limits or short-sale availability. These examples illustrate distinct roles for linear, quadratic, and integer programming, but the discussion is conceptual rather than a worked implementation. It does not compare solvers, address estimation error, or provide empirical performance evidence; the usefulness of any formulation depends on its assumptions and constraints.

Key ideas

  • Linear programming duality underlies a common derivation of the arbitrage theorem used in derivative pricing.
  • Portfolio optimization chooses asset weights to balance return and risk under allocation constraints.
  • Mean-variance utility provides one example of how investor preferences can shape portfolio weights.
  • Quadratic programming can help find constrained weights for cointegrated mean-reverting baskets.
  • Position limits and short-sale rules can be incorporated as optimization constraints.

Tags

Full text
# Is linear programming important for quant?


# Is linear programming important for quant?












I'm thinking about taking a course on Linear and Convex Programming, but I don't know how useful it is in the real world finance. Which areas in finance is mathematical programming used?

## Answer by vonjd (score 6, accepted)

https://quant.stackexchange.com/a/14954

To price financial instruments such as options, bonds and stocks must be priced so as to be "arbitrage free". The concept of arbitrage can be made precise by one of the fundamental ideas of quantitative finance, the so called Arbitrage Theorem.

Put differently the Arbitrage Theorem provides a very elegant and general method for pricing derivative instruments. The result from which the Arbitrage Theorem is normally derived is the Duality Theorem from linear programming. So in a way it could be argued that linear programming forms the theoretical basis of derivatives pricing.

A very good introduction can be found here (from An Undergraduate Introduction fo Financial Mathematics by J. Robert Buchanan):

The Arbitrage Theorem

## Answer by emcor (score 5)

https://quant.stackexchange.com/a/14870

Optimization is definitely important in Quantitative Finance, especially for portfolio optimization where we maximize utility of the return of a portfolio as linear weighted vector of asset returns subject to a desired risk level:

$$ \max_{w\in[0,1]^n} U(\mu_p(w),\sigma_p(w))\quad s.t. \sum_{i=1}^n w_i=1$$

where $w$ being the portfolio weights, and $U$ utility function.

CAPM assumes investors with concave utility function $U=\mu_p-\frac{1}{2}\sigma_p^2$, from which then follows that all investors mix the market portfolio with the riskfree asset according to their desired minimum risk/maximum return level.

## Answer by Theodore (score 1)

https://quant.stackexchange.com/a/45962

Does optimizing a solution for a given set of parameters sound like something quants would need to know how to do?

Yep! Indeed many things quants do revolve around optimization, and linear programming (and integer programming, multi-integer programming, quadratic programming, etc.) is all about finding the optimal solution to something given some set of constraints.

For instance, think of the problem of finding multi-dimensional vectors for creating a mean-reverting portfolio (i.e., cointegrating vectors). If mean reversion is something new, read this. Essentially, a mean reverting portfolio is a basket of assets with some associated cointegration relationship among them that allow for easy-to-trade signals when the portfolio is above / down some standard deviation of the norm.

If you think about this entails; you're looking a vector of correlated securities given some optimal constraints—mainly size. This is a problem of quadratic programming. There are other things to consider of course w.r. to constraints: min / max position sizes, whether you can short assets, etc...

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.