Skip to main content

No project description provided

Project description

option-util

Description

option-util is a simple library to make simple scripts easily available for working with options.

Examples

Return the next expiration by type of expiration.

  • The available options are friday, third_friday, quarter_end, next_bus_day, wednesday, quarter_third_friday.:

    >>> # Return the next expiration by type.
    >>> next_exp_by_type = expirations.next_expiration(
    ...    expiration_type='friday', from_date=datetime(2024,10,27)
    ...    )
    >>> print(f'Next Expiration by Type: {next_exp_by_type}')
    Next Expiration by Type: 2024-11-01

Return the next expiration by all types.:

>>> # Get future expirations
>>> all_expirations = expirations.future_expirations(
...    from_date=datetime(2024, 10, 27)
...)
>>> print(f'Future expirations: {all_expirations}')

Future expirations: {'from_date': datetime.date(2024, 10, 27), 'previous_business_day': datetime.date(2024, 10, 25), 'next_business_day': datetime.date(2024, 10, 28), 'next_friday': datetime.date(2024, 11, 1), 'next_quarter_end': datetime.date(2024, 12, 27), 'next_monthly_expiration': datetime.date(2024, 11, 15), 'next_quarter_third_friday': datetime.date(2024, 12, 20)}

Features

  • Easy access to common scripts

Installation

Install option-util by running:

pip install option-util

Support

Let us know if you have issues.

License

The project is licensed under the BSD license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

option_util-0.2.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

option_util-0.2.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file option_util-0.2.0.tar.gz.

File metadata

  • Download URL: option_util-0.2.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.6 Windows/10

File hashes

Hashes for option_util-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0651fa9321775d1428c432828ac5c2e10f59f3c415fd62357bbcaafa056bedc6
MD5 98cf93c1ef2835ac40e8b3093be1fae7
BLAKE2b-256 d1f637d893097287d062ffd1a03cf5a0588ff681e64def64ed4465cb9926a283

See more details on using hashes here.

File details

Details for the file option_util-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: option_util-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.6 Windows/10

File hashes

Hashes for option_util-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 70075dbc4bca0bdb1b915ab205f5e5dd3435d66d4503e15a026078150e723bd3
MD5 07d64d12463945dafd10fd1761765ab0
BLAKE2b-256 d11a400bd69f380a4574ad00aba386bf1725d330b1dd4067a25c55dc4bf7f767

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page