Question: All required packages are included, for your convenience. Our first technical rule is based on commonly used moving averages and crossing points. Given a data

All required packages are included, for your convenience. Our first technical rule is based on commonly used moving averages and crossing points. Given a data series of prices a moving average is simply calculated by applying a rolling window to the data and taking the mean of the time window data. 

Select a stock of your choice, preferrably from S&P500, and for the time-period from Jan 1, 2015 to present.

(You can choose any stock you like from Yahoo finance and solve the questions based on this stock)

import matplotlib as plt
import pandas as pd
import pandas_datareader.data as web
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import style
from statsmodels.tsa.arima_model import ARIMA
import datetime

1. Create a combined chart showing the close prices and the two corresponding simple moving averages for time periods of n=20 and n=50. Clearly label the plots or provide a legend.

2. Select a particular crossover point from the chart and explain how you would implement a trading strategy (ref p184). The explanation should be in reference to your particular selected use case, and not in general terms

3. Chart the Bollinger Bands based on the 20-days moving average and two standard deviations.

4. Select a particular descriptive point from the chart to explain how the BB can be used in a trading strategy (ref p185). The explanation should be in reference to your particular selected use case, and not in general terms

5. Create two separate charts showing the RSI based on 14-days moving average, together with the entry and exit threshold, and another chart for the closing prices. Select a particular point or date range to explain how RSI can be used in a trading strategy (ref p206)

Step by Step Solution

3.46 Rating (156 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The question mentions that a stock needs to be selected and analyzed using Python with provided information tools or data from Yahoo Finance However as youve indicated that packages are already in pla... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!