Skip to main content

Python library for evaluating options trading strategies

Project description

OptionLab

OptionLab

This package is a lightweight library written entirely in Python, designed to provide quick evaluation of option strategy ideas.

The code produces various outputs, including 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 greater than $0.01), the Greeks associated with each leg of the strategy using the Black-Sholes model, 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, and an estimate of the strategy's probability of profit.

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. When I have some free time, which is rare, I publish articles on Medium.

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.

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.

Bugs can be reported as issues.

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

optionlab-1.5.0.tar.gz (29.2 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.5.0-py3-none-any.whl (31.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for optionlab-1.5.0.tar.gz
Algorithm Hash digest
SHA256 ba577b3a9820db2bac528c7de00e791fb120dc9f6b2406ebc497c39db22c30b3
MD5 dc5544ebdaad4e613d936699efa6caad
BLAKE2b-256 5beae7d5210eedbe5601b0adf000b5b0d82c2b703e473783ec541b0229e5cfd2

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for optionlab-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b01963de5cf519755ba70a98de07f399bab70771d20ca5d17c996c8a326f07bc
MD5 0bb6cd254256edc8d45585efeb14c99d
BLAKE2b-256 403e19c5b8f9df52066993c531e6a6356d18821f80b77399515d59a577708163

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