Preventing Whipsaw using a Gradient Calculation

Continuing on from June 28th investigation… I extended the strategy to calculate the angle of the gradient for the moving averages and integrated this into the trading signals. Initial tests over a small window (Dec 2010) show less loss trades – this is good news, but also some bad news. Without gradient angle checking enabled Here […]


Pair Trading “The strategy monitors performance of two historically correlated securities. When the correlation between the two securities temporarily weakens, i.e. one stock moves up while the other moves down, the pairs trade would be to short the outperforming stock and to long the underperforming one, betting that the “spread” between the two would eventually […]

Preventing Whipsaw: MA Gradients and trading with the Trend

Taking a quick look at the journal entries May 31st and June 10th showed that there is some benefit to calculating the gradient of the moving averages. This can be used in two places Can be used to discourage new trades if the trade direction is against the current gradient direction. Can be used as […]

Strategy Performance Metrics

Since I had a lot of computational time over the night, I setup the optimizer to optimize my strategy exhaustively over the longest period of historical data that I could (01/01/2010 – 01/06/2013) in hope that I could find some way to create an algorithm that would perform well in the loss period identified above […]

Stop Loss / Take Profit

Today I did some optimizations on Stop loss and Take Profit with the Omar_MACD strat. Obviously the trending strategy will close out its own positions when the market turns against it, so strictly speaking a stop loss may not be necessary. However, in the case of flash crashes or perhaps network problems, I would feel […]