Category Archives: Algorithmic trading

Meanreversion and Breakout research on the EURUSD

Mean reversion and Breakout strategy combo
Mean reversion and Breakout strategy combo

Below is a snapshot of some trading research I have been doing.
By no means this is a trade-able strategy as is, but it does show two of the basic trading principles:

  • Mean reversion
    This is the principle that price tends to return to it’s mean after it has moved away from it.
  • Breakout
    This is the principle that price tends to break away once it has moved more then a certain percentage usually after a period of consolidation.

Continue reading

Exploring pair trading opportunities with yahoo, python and LibreOffice

I have been reading two books about quantitative and algorithmic trading by Ernie Chan:

  • Quantitative Trading: How to Build Your Own…
  • Algorithmic Trading: Winning Strategies and…

See the books page for my reading recommendations.

One of the main take aways of this reading is the insight that it is possible to create stationary pairs by shorting and longing two, or more equities that usually move in tandem. The idea is to arbitrage the oscillating differences in moves between the equities in the pairs. Mr Chan explains all the mathematics behind mean reversion and provides Matlab code do the necessary calculus.
My approach to exploring this idea and the possibilities is far simpler and less elegant. Still, I think some might find it useful to see my take on it. I wrote a python script that pulls daily data from Yahoo and then calculates the ratios between two equities. With the resulting ratios data I continued my investigations in LibreOffice Calc. I like to use Calc to model my ideas and as they become more complicated or as I want to test more data sets I move the model over to code using Python and the pandas library.

Continue reading