i have a dataset in which i have daily stock prices of three companies since 2010.
I have to calculate the daily returns of each one of them in this form:
return = [ stock price (t) - sock price (t-1) ] / [ stock price (t-1) ]
and store them each in a new column -> Retrun A, Return B, Return C.
I dont know how to use the dataset and calculate it. It is important, please help me
PLEASE HELP ME. I HAVE NO IDEA. I have never done R before