Displaying 1 result from an estimated 1 matches for "goog1".
Did you mean:
goog
2011 Nov 20
2
Continuasly Compunded Returns with quantmod-data
Hey guys,
i want to calculate the continuasly compounded returns for stock prices.
Formula for CCR:
R_t = ln(P_t/P_{t-1})*100
With R:
First i have to modify the vectors, so that they have the same length
and we start at the second observation.
log(GOOG1[-1]/GOOG1[1:length(GOOG1)-1])*100
That does work with normal vectors.
My Questions:
1) I want to use this for stock prices.
so i use:
library(quantmod)
getSymbols("GOOG",from="2011-11-01")
GOOG1<-GOOG[,1]
If i use my formula i get only the value "1" for ev...