我正在从互动经纪商那里提取大约50 etfs的股权和期权数据。一些ETF(例如EEM)只会继续运行,而不会返回期权数据的结果。有人对此有疑问吗?我联系了IB,他们告诉我没有提出“ EEM”看涨期权和看跌期权的请求。
equity = twsEquity("EEM")
equity_dat = reqMktData(tws, Contract = equity, eventWrapper =
eWrapper.data(1), CALLBACK = snapShot)
strike = round(equity_dat$AskPrice, 0)
opt_put = twsOPT("", symbol = "EEM", right = "PUT", strike =
as.character(39), expiry = expiry)
opt_call = twsOPT("", symbol = "EEM", right = "CALL", strike =
as.character(39), expiry = expiry)
opt_data_put = reqMktData(tws, Contract = opt_put, eventWrapper =
eWrapper.data(1), CALLBACK = snapShot)
opt_data_call = reqMktData(tws, Contract = opt_call, eventWrapper =
eWrapper.data(1), CALLBACK = snapShot)