An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20070703/eb5e0b0b/attachment.pl
Intraday data with RBloomberg
6 messages · davidr at rhotrading.com, Ian Seow, Dirk Eddelbuettel
Hi, I'm currently trying to implement an intraday currency model using a live feed from bloomberg. I hit the following error when I attempt to download intraday 2 min ticks:
usdjpy=blpGetData(conn,securities='USDJPY Curncy',fields=c('BID','ASK'), start= as.chron(Sys.time()-6000), end=as.chron(Sys.time()),barsize=2, barfields='OPEN')
usdjpy
BID.OPEN ASK.OPEN (07/03/07 15:01:45) NA NA blpGetData works fine for historical price data and seems to work fine for commodity futures ( e.g. the example above works fine for ED1 Comdty), so I'm puzzled why this function does not return a result for Curncy. I double-checked the "USDJPY Curncy" intraday bloomberg API feed in excel and it works. Also, is it a good idea in general to avoid implementing such models in R? Would C/C++ be a better alternative? Any ideas / insights would be greatly appreciated! Thanks. Best Regards Ian Seow
Almost there! You just have to set the barfields; see the example at the end of ?blpGetData. HTH, David L. Reiner Rho Trading Securities, LLC 550 W. Jackson Blvd #1000 Chicago, IL 60661-5704 312-244-4610 direct 312-244-4500 main 312-244-4501 fax -----Original Message----- From: r-sig-finance-bounces at stat.math.ethz.ch [mailto:r-sig-finance-bounces at stat.math.ethz.ch] On Behalf Of Ian Seow Sent: Tuesday, July 03, 2007 2:25 AM To: r-sig-finance at stat.math.ethz.ch Subject: [R-SIG-Finance] Intraday data with RBloomberg Hi, I'm currently trying to implement an intraday currency model using a live feed from bloomberg. I hit the following error when I attempt to download intraday 2 min ticks:
usdjpy=blpGetData(conn,securities='USDJPY
Curncy',fields=c('BID','ASK'), start= as.chron(Sys.time()-6000),
end=as.chron(Sys.time()),barsize=2, barfields='OPEN')
usdjpy
BID.OPEN ASK.OPEN (07/03/07 15:01:45) NA NA blpGetData works fine for historical price data and seems to work fine for commodity futures ( e.g. the example above works fine for ED1 Comdty), so I'm puzzled why this function does not return a result for Curncy. I double-checked the "USDJPY Curncy" intraday bloomberg API feed in excel and it works. Also, is it a good idea in general to avoid implementing such models in R? Would C/C++ be a better alternative? Any ideas / insights would be greatly appreciated! Thanks. Best Regards Ian Seow _______________________________________________ R-SIG-Finance at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance -- Subscriber-posting only. -- If you want to post, subscribe first.
Hi David, that doesn't seem to work either. In the example below, I cut and paste the example from ?blpGetData, replacing only the security field with 'USDJPY Curncy'. Notice that the example works great when we use 'ED1 Comdty'. Also, when I try the historical data example, it works great for USDJPY Curncy daily prices. I'm totally stumped.
edc=blpGetData(conn,'USDJPY Curncy', c('BID','ASK'), start=as.chron(Sys.time()-3600), barfields='OPEN', barsize=2)
edc
BID.OPEN ASK.OPEN (07/04/07 07:46:10) NA NA
edc=blpGetData(conn,'ED1 Comdty', c('BID','ASK'), start=as.chron(Sys.time()-3600), barfields='OPEN', barsize=2)
edc
BID.OPEN ASK.OPEN (07/03/07 22:38:00) 94.660 94.665 (07/03/07 22:40:00) 94.660 94.665 (07/03/07 22:42:00) 94.660 94.665 (07/03/07 22:44:00) 94.660 94.665 (07/03/07 22:46:00) 94.660 94.665 (07/03/07 22:48:00) 94.660 94.665 (07/03/07 22:50:00) 94.660 94.665 (07/03/07 22:52:00) 94.660 94.665 (07/03/07 22:54:00) 94.660 94.665 (07/03/07 22:56:00) 94.660 94.665 (07/03/07 22:58:00) 94.660 94.665 etc....
On 7/3/07, davidr at rhotrading.com <davidr at rhotrading.com> wrote:
Almost there! You just have to set the barfields; see the example at the end of ?blpGetData. HTH, David L. Reiner Rho Trading Securities, LLC 550 W. Jackson Blvd #1000 Chicago, IL 60661-5704 312-244-4610 direct 312-244-4500 main 312-244-4501 fax -----Original Message----- From: r-sig-finance-bounces at stat.math.ethz.ch [mailto:r-sig-finance-bounces at stat.math.ethz.ch] On Behalf Of Ian Seow Sent: Tuesday, July 03, 2007 2:25 AM To: r-sig-finance at stat.math.ethz.ch Subject: [R-SIG-Finance] Intraday data with RBloomberg Hi, I'm currently trying to implement an intraday currency model using a live feed from bloomberg. I hit the following error when I attempt to download intraday 2 min ticks:
usdjpy=blpGetData(conn,securities='USDJPY
Curncy',fields=c('BID','ASK'), start= as.chron(Sys.time()-6000),
end=as.chron(Sys.time()),barsize=2, barfields='OPEN')
usdjpy
BID.OPEN ASK.OPEN (07/03/07 15:01:45) NA NA blpGetData works fine for historical price data and seems to work fine for commodity futures ( e.g. the example above works fine for ED1 Comdty), so I'm puzzled why this function does not return a result for Curncy. I double-checked the "USDJPY Curncy" intraday bloomberg API feed in excel and it works. Also, is it a good idea in general to avoid implementing such models in R? Would C/C++ be a better alternative? Any ideas / insights would be greatly appreciated! Thanks. Best Regards Ian Seow
_______________________________________________ R-SIG-Finance at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance -- Subscriber-posting only. -- If you want to post, subscribe first.
1 day later
I can verify similar behavior. I can get the data via VBA behind Excel. Between versions of Bloomberg and R and the difficulty I seem to have getting RDCOMClient installed correctly, I have sort of given up on this approach, unfortunately so, since it seems so useful. I pretty much use VBA/Excel or C# to generate text files to read into R. David L. Reiner Rho Trading Securities, LLC 550 W. Jackson Blvd #1000 Chicago, IL 60661-5704 312-244-4610 direct 312-244-4500 main 312-244-4501 fax -----Original Message----- From: Ian Seow [mailto:ianseow at gmail.com] Sent: Tuesday, July 03, 2007 6:53 PM To: David Reiner <davidr at rhotrading.com> Cc: r-sig-finance at stat.math.ethz.ch Subject: [SPAM] - Re: [R-SIG-Finance] Intraday data with RBloomberg - Email found in subject Hi David, that doesn't seem to work either. In the example below, I cut and paste the example from ?blpGetData, replacing only the security field with 'USDJPY Curncy'. Notice that the example works great when we use 'ED1 Comdty'. Also, when I try the historical data example, it works great for USDJPY Curncy daily prices. I'm totally stumped.
edc=blpGetData(conn,'USDJPY Curncy', c('BID','ASK'),
start=as.chron(Sys.time()-3600), barfields='OPEN', barsize=2)
edc
BID.OPEN ASK.OPEN (07/04/07 07:46:10) NA NA
edc=blpGetData(conn,'ED1 Comdty', c('BID','ASK'),
start=as.chron(Sys.time()-3600), barfields='OPEN', barsize=2)
edc
BID.OPEN ASK.OPEN (07/03/07 22:38:00) 94.660 94.665 (07/03/07 22:40:00) 94.660 94.665 (07/03/07 22:42:00) 94.660 94.665 (07/03/07 22:44:00) 94.660 94.665 (07/03/07 22:46:00) 94.660 94.665 (07/03/07 22:48:00) 94.660 94.665 (07/03/07 22:50:00) 94.660 94.665 (07/03/07 22:52:00) 94.660 94.665 (07/03/07 22:54:00) 94.660 94.665 (07/03/07 22:56:00) 94.660 94.665 (07/03/07 22:58:00) 94.660 94.665 etc....
On 7/3/07, davidr at rhotrading.com <davidr at rhotrading.com> wrote:
Almost there! You just have to set the barfields; see the example at
the
end of ?blpGetData. HTH, David L. Reiner Rho Trading Securities, LLC 550 W. Jackson Blvd #1000 Chicago, IL 60661-5704 312-244-4610 direct 312-244-4500 main 312-244-4501 fax -----Original Message----- From: r-sig-finance-bounces at stat.math.ethz.ch [mailto:r-sig-finance-bounces at stat.math.ethz.ch] On Behalf Of Ian Seow Sent: Tuesday, July 03, 2007 2:25 AM To: r-sig-finance at stat.math.ethz.ch Subject: [R-SIG-Finance] Intraday data with RBloomberg Hi, I'm currently trying to implement an intraday currency model using a live feed from bloomberg. I hit the following error when I attempt to download intraday 2 min ticks:
usdjpy=blpGetData(conn,securities='USDJPY
Curncy',fields=c('BID','ASK'), start= as.chron(Sys.time()-6000),
end=as.chron(Sys.time()),barsize=2, barfields='OPEN')
usdjpy
BID.OPEN ASK.OPEN (07/03/07 15:01:45) NA NA blpGetData works fine for historical price data and seems to work fine for commodity futures ( e.g. the example above works fine for ED1 Comdty), so I'm puzzled why this function does not return a result for Curncy. I double-checked the "USDJPY Curncy" intraday bloomberg API feed in excel and it works. Also, is it a good idea in general to avoid implementing such models in R? Would C/C++ be a better alternative? Any ideas / insights would be greatly appreciated! Thanks. Best Regards Ian Seow
_______________________________________________ R-SIG-Finance at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance -- Subscriber-posting only. -- If you want to post, subscribe first.
On 5 July 2007 at 09:56, davidr at rhotrading.com wrote:
| I can verify similar behavior. | I can get the data via VBA behind Excel. | Between versions of Bloomberg and R and the difficulty I seem to have | getting RDCOMClient installed correctly, I have sort of given up on this | approach, unfortunately so, since it seems so useful. I pretty much use | VBA/Excel or C# to generate text files to read into R. Well, the C/C++ code I wrote two employers ago, and which is hence still owned by that firm and hence no shareable, worked pretty well. It shouldn't take too long to rewrite this, starting from the Bloomberg C API examples. As I don't currently use or need Bloomberg, I can't help. Maybe somebody else can though. Dirk
Hell, there are no rules here - we're trying to accomplish something.
-- Thomas A. Edison