[R] Problem with get.hist.quote() in tseries

From: Ajay Narottam Shah <ajayshah_at_mayin.org>
Date: Fri 19 Aug 2005 - 15:17:20 EST


When using get.hist.quote(), I find the dates are broken. This is with R 2.1.1 on Mac OS X `panther'.

> library(tseries)

Loading required package: quadprog

    'tseries' version: 0.9-27

    'tseries' is a package for time series analysis and computational     finance.

    See 'library(help="tseries")' for details.

> x <- get.hist.quote("^VIX")

trying URL 'http://chart.yahoo.com/table.csv?s=^VIX&a=0&b=02&c=1991&d=7&e=18&f=2005&g=d&q=q&y=0&z=^VIX&x=.csv' Content type 'text/csv' length unknown
opened URL

.......... .......... .......... .......... ..........
.......... .......... .......... .......... ..........
.......... .......... .......... .......... ..........

downloaded 150Kb

> head(x)

[1] 26.62 27.93 27.19 NA NA 28.95
> x[1:10,]

       Open High Low Close

 [1,] 26.62 26.62 26.62 26.62
 [2,] 27.93 27.93 27.93 27.93
 [3,] 27.19 27.19 27.19 27.19
 [4,]    NA    NA    NA    NA
 [5,]    NA    NA    NA    NA
 [6,] 28.95 28.95 28.95 28.95
 [7,] 30.38 30.38 30.38 30.38
 [8,] 33.30 33.30 33.30 33.30
 [9,] 31.33 31.33 31.33 31.33

[10,] 32.63 32.63 32.63 32.63
> plot(x)

  (dates don't show).
> str(x)

 mts [1:5343, 1:4] 26.6 27.9 27.2 NA NA ...

I wonder what I'm doing wrong.

-- 
Ajay Shah                                                   Consultant
ajayshah@mayin.org                      Department of Economic Affairs
http://www.mayin.org/ajayshah           Ministry of Finance, New Delhi

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Fri Aug 19 15:25:34 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:39:54 EST