[R-SIG-Finance] Intraday data using RBloomberg?
Vickie Guo
vickie.guo at gmail.com
Wed Dec 14 00:26:36 CET 2011
Hello,
Could someone please provide some suggestion on how to get intraday
data by using RBloomberg? I tried to follow the instruction from
RBloomberg manual but got errors and had no ideas on what it means/how
to solve it. Any information will be highly appreciated and thank you
very much for the help!
Best,
Vickie
Here is what I got:
> library(RBloomberg)
Loading required package: rJava
> conn = blpConnect()
R version 2.12.2 (2011-02-25)
rJava Version 0.9-2
RBloomberg Version 0.4-150
Java environment initialized successfully.
Looking for most recent blpapi3.jar file...
Adding C:\blp\API\APIv3\JavaAPI\v3.4.3.2\lib\blpapi3.jar to Java classpath
Bloomberg API Version 3.4.3.2
> bdh(conn,"AAPL US Equity", "PX_LAST", "20090101", "20090107")
date PX_LAST
2009-01-02 2009-01-02 90.75
2009-01-05 2009-01-05 94.58
2009-01-06 2009-01-06 93.02
2009-01-07 2009-01-07 91.01
> bar(conn, "AAPL US Equity", "TRADE", "2011-12-21 09:00:00.000", "2011-12-21 15:00:00.000", "60")
Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, :
org.findata.blpwrapper.WrapperException: response error: Invalid
start date specified [nid:110]
After I changed the starting date, I got:
> bar(conn, "AAPL US Equity", "TRADE", "2011-12-21 09:00:00", "2011-12-21 15:00:00", "6")
Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, :
java.lang.ArrayIndexOutOfBoundsException: 6
More information about the R-SIG-Finance
mailing list