Composable financial contracts with Monte Carlo valuation
Project description
Monte Carlo Contracts
Composable financial contracts with Monte Carlo valuation. This module employs ideas from How to Write a Financial Contract by S. L. Peyton Jones and J-M. Eber. However, the implementation is not based on functional programming but rather using an object oriented approach. Also, this implementation is tailored towards Monte Carlo based cashflow generation whereas the paper favours more general methods.
Features
- Composition of financial contracts using elementary contracts
Zero
,One
,Give
,Scale
,And
,When
,Cond
,Anytime
andUntil
- Boolean and real valued observables (stochastic processes) to be referenced by contracts
- Cashflow generation for composed contracts given simulation models on fixed dategrids
Examples
Install
You can install monte-carlo-contracts
using pip
with
pip3 install monte-carlo-contracts
or you can simply download mcc.py
and then run it using python3
with
python3 mcc.py
History
0.3.0 (2020-10-23)
- Simulation of basic contract
Until
- Currency conversion of
IndexedCashflows
Or
contract supports multiple currenciesObservableFloat
supports<
,<=
,>
and>=
operators withfloat
or otherObservableFloat
instancesObservableBool
supports~
,&
and|
operators for combined conditions- Equity Options and FX Options examples
0.2.0 (2020-10-11)
- Simulation of basic contracts
Zero
,One
,Give
,Scale
,And
,When
andCond
- Partial simulation of
Or
contract - Float observables
Stock
andFX
- Boolean observables
At
SimulatedCashflows
and model-boundIndexedCashflows
to represent cashflows- Basic
Model
allowing the generation of cashflows for the contracts above
0.1.0 (2020-09-22)
- Created using cookiecutter-pyscript
Credits
Main developer is luphord luphord@protonmail.com. cookiecutter-pyscript is used as project template.
History
0.1.0 (2020-09-22)
- Initial release.
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
Built Distribution
File details
Details for the file monte-carlo-contracts-0.3.0.tar.gz
.
File metadata
- Download URL: monte-carlo-contracts-0.3.0.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200925 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2ba3a65f04391ab20d8188599eb145a12047d57170382da4359c6327b240358 |
|
MD5 | 80501230650ee243e2f9a455d22c0838 |
|
BLAKE2b-256 | e97d636b7f4926c29959435ce4ce3b62b6bd9e00aee6e4acb1ed254b061ab9b9 |
File details
Details for the file monte_carlo_contracts-0.3.0-py2.py3-none-any.whl
.
File metadata
- Download URL: monte_carlo_contracts-0.3.0-py2.py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200925 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b10f7fb72e4d0239a22bef79534729b3cdc325aa0d7e0b526e9fb0fb6599251 |
|
MD5 | 5e3185fecdabbe97bf3e1cbccfca6fb8 |
|
BLAKE2b-256 | a2bb6cf199a987fdbe55320c6ae7bc5943df47d3c90cc26eab1baf6d98e08f45 |