# calculating arbitrage-free ranges based off outright, spread, and fly prices

This may be more applied math rather than finance focused, but I'm curious about using linear algebra techniques for generating possible arbitrage signals among outright instruments and spreads/flies based off these outrights (take for instance, Eurodollar futures, and their calendar spreads and butterflies).

In the general case, assuming there are prices (I'm assuming a single mid price for testing purposes) available for some subset of these of instruments, I'd like to come up with a simple algorithm for detecting arbitrages and, for outright instruments with no unique price solution, a range of arbitrage-free prices.

My initial hunch was to set up a weighting matrix MxN ( where M is the net number of instruments and N is the number of outrights ), and filter out all rows without market prices, filter out all columns with all 0s, and then solve the matrix (augmented with prices) to get the outright price values, or an inconsistency (=potential arbitrage). If the rank < M, then I'm a bit stumped on how to cleanly generate ranges given constraints on prices ( say > 0 ).

For example, given 3 outrights A,B,C and two instruments A+B and A-B+C, the weight matrix is [ 1 1 0; 1 -1 1] and prices are [10,35].

Solving this yields a free variable, which I can manually manipulate to get ranges for A,B,C (I get A:[0,10], B:[0,35], C:[0,5]), but is there a nicer mathematical way to generate ranges of values that solve a matrix subject to constraints? Thought about using some kind of LP but didn't jump out at me how.

-

Interesting question! I don't think you will get very far just using mid prices, though...any sufficiently sensitive test will flag nearly every situation as an arbitrage since $A_\text{mid}+B_\text{mid} \neq (A+B)_\text{mid}$ in most cases.
Instead, what about viewing each price set as a dimension in $n$-dimensional space? The arbitrages occur if the current price state corresponds to a point outside the $n$-dimensional polygon whose edges are defined by relations such as
$$A_\text{ask}+B_\text{ask} \geq (A+B)_\text{bid}$$