Option Date Utilities

These are a collection of functions for determining when the current options cycle expires (3rd Friday of most months) and for calculating historical option expiration dates.

Tip

If you need to automate looking up the current option cycle expiration, then please checkout using the script:

/opt/sa/analysis_engine/scripts/print_next_expiration_date.py
2018-10-19
analysis_engine.options_dates.get_options_for_years(years=['2014', '2015', '2016', '2016', '2017', '2018', '2019', '2020', '2021', '2022'])[source]
Parameters:
  • years – number of years back
  • months – number of months to build year
analysis_engine.options_dates.historical_options(years=['2014', '2015', '2016', '2017', '2018', '2019', '2020', '2021', '2022', '2023', '2024', '2025', '2026', '2027', '2028'])[source]
Parameters:years – years to build
analysis_engine.options_dates.get_options_between_dates(start_date, end_date)[source]
Parameters:
  • start_date – start date
  • end_date – end date
analysis_engine.options_dates.option_expiration(date=None)[source]
Parameters:date – date to find the current expiration
analysis_engine.options_dates.get_options_for_today()[source]

Get a list of option expiration nodes where the last cell has the current option cycle’s expiration date.