Repository navigation
v0.6.0
Added
OptionScreenerandOptionField(#53): option chains from the TradingView options scanner, for one or more underlyings.- Greeks (delta, gamma, theta, vega, rho), implied volatility (mid, bid, ask), theoretical price, bid/ask
- Expiration is returned as a datetime; expiration filters accept dates, ISO strings or
YYYYMMDDintegers - Works for US equities and ETFs (
NASDAQ:AAPL,AMEX:SPY), indices (SP:SPX) andNSE:NIFTY
get_iv_term_structure(symbol)(#53): implied volatility by time to expiration, one point per listed expiration plus standard tenors (1w to 1y).
import tvscreener as tvs
opts = tvs.OptionScreener("NASDAQ:AAPL")
opts.where(tvs.OptionField.OPTION_TYPE == "call")
opts.where(tvs.OptionField.DELTA.between(0.4, 0.6))
df = opts.get()
ts = tvs.get_iv_term_structure("NASDAQ:AAPL")Notes: implied volatilities are fractions (0.27 = 27%). The options scanner does not return last price, volume or open interest. See the Option Screener docs.
Full suite: 168 tests and 2 subtests passed.