fullmonte

A monte carlo simulation for extrapolated returns.


Keywords
monte, carlo
License
MIT
Install
pip install fullmonte==0.0.4

Documentation

fullmonte

PyPi

Monte Carlo simulations for extrapolated returns.

Dependencies 🌐

Python 3.11.6:

Raison D'être 💭

fullmonte is a python library that implements the simulation and plotting of a monte carlo run on a financial return assuming normal distributions.

Installation 📥

This is a python package hosted on pypi, so to install simply run the following command:

pip install fullmonte

Usage example 👀

A quick example of how to use this library is the following:

from fullmonte import simulate, plot

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt

# Create some test data with a $100,000 initial investment
pct_ret = np.random.uniform(-0.1, 0.1, 252 * 10)
ret = np.concatenate((np.array([100000.0]), pct_ret + 1.0)).cumprod()
# Simulate monte carlo
df = simulate(pd.Series(ret))
print(df)
# Plot the monte carlo simulations
plot(df)
plt.show()

This will produce the following:

Monte Carlo

License 📝

The project is available under the MIT License.