IB IPA system: algorithm trading MSFT

Exercise 11.1

Pick a stock. Get the historical data from Yahoo Finance and calculate the latest 20-day moving average of prices. Make connection to IB IPA system and buy the stock if its price is above moving average and short-sell it if the price is lower than the moving average. You dont need to design any mechanism to implement short-selling. Just simply sell the stock!

Exercise 11.2

Repeat the steps in question 1, but get the historical data from IB APA system this time.

Exercise 11.3

Are there any differences between your findings in questions 1 and 2? If yes, explain!

Please choose MICROSOFT stock