[R-SIG-Finance] retrieving option info from IB

Wind windspeedo99 at gmail.com
Thu Jun 4 16:54:39 CEST 2009


Thanks Jeff.

On Thu, Jun 4, 2009 at 10:28 PM, Jeff Ryan <jeff.a.ryan at gmail.com> wrote:
>
> Hi Wind,
>
> ........
> With respect to the contract information, that is really hit or miss.
> I'll look into creating a 'best practices' or FAQ to help pool our
> collective wisdom --- maybe a simple wiki would be a good start.

That's a great idea.

>
> The newest quantmod has a function called "getOptionChain" which pulls
> from Yahoo.  Obviously yahoo data caveats apply, but it is a decent
> start to getting snapshots.

The only problem with yahoo data is that it only provide options on
stocks.  Not options on futures.
By the way, I have seen people sell their matlab program with the same
function for $19.99. :)

>
> More documentation for IBrokers and quantmod is coming, as well as a
> presentation at the upcoming Rmetrics conference in Switzerland.  For
> those not signed up yet, take a look at www.rmetrics.org for more
> information.
>
> HTH,
> Jeff
>
> On Thu, Jun 4, 2009 at 9:10 AM, Wind <windspeedo99 at gmail.com> wrote:
> > I have successfully retrieved price info from IB via IBrokers for stocks and
> > simple options.  The package is very efficient.Yet I could not get info on
> > future option.
> >
> >> oc<-reqContractDetails(tws, twsOption(local="", right="",symbol="QQQQ"))
> >> length(oc)
> > [1] 1018
> >> oc<-reqContractDetails(tws, twsOption(local="",right="",symbol="GC"))
> > Error in reqContractDetails(tws, twsOption(local = "", right = "", symbol =
> > "GC")) :
> >  Unable to complete ContractDetails request
> >> oc<-reqContractDetails(tws,
> > twsOption(local="",right="",exch="NYMEX",symbol="GC"))
> > Error in reqContractDetails(tws, twsOption(local = "", right = "", exch =
> > "NYMEX",  :
> >  Unable to complete ContractDetails request
> >
> > By the way, how could we retrieving the option chain,  just the current bid,
> > ask, and size.  A snap shot only.
> >  I have only find functions for data feed and historical data download.
> >
> > Any suggestion would be appreciated.
> >
> > Wind
> >
> >        [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > 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.
> >
>
>
>
> --
> Jeffrey Ryan
> jeffrey.ryan at insightalgo.com
>
> ia: insight algorithmics
> www.insightalgo.com



More information about the R-SIG-Finance mailing list