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.
Metadata
Release files for option-util 0.3.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| option_util-0.3.4.tar.gz | 7.7 MB | Without provenance | Details for option_util-0.3.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| option_util-0.3.4-py3-none-any.whl | Python 3 | none | any | Details for option_util-0.3.4-py3-none-any.whl |
Total release size: 7.7 MB
Release files / option_util-0.3.4.tar.gz
| Download URL | option_util-0.3.4.tar.gz |
|---|---|
| Size | 7.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6a4dd442c252ba14588000a9959401ab052ec3541aa178be50ceb942a42a3611
|
|
BLAKE2b-256 checksum How to use checksums |
c3a06c313850b3e794fd34c67e5fc5796bc1b65ce695afa8399cd7b170b3e06f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.22
|
Release files / option_util-0.3.4-py3-none-any.whl
| Download URL | option_util-0.3.4-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0c2a71323a109a232bba11bfb2ad78c836c862532f7509f845f3625e938fc9a7
|
|
BLAKE2b-256 checksum How to use checksums |
f7f8aeb22a9d95419c7d230f6570d946d570fcc19febc6d3c9e3a2905a110c55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.22
|
Security for option-util 0.3.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.