Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

Show me the the code in R Programming language. Import the sp.csv file. Question a : Calculate the correlation between daily Adjusted Close (`Adj...

Show me the the code in R Programming language.

Import the sp.csv file.

Question a: Calculate the correlation between daily Adjusted Close (`Adj Close`) and the Volume.

Question b: Create a new variable return, defined as the percentage change of a day's Adjusted Close compared to last trading day's Adjusted Close. That is, return(t) = 100* (Adj Close(t) - Adj Close(t-1))/Adj Close(t-1). 

Calculate the five number summaryof the return using the summary() function.

Hint: The easiest way to get the previous trading day's Adj Close value is using the lag() function in the tidyverse package. Import the package first before using the lag() function.

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question