All required packages are included, for your convenience. Our first technical rule is based on commonly used
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 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)
Quantitative Methods for Business
ISBN: 978-0324651751
11th Edition
Authors: David Anderson, Dennis Sweeney, Thomas Williams, Jeffrey cam