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.3.3.tar.gz (7.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

option_util-0.3.3-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: option_util-0.3.3.tar.gz
  • Upload date:
  • Size: 7.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.22

File hashes

Hashes for option_util-0.3.3.tar.gz
Algorithm Hash digest
SHA256 e1e7c491b42d0192ed04dc2dced07e605012cf69ea5192f16e421e7f94419bd0
MD5 c919d90f5dd4b82d40d01a3d75a115f4
BLAKE2b-256 70e07e7cdb9c37c1443d54cf13aa9b6acf8cf4e86e90e2f7f532164e6cafbc04

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for option_util-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 cc89d87db36ae7ff48558f6ebb8176ea03d02f9957b3710cf55d7399e0967eba
MD5 9e14fe4c7937dcf1b2d6300a5efd8380
BLAKE2b-256 3bb1e081df38ea6311df30c7706db5cc4126b71055542b54f6013c66acc78d9a

See more details on using hashes here.

Supported by

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