Monthly Returns

I have my Stock price, and the NASDAQ price for 5 years, I would like to calculate monthly returns for 1 year, 3 year, 5 year. Then Run a CAPM SLR for those 3 times, I am a beginner to R script and need a little guidance.

I think we need a see your code and some sample data.

A handy way to supply some sample data is the dput() function. In the case of a large dataset something like dput(head(mydata, 100)) should supply the data we need. Just do dput(mydata) where mydata is your data. Copy the output and paste it here.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.