Momentum trading

After the base target weight is set (and before any trade is executed), it can be influenced by any number of factors. I implemented a momentum trading module which changes the trade target depending on the moving average price.

movingavgThe comparison of a the current price with the average price of the last hours or days is a measure of the current trend. Since the price is a product of supply and demand, and since people tend to buy when the price is rising and sell when the price is falling, it is possible to "ride the trend" if it can be anticipated quickly enough.

As the example in the graphic shows, more often than not the price continues to rise when the price is above the moving average (depicted in red), while the value drops whenever the price is below the moving average. When the two are aligned, there tends to be not so much movement either way.

Of course this is by no means a sure method of generating profits. We need to be extremely careful when selecting the window to use for the moving average, and when deciding how strong this momentum trading effect should influence the basic trading strategy. Both of these parameters have been set using backtesting, which brings its own set of problems and pitfalls.

Leave a Reply

Your email address will not be published. Required fields are marked *