finsec.occ_symbology module
Contents
finsec.occ_symbology module#
- finsec.occ_symbology.option_flavor(name: OCCSymbol) str [source]#
Returns option flavor ticker from OCC standardized option name.
Return type should really be typing.Literal[“call”, “put”]
- finsec.occ_symbology.option_format(symbol: str, exp_date: date | datetime | str, strike: float | int, flavor: str) OCCSymbol [source]#
Returns the OCC standardized option name.
- Parameters:
symbol – the underlying symbol, case insensitive
exp_date – date of expiration, in string-form.
strike – strike price of the option
flavor – ‘C’ or ‘call’ or the like, for call, otherwise ‘p’ or ‘Put’ for put
- Returns:
OCC string, like ‘IBM201231C00301000’
- finsec.occ_symbology.option_maturity(name: OCCSymbol) date [source]#
Returns option maturity date from OCC standardized option name.