finmc
This package contains Monte-Carlo implementations of many financial models derived from a common interface class. This interface allows for
- Shared utilities that can be used for all models for tasks such as calculating implied vol surface.
- Price Calculators that are model invariant.
- High performance, even with a large number of paths.
- New models can be created outside this repositary, by indepedent contributors, and yet be compatible with above utilities and calculators.
Documentation
Notebooks
|
|
|
| Hull-White with a term structure of rates. | Paths of Variance in Heston Model. |
Install it from PyPI
pip install finmc
Example
This is an example of pricing a vanilla option using the local volatility model.
import numpy as np
from finmc.models.localvol import LVMC
from finmc.calc.option import opt_price_mc
# Define Dataset with zero rate curve, and forward curve.
dataset = {
"MC": {"PATHS": 100_000, "TIMESTEP": 1 / 250},
"BASE": "USD",
"ASSETS": {
"USD":("ZERO_RATES", np.array([[2.0, 0.05]])),
"SPX": ("FORWARD", np.array([[0.0, 5500], [1.0, 5600]])),
},
"LV": {"ASSET": "SPX", "VOL": 0.3},
}
model = LVMC(dataset)
price = opt_price_mc(5500.0, 1.0, "Call", "SPX", model)
Metadata
Release files for finmc 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| finmc-0.1.0.tar.gz | 21.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| finmc-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 46.4 kB
Release files / finmc-0.1.0.tar.gz
| Download URL | finmc-0.1.0.tar.gz |
|---|---|
| Size | 21.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7a29e858a5141f33d474da1cbec881116ab1fa40a02aeca1fc76731c0f99bb98
|
|
BLAKE2b-256 checksum How to use checksums |
4ce85884bc5b52b151f3b03701fbbe40b07f610df873b626889821211e84aeee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / finmc-0.1.0-py3-none-any.whl
| Download URL | finmc-0.1.0-py3-none-any.whl |
|---|---|
| Size | 24.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a4ac8b8c4b2b11f1d679e8aa59e0487c3d2c82297da199a0d0142c547f7897cd
|
|
BLAKE2b-256 checksum How to use checksums |
4b25a7629eb2d70d8a1823ff3fdf24ad4d6cf62fe49fa4c3e2ff9a369d992068
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for finmc 0.1.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.