[R] new to R coding.

tynashy tynashy at yahoo.co.uk
Mon Oct 24 17:44:51 CEST 2011


how do I code the following in R. I want to produce a vector where dx=log(
(d(x))/(d(x-1)) ). I can do it for dx=diff(log(x)). I am learning/trying to
model log returns of a stock market index. But instead of using the
difference of the closing values of two consecutive days, i want to use the
log of the quotient of the two days. any help is most appreciated. d is a
vector of the closing values of the stock market index of length 5000.

--
View this message in context: http://r.789695.n4.nabble.com/new-to-R-coding-tp3933588p3933588.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list