Recently much of my work has been revolving around building a trading strategy that optmises on the mean reverting behaviour of the stock market.
This blog post is to give insights into some of the interesting tools i have had the pleasure of working with.
Ornstein-Uhlenbeck process
with constants , and state space is in the Real domain. Here, B is a standard Brownian motion under P (historical probability measure), denote by
the filtration generated by X.
The parameter represents the equilibrium or mean value supported by fundamentals,
the degree of volatility around it caused by shocks and
the rate by which these shocks dissipate and the variable reverts towards the mean.
Pairs Trading example

The pair of assets are selected to form a mean-reverting portfolio value. In addtion, one can adjust the strategy to enhance the value of mean-reversion.
under the model.

with the constant

the conditional probability density of at
given
at
with time increment.
Maximising the average log-likelihood over and
for a given strategy
. For any
, we choose the strategy
, where ß is the argmax of the log likelihood equation.
think of shares is held and at the same time we short
shares in
. This way the sign of the initial portfolio values depends on the sign of the difference A – B which is non- negative. Without loss of generality, we set A=1.
Log-likelihood function:
Using the observed , we maximise the average log-likelihood defined by.

Example
Using the price data from August 2011 to May 2012 (n = 200, ∆t = 1/252), for GLD-SLV and GLD-GDX.

Shown above is the performance of a portfolio that has hence the equal ratio of spending is done in going long on GLD and shorting GDX (SLV).

The above chart shows the comparison between the two pairs trading examples using the optimised beta levels obtained through the use of the model.

Citations: Optimal Mean Reversion Trading with Transaction Costs and Stop-Loss Exit paper [Tim Leung and Xin Li.]
