Skip to main content

Python library for evaluating options trading strategies

Project description

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.

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.1.tar.gz (29.8 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.1-py3-none-any.whl (32.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: optionlab-1.5.1.tar.gz
  • Upload date:
  • Size: 29.8 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.1.tar.gz
Algorithm Hash digest
SHA256 788c4964eeff22e71a9bfde292c360b1a0b09b92459d7997d6d1902151a4d827
MD5 d926789f28189bb2fbc2eba502ef97cb
BLAKE2b-256 8112df63a234eb733a2fba95bd61e70ce276fba734e537e9363510e022a4b477

See more details on using hashes here.

File details

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

File metadata

  • Download URL: optionlab-1.5.1-py3-none-any.whl
  • Upload date:
  • Size: 32.3 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 93ac3ff4d7b16633478853ff267d7563c6a9daab23830c4a08616e1bd9353844
MD5 5fb8d1f82c2fb9d0673043759c7104e8
BLAKE2b-256 fd5cbb13f4c6f90625f911e6d9848d36f5023b6f02005ef9b2640d0621909eb6

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