[R-SIG-Finance] R Bloomberg for intraday prices

algotr8der algotr8der at gmail.com
Wed Apr 4 03:14:28 CEST 2012


Hi Alain - thanks for the suggestion.

I tried to feed the first column of the data frame object created by
RBloomberg  to with_tz() and I got the following error:

> head(SMH)
                                           time  open   high    low close
numEvents volume
2011-09-19T13:30:00.000 2011-09-19T13:30:00.000 30.52 30.550 30.460 30.49      
319 105000
2011-09-19T13:31:00.000 2011-09-19T13:31:00.000 30.48 30.520 30.470 30.50      
198  63700
2011-09-19T13:32:00.000 2011-09-19T13:32:00.000 30.49 30.590 30.480 30.56      
260  98800
2011-09-19T13:33:00.000 2011-09-19T13:33:00.000 30.56 30.610 30.530 30.53      
106  20900
2011-09-19T13:34:00.000 2011-09-19T13:34:00.000 30.53 30.545 30.525 30.53       
89  24900
2011-09-19T13:35:00.000 2011-09-19T13:35:00.000 30.53 30.540 30.495 30.53      
648 159000

> with_tz(SMH[,1], "EST")
Error in UseMethod("reclass_date", orig) : 
  no applicable method for 'reclass_date' applied to an object of class
"character"

> with_tz(SMH[,1], tz="America/New_york")
Error in UseMethod("reclass_date", orig) : 
  no applicable method for 'reclass_date' applied to an object of class
"character"

Firstly, I'm not sure why RBloomberg creates the date/timestamp as follows:

2011-09-19T13:35:00.000

Why attach a 'T' between the date and the time? This type of format looks
very foreign to me and my guess is this is why with_tz returns an exception. 

Any thoughts would be greatly appreciated. Thank you.


--
View this message in context: http://r.789695.n4.nabble.com/R-Bloomberg-for-intraday-prices-tp4261687p4530646.html
Sent from the Rmetrics mailing list archive at Nabble.com.



More information about the R-SIG-Finance mailing list