[R-SIG-Finance] problem with getting Historical data for futures using I Brokers package
Enrico Schumann
enricoschumann at yahoo.de
Mon Jun 13 13:21:49 CEST 2011
try adding "include_expired = '1'" to the contract definition; see
?twsContract
regards, enrico
> -----Ursprüngliche Nachricht-----
> Von: r-sig-finance-bounces at r-project.org
> [mailto:r-sig-finance-bounces at r-project.org] Im Auftrag von
> Gautam Garg
> Gesendet: Montag, 13. Juni 2011 11:53
> An: r-sig-finance at r-project.org
> Betreff: [R-SIG-Finance] problem with getting Historical data
> for futures using I Brokers package
>
> Hi ,
> I am trying to get historical data for futures using I
> brokers package. I am able to do so with the expiry dates
> which are yet to come but not for the dates that have passed.
>
> Below is my code :
>
> >
> t<-twsFUT(symbol="III",exch="NSE",expiry="201106",currency="INR")
> > abb <- reqHistoricalData(tws,t ,file="III.csv" ,bar="1
> day", dur="5
> D")
> waiting for TWS reply on III .... done.
>
>
> but if the write the code below:
> >
> t<-twsFUT(symbol="III",exch="NSE",expiry="201105",currency="INR")
> > abb <- reqHistoricalData(tws,t ,file="LT.csv" ,bar="1 day",
> > dur="5
> > D")
> TWS Message: 2 -1 2107 HMDS data farm connection is inactive
> but should be available upon demand.hkhmds2 waiting for TWS
> reply on III ....failed.
> Warning message:
> In errorHandler(con, verbose, OK = c(165, 300, 366, 2104, 2106, :
> No security definition has been found for the request
>
>
>
>
> What is that I am missing?
> Thanks in advance
> Gautam Garg
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/problem-with-getting-Historical-
> data-for-futures-using-I-Brokers-package-tp3593480p3593480.html
> Sent from the Rmetrics mailing list archive at Nabble.com.
>
> _______________________________________________
> 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