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.1.2.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

option_util-0.1.2-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: option_util-0.1.2.tar.gz
  • Upload date:
  • Size: 3.5 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.1.2.tar.gz
Algorithm Hash digest
SHA256 33804fff981d1a02f79862056c5c002efa3fa27bdf6560484a1f1b3c3fe5aa9f
MD5 23df1602f2c958e994f58d8c7ea9b84e
BLAKE2b-256 1a1c045f2eafbccb520416fdd70a229242514603007acc26a5f21cc1daa31791

See more details on using hashes here.

File details

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

File metadata

  • Download URL: option_util-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.9 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.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6ea62210da9597152b77505a2a4f25bb31207ca989a932c8508706781f7140e1
MD5 85b341e4407416e4a5804eb4bab70c85
BLAKE2b-256 7becbb8b87fda421cfe7cf959d598e88ae2ce28dde4d673b9719890face220b7

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