quantmodels
Overview
quantmodels is a Python package that provides implementations of various financial models commonly used in finance and investment analysis.
Installation
You can install the package using pip: pip install quantmodels
Included Financial Models
- Binomial Option Pricing Model (BOPM) The Binomial Option Pricing Model is a numerical method used for option pricing. It calculates the option price and call option price based on parameters such as underlying price, strike price, risk-free rate, volatility, time to maturity, and the number of steps in the binomial tree.
from quantmodels.opm import binomial_option_pricing
Example usage for Put Option Price
Parameters underlying_price: Current price of the underlying asset.
strike_price: Strike price of the option.
risk_free_rate: Risk-free interest rate.
volatility: Volatility of the underlying asset.
time_to_maturity: Time to maturity of the option.
num_steps: Number of steps in the binomial tree.
call_price = binomial_option_pricing(underlying_price, strike_price, time_to_maturity, risk_free_rate, volatility, periods, 'call')
put_price = binomial_option_pricing(underlying_price, strike_price, time_to_maturity, risk_free_rate, volatility, periods, 'put')
print(f"Call Option Price: {call_price:.2f}")
print(f"Put Option Price: {put_price:.2f}")
Metadata
Release files for quantmodels 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| quantmodels-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for quantmodels-1.0.0-py3-none-any.whl |
Release files / quantmodels-1.0.0-py3-none-any.whl
| Download URL | quantmodels-1.0.0-py3-none-any.whl |
|---|---|
| Size | 2.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
608e624eabf52c5f4c8ef2fd73b52f5973f64980513232b312150a2e0ed36acf
|
|
BLAKE2b-256 checksum How to use checksums |
0e024666994203da2113002883cfed691c0a0d616bbbdb2973ad4f3553c88725
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.8.4
|
Security for quantmodels 1.0.0
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.