The theory behind my algo is that if you have two competing companies in the same market sector, then their regression is a more accurate estimate of the future stock price. The algo trades when the stock prices of the two stocks become over or under valued relative to the average simple moving average of the two.
I also added in my commissions, and added controls so that it would not buy or sell on margin or make orders larger than 25% of my initial capital base.
Please let me know your thoughts on flaws and improvements.
Thanks,
BSM