Cross Over Moving Average

Cross-over moving average

This algorithm is an example of a trend following strategy, among many of its 100’s variants. The portfolio manager is seeking to go with the trend of the asset. If there is a confirmed uptrend, buy and ride until there’s a confirmed downtrend. This algorithm’s buy signal is when the price breaks out of the lagging moving average. Similarly the sell signal is when the price drops below the lagging moving average.

Code