[R-SIG-Finance] Speed of processing a bdh call using Rbloomberg

John Laing john.laing at gmail.com
Thu Oct 6 19:42:10 CEST 2011


Aidan,

Sorry for the delayed response.

Your code runs pretty quickly for me:

> system.time(funda<-bdh(conn, tickers, fields, start.date,end.date,option_names = o_names, option_values = o_values))
   user  system elapsed
   2.35    0.14    5.05

This is on a Windows XP VM, 3.5GB memory. Is it possible a slow
network connection is to blame?

John

On Thu, Oct 6, 2011 at 12:39 PM, Aidan Corcoran
<aidan.corcoran11 at gmail.com> wrote:
> Dear Ulrich,
>
> thanks for your suggestion to cache the results, speeding up future calls.
>
> Unfortunately I would like to retrieve large amounts of fairly random
> data, rather than repeatedly retrieving data that overlap with
> previous requests, so caching wouldn't help much.
>
> It seems there are no other suggestions to improve speed, which
> suggests at least I am not missing anything obvious (or doing anything
> stupid!).
>
> Thanks for your help.
> Aidan
>
> On Sat, Oct 1, 2011 at 6:20 PM, Ulrich Staudinger <ustaudinger at gmail.com> wrote:
>> cache it after downloading and fetch only the update?
>> regards
>> ulrich
>>
>>
>> --
>> comnect on xing or linkedin
>>
>> On 01.10.2011, at 18:43, Aidan Corcoran <aidan.corcoran11 at gmail.com> wrote:
>>
>>> Dear list,
>>>
>>> When I run a bdh call which requests three years of quarterly data on
>>> two items for 48 companies (giving a 601x4 data frame), the call takes
>>> about two minutes to complete. I would like to run bigger requests, so
>>> speed is a bit of an issue. Is there anything I can do to improve the
>>> speed? Code below. I have a PC running Windows 7, 4gb of RAM and a
>>> 3Ghz processor, if that matters. Java version is 1.6.0_26.
>>>
>>> Thanks in advance
>>> Aidan
>>>
>>> conn <- blpConnect()
>>> R version 2.13.0 (2011-04-13)
>>> rJava Version 0.9-1
>>> 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
>>> daysback<-3*365
>>> start.date <- as.POSIXct(Sys.Date()-daysback)
>>> end.date <- as.POSIXct(Sys.Date())
>>> tickers<- c("ACA FP Equity", "ALPHA GA Equity", "BAER VX Equity",
>>> "BARC LN Equity", "BBVA SQ Equity", "BCP PL Equity", "BCVN SE Equity",
>>> "BES PL Equity",
>>> "BKIR ID Equity", "BKT SQ Equity", "BMPS IM Equity", "BNP FP Equity",
>>> "BP IM Equity", "BPE IM Equity", "BPSO IM Equity", "CABK SQ Equity",
>>> "CBK GY Equity", "CRG IM Equity", "CSGN VX Equity", "DANSKE DC Equity",
>>> "DBK GY Equity", "DEXB BB Equity", "DNBNOR NO Equity", "EBS AV Equity",
>>> "ETE GA Equity", "GLE FP Equity", "HSBA LN Equity", "ISP IM Equity",
>>> "JYSK DC Equity", "KBC BB Equity", "KN FP Equity", "LLOY LN Equity",
>>> "MB IM Equity", "NDA SS Equity", "POH1S FH Equity", "POP SQ Equity",
>>> "RBI AV Equity", "RBS LN Equity", "SAB SQ Equity", "SAN SQ Equity",
>>> "SEBA SS Equity", "SHBA SS Equity", "STAN LN Equity", "SWEDA SS Equity",
>>> "SYDB DC Equity", "TPEIR GA Equity", "UBI IM Equity", "UBSN VX Equity",
>>> "UCG IM Equity", "VATN SE Equity")
>>> fields<-c("best_sales","best_ebitda")
>>> o_names = "periodicitySelection"
>>> o_values = "QUARTERLY"
>>> funda<-bdh(conn, tickers, fields, start.date,end.date,option_names =
>>> o_names, option_values = o_values)
>>>
>>>
>>> sessionInfo()
>>> R version 2.13.0 (2011-04-13)
>>> Platform: i386-pc-mingw32/i386 (32-bit)
>>>
>>> locale:
>>> [1] LC_COLLATE=English_Ireland.1252  LC_CTYPE=English_Ireland.1252
>>> [3] LC_MONETARY=English_Ireland.1252 LC_NUMERIC=C
>>> [5] LC_TIME=English_Ireland.1252
>>>
>>> attached base packages:
>>> [1] grid      stats     graphics  grDevices utils     datasets  methods
>>> [8] base
>>>
>>> other attached packages:
>>> [1] RBloomberg_0.4-150 rJava_0.9-1        gtools_2.6.2       gdata_2.8.2
>>> [5] ggplot2_0.8.9      proto_0.3-9.2      zoo_1.7-4          reshape_0.8.4
>>> [9] plyr_1.6
>>>
>>> loaded via a namespace (and not attached):
>>> [1] lattice_0.19-23 tools_2.13.0
>>>
>>> _______________________________________________
>>> R-SIG-Finance at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>>> -- Subscriber-posting only. If you want to post, subscribe first.
>>> -- Also note that this is not the r-help list where general R questions should go.
>>
>
> _______________________________________________
> R-SIG-Finance at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
>



More information about the R-SIG-Finance mailing list