Question: In python Requirements: visualize the the historical data. calculate the following: Simple Moving average and visualize it. Exponential moving average with smoothing factor that follows
In python
Requirements:
-
visualize the the historical data.
-
calculate the following:
-
Simple Moving average and visualize it.
-
Exponential moving average with smoothing factor that follows the typical formula and visualize it.
-
Average Dividends.
-
The frequency of dividends distributions.
Design:
-
Simple Moving average and visualize it.
-
Date Method to import the start date and the end date from the csv file and calculate the number of days.
-
ChooseSAVG Method to choose which simple moving average to calculate (open , high , low ,close adj close ).
-
SMA Method to calculate the simple moving average.
-
PlotSMA Method to visualize the curve
-
Exponential moving average with smoothing factor that follows the typical formula and visualize it.
-
Smoothing Method to calculate the multiplier for smoothing ( call the date method) .
-
EMA method to calculate Exponential moving average.
-
PlotEMA Method to visualize the curve
-
Average Dividends.
-
Date Method to import the start date and the end date from the csv file and calculate the number of days.
-
Div method to calculate the Average Dividends.
-
The frequency of dividends distribution
-
Date Method to import the year and dividends distribution from the csv file.
-
FrequencuCalc method to write which year and calculate the frequency in the chosen year .
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
