Algorithmic Trading

(1) Download at least 3 years of daily prices of a financial instrument other than S&P 500 ETFs.

(2) Use the SmallrTree.m script to estimate a regression tree that predicts the 1-day return and uses the 1-, 2-, 5-, and 20-day returns as potential predictors. Submit a picture of the regression tree in your report.

(3) Modify the SmallrTree.m script to backtest a strategy that takes a long position based on the path (in the tree from question 2) that yields the highest expected 1-day return, and a short position based on the path that yields the lowest expected 1-day return.

Sample Solution