Skip to main content

OptionLab

OptionLab

This package is a lightweight library designed to provide quick evaluation of options trading strategies. It produces various outputs:

  • the profit/loss profile of the strategy on a user-defined target date

  • the range of stock prices for which the strategy is profitable (i.e., generating a return of at least $0.01)

  • the Greeks (delta, theta, rho, vega and gamma) associated with each leg of the strategy

  • the resulting debit or credit on the trading account

  • the maximum and minimum returns within a specified lower and higher price range of the underlying asset

  • The expected profit when the strategy is profitable and the expected loss if it proves unprofitable

  • the strategy's probability of profit.

Contact

If you have any questions, corrections, comments or suggestions, just drop a message.

You can also reach me on Linkedin or follow me on X.

[!NOTE] If you want to support this and other open source projects that I maintain, become a sponsor on Github.

Installation

The easiest way to install OptionLab is using pip:

pip install optionlab

Documentation

You can access the API documentation for OptionLab on the project's GitHub Pages site.

Contributions

Contributions are definitely welcome. However, it should be mentioned that this repository uses poetry as a package manager and git hooks with pre-commit to customize actions on the repository. Source code must be formatted using black.

Disclaimer

This is free software and is provided as is. The author makes no guarantee that its results are accurate and is not responsible for any losses caused by the use of the code.

Bugs can be reported as issues.

[!CAUTION] Options are very risky derivatives and, like any other type of financial vehicle, trading options requires due diligence. This code is provided for educational and research purposes only.

Download files

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

Source Distribution

optionlab-1.7.0.tar.gz (31.7 kB view details)

Uploaded Source

Built Distribution

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

optionlab-1.7.0-py3-none-any.whl (34.1 kB view details)

Uploaded Python 3

File details

Details for the file optionlab-1.7.0.tar.gz.

File metadata

  • Download URL: optionlab-1.7.0.tar.gz
  • Upload date:
  • Size: 31.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.10.8 Linux/6.17.0-1018-azure

File hashes

Hashes for optionlab-1.7.0.tar.gz
Algorithm Hash digest
SHA256 44914b0a5902b9f1503e1b1842d46e5691ea7aeb5b1683e5072f780f69f495c1
MD5 6fb18e30614377ba05b153b0462fedaa
BLAKE2b-256 ca23ab2f41e800a9caacc9bd136ebc3d4e8871bc3b20af0a100d072939c19592

See more details on using hashes here.

File details

Details for the file optionlab-1.7.0-py3-none-any.whl.

File metadata

  • Download URL: optionlab-1.7.0-py3-none-any.whl
  • Upload date:
  • Size: 34.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.10.8 Linux/6.17.0-1018-azure

File hashes

Hashes for optionlab-1.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d1f6f69478ad9caa476b9c78eb6c58291dd3eea9188ea040a6c01a9f912b08c4
MD5 211ff3b0e4173034b9ca6176f9b6fe80
BLAKE2b-256 21e73054fcfe31b145271371528138ea2ab944261a8e80772438bbf01b2b2c34

See more details on using hashes here.

Release history Release notifications | RSS feed

1.8.5

2 files

1.8.0

2 files

This release

1.7.0 This release

2 files

1.6.3

2 files

1.6.0

2 files

1.5.1

2 files

1.5.0

2 files

1.4.3

2 files

1.4.2

2 files

1.4.1

2 files

1.3.2

2 files

1.3.1

2 files

1.3.0

2 files

1.2.1

2 files

1.2.0

2 files

1.1.0

2 files

1.0.1

2 files

1.0.0

2 files

0.2.0

2 files

0.1.7

1 file

0.1.6

1 file

0.1.5

1 file

0.1.1

1 file

0.1

1 file

Supported by

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