讲解Quandl API、辅导Java/c++程序、讲解MACD, ATR留学生、辅导python, C/C++

- 首页 >> Python编程

Assignment 2

1. Pull last five years of data for stock of your choice using yahoo/Google or Quandl API. Make a

time series plot of stock price. (Goal: learn to use the API to pull stock prices) - 10

2. Calculate 5 technical indicators. You can use the package (https://github.com/bukosabino/ta) to

calculate the technical indicators. - RSI (3 period), difference between EMA (5 days) and close

price, MACD, ATR, Stochastic Oscillator (SR). Make sure to lag indicators to avoid forward

looking bias. (Goal: Learn to use a package that is not standard and Learn about technical

indicators). - 30

3. Calculate daily return and create a new classification variable UP/Down based on returns. (Goal:

Learn to calculate the return, learn about shift function and manipulating data frames). - 10

4. Use decision tree algorithm on 75% of data to predict the up/down classification using the

indicators as features. 30

5. Show the result of your prediction on remaining 25% data. Show the summary statistics of

accuracy of your prediction. 20

Extra Credit - Assume that you go long/short based on your prediction, show the return of your

investment strategy on an equal weighted portfolio of 50 stocks.

At each stage make sure to use indicators up to day t-1 for predictions of day t to avoid the bias. Submit

the notebook by Nov 10. Notebook should not have dependency on any other additional files.


站长地图