Jib.jl icon indicating copy to clipboard operation
Jib.jl copied to clipboard

past and future stock options prices ?

Open ihiasi opened this issue 5 years ago • 1 comments

Hi - is it possible to have an example of how would I get past and future stock options prices ? Thank you.

ihiasi avatar Jun 17 '20 17:06 ihiasi

Just define the appropriate Contract and pass it to reqHistoricalData(). For a stock option something along these lines:

opt = Jib.Contract(symbol="GOOG", secType="OPT", currency="USD", exchange="SMART")
opt.lastTradeDateOrContractMonth = "20200717" # expiration
opt.strike = 1450     # strike price
opt.right = "C"       # call

Check IB docs for more contract examples. However, keep in mind that, except for forex and commodities, you need a paid subscription to be able to download pretty much any other historical data.

lbilli avatar Jun 18 '20 14:06 lbilli