[R-sig-Finance] zoo object -> ts object
Gabor Grothendieck
ggrothendieck at gmail.com
Fri May 19 00:13:41 CEST 2006
On 5/18/06, nop27392 at mail.telepac.pt <nop27392 at mail.telepac.pt> wrote:
> Dear all,
>
> I obtained data from the net using
>
> get.hist.quote(instrument = "^DJI", start = "1995-01-01", end = "2004-12-31",
> quote = "Close")
>
> as suggested n this discussion. The result is a zoo object. How to transform it
> in time series object in order to perform log-return etc?
>
In addition to what Achim already mentioned
- note the retclass= argument on get.hist.quote
- note that in addition to the vignette Achim mentioned there is a
second vignette
vignette("zoo-quickref")
that specifically has examples of log returns.
- Ajay Shah's web site has some useful examples:
http://www.mayin.org/ajayshah/KB/R/index.html
More information about the R-SIG-Finance
mailing list