[R-SIG-Finance] Problems collecting Intraday data

ngottlieb at marinercapital.com ngottlieb at marinercapital.com
Thu Jul 26 19:09:24 CEST 2007


Sam:

Suggest you try using the BLP function in Excel and see what data is coming back.

Most likely some bad data so the function substr is throwing 
an exception. 

Could happen if value in x is null, empty and the thus subscripts for substr, 
as.integer(start) or as.integer(stop), are negative, zero or stop < start.

See what comes back in Excel with BLP call to Bloomberg.
Perhaps even write some VBA code in Excel to test substr
function of values retrieved.

Enjoy debugging! :)

Neil 

-----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 Samuel Kemp
Sent: Tuesday, July 24, 2007 7:35 AM
To: r-sig-finance at stat.math.ethz.ch
Subject: [R-SIG-Finance] Problems collecting Intraday data

Hi,

I have been using the blpGetData() function to fetch intraday High and Low data (10min intervals) i.e.

conn <- blpConnect()
BBCode <- 'VGU7 Index'   # Eurostoxx 50 Futures Sept 07 Contract
Date <- "06/28/07"       # which day
Open <- "07:00:00"	 # from time
Close <- "21:00:00"	 # to time
Interval <- 10		 # time interval between values
dat   <- blpGetData(conn, BBCode, c('LAST_PRICE'),start=as.chron(Date,
Open), end=as.chron(Date,Close),barfields=c('HIGH','LOW'), barsize=Interval)
blpDisconnect(conn)

However, sometimes it works and then sometimes (using exactly the same
inputs) it does not - I get the following error...

Error in substr(x, as.integer(start), as.integer(stop)) : 
        invalid substring argument(s) in substr()

Does anyone have a solution to this problem and/or explanation?

Many thanks in advance,

Sam

p.s. I am not sure if it is relevant but my computer is running XP.


____________________________________________
Samuel Kemp
Predicted Markets Ltd.
t  +44(0)1428 729743
m  +44(0)7880 740220
e  samkemp at predictedmarkets.com
w  www.predictedmarkets.com  

This message is intended solely for the individual addressee named above. If you are not the intended recipient, please delete. The information contained within this e-mail is confidential and may be legally privileged. Messages sent by e-mail may be subject to delays, non-delivery and un-authorised alteration. The information contained herein is from sources thought to be reliable but we do not represent that it is accurate or complete. Therefore, Predicted Markets Limited and its staff cannot be held responsible or liable for the contents of this message. This is not an offer or solicitation to buy and sell any instrument, security or investment. Registered in England No. 5851947. Predicted Markets Limited, Ladybrook, Burgh Hill, Bramshott, Hants GU30 7RQ is Authorised and Regulated by the Financial Services Authority.

_______________________________________________
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.
--------------------------------------------------------

 
 
This information is being sent at the recipient's request or...{{dropped}}



More information about the R-SIG-Finance mailing list