Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add utility functions for options/futures options exp dates #123

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

Graeme22
Copy link
Contributor

@Graeme22 Graeme22 commented Feb 6, 2024

Description

Adds new utility functions to calculate monthly expiration dates for options and options on futures.

  • get_third_friday: Gets the third Friday of the given date, which corresponds to the monthly for that date.
  • get_tasty_monthly: Returns the monthly expiration closest to 45 days to expiration (for the Tastytraders out there!)
  • get_future_fx_monthly: Returns the monthly expiration for FX futures options for the given month.
  • get_future_treasury_monthly: Returns the monthly expiration for treasury futures options for the given month.
  • get_future_metal_monthly: Returns the monthly expiration for metals futures options for the given month.
  • get_future_grain_monthly: Returns the monthly expiration for grain futures options for the given month.

Pre-merge checklist

  • Passing tests LOCALLY
  • New tests added (if applicable)

Please note that, in order to pass the tests, you'll need to set up your Tastytrade credentials as repository secrets on your local fork. Read more at CONTRIBUTING.md.

@Graeme22 Graeme22 merged commit 27a3869 into master Feb 7, 2024
1 check failed
@Graeme22 Graeme22 deleted the exp-util branch February 7, 2024 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant