Let's say I want to analyse coca cola's stock (monthly for 5 years) Use Rstudio. Your next
Question:
Let's say I want to analyse coca cola's stock (monthly for 5 years) Use Rstudio. Your next task is to calculate daily/weekly/monthly returns for the Open prices (which is the opening price for the day/week/month and is also the last recorded price for the previous day/week/month). Recall that return is calculated by, if weekly interval is used: (Price in current week – Price in the previous week)/Price in the previous week (and in a similar way daily/monthly return can be calculated if a different time interval is used). For example, given the below table, returns for the week starting 7/01/2018 is calculated by: (6122.3-6065.1)/ 6065.1=0.009431. You can rename this variable as “RET”. You can also create lagged returns (RETLAG) as this is just the return from the previous week:
Date
Open
RET
RETLAG
31/12/2017
6065.1
7/01/2018
6122.3
0.009431
14/01/2018
6070.1
-0.00853
0.009431
21/01/2018
6005.8
-0.01059
-0.00853
ABOVE is the example ^
Present your data graphically and discuss the results. Please explain whether transformation/adjustment/decomposition is needed for your data. Plot the company returns ACF. Do the returns look like white noise? Explain.