Black Scholes for options portfolios combos
Project description
Full documentation is available at https://option-combos.readthedocs.io/
This package computes Black Scholes options values and Greeks for options and option combos with a number of valuable features:
- The functions cover a comprehensive set of Greeks:
- The first order Greeks include (a) several variants of delta including delta driftless, delta forward and delta dual, (b) rho's with respect to domestic and foreign interest rates, (c) theta per day and vega per percentage point change in volatility.
- Important second order Greeks including gamma, gamma dual, vanna, volga and charm
- The most useful third order Greek, color
- Since the asset is allowed to pay a continuous dividend yield, foreign currency options, options on futures and options on stock indices are covered.
- Values and Greeks can be computed for an array of options (using a Pandas DataFrame).
- The package handles a portfolio of options (option combinations) where different options are held long or short positions with different weights. The aggregate value and Greeks can be computed for the entire portfolio.
- Option portfolios can contain forward contracts and zero coupon bonds. For example, a portfolio might include self financing strategies like buying a call option and investing the present value of the exercise price in a zero coupon bond.
- It is very easy to create common option combinations. For example, a straddle can be created in a single line as
straddle = combo.call(K=100) + combo.put(K=100)
and a butterfly can be created asbutterfly = combo.call(K=90) + combo.call(K=110) - 2 * combo.call(K=100)
. This illustrates the following features enabled by operator overloading:- Option combinations can be created by "adding" two options (combos)
- Short options are created by using a negative sign
- Weights can be assigned by simply multiplying an option (combo) by the weight.
- Plotting functions are provided to plot payoffs, profits, values and Greeks of various options (combos).
- Multiple Greeks of a single combo can be plotted on a single graph. For example, the gamma, vega and theta of a butterfly can be overlaid in a single plot.
- Different things can be plotted in different plots in a grid in the same figure. For example, the payoff and profit of a strangle can be shown in one plot, and the delta in a separate plot by the side.
- The same Greek can be plotted for different combos in a single plot. This allows, for example, the gamma of a straddle and a strangle to be compared in a single plot.
- Interactive plot that includes sliders for changing the strikes of each option. For example, an interactive plot of a butterfly can help choose the high, mid and low strikes to achieve a desired option price or gamma/vega/theta profile.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
option_combos-0.9.1.tar.gz
(38.1 kB
view details)
Built Distribution
File details
Details for the file option_combos-0.9.1.tar.gz
.
File metadata
- Download URL: option_combos-0.9.1.tar.gz
- Upload date:
- Size: 38.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aff1242c38e8fee33ffaa4d630c6033ec9c1dfaeaa7089b2ab834e3b06501d94 |
|
MD5 | 7df194914502c9e0a502642a78d020fb |
|
BLAKE2b-256 | ddd047b213cf701fdbc5614c0d41146b64ed817e7e40d6ff589f1156ee34d24f |
File details
Details for the file option_combos-0.9.1-py3-none-any.whl
.
File metadata
- Download URL: option_combos-0.9.1-py3-none-any.whl
- Upload date:
- Size: 44.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7dd22c38422cea94e582013f829aee3e39b15e55f67b80e2a68417e678871932 |
|
MD5 | 9f28e4ce9381b33903192d48d88c7ddd |
|
BLAKE2b-256 | a9a49616e64b41bb04be21f66a67dbe08c4debc77d7e3d03fdefb6306b199ec7 |