Skip to content

Monte Carlo simulation toolkit for equity trading, utilizing GBM and Pareto distributions to model price movements and trading volumes

License

Notifications You must be signed in to change notification settings

nabilshadman/monte-carlo-simulation-equity-trading

Repository files navigation

Monte Carlo Simulation in Equity Trading

License: MIT Python Jupyter

Overview

This project explores the application of Monte Carlo simulations in equity trading, leveraging statistical distributions to model financial behaviors.

The methodologies implemented include:

  • Geometric Brownian Motion (GBM): Simulating equity price paths
  • Pareto Distribution: Simulating equity trading volumes
Geometric Brownian Motion (GBM) Pareto Distribution
Simulated equity price paths using GBM Simulated equity trading volume using Pareto distribution
Simulating equity price paths Simulating equity trading volumes

Tech Stack

  • Python Libraries:
    • scipy
    • numpy
    • pandas
    • matplotlib
  • Development Environment: Jupyter Notebook
  • Version Control: GitHub

Notebooks

Provides a Python implementation of the lognormal distribution, a key component in modeling financial price movements.

  • Visualizes histogram, Probability Density Function (PDF), and Cumulative Distribution Function (CDF).
  • Foundation for simulating equity prices.

Implements the Pareto distribution, often used for modeling trading volumes.

  • Visualizes histogram and PDF.
  • Forms the basis for simulating trading volume.

Simulates equity price paths using the GBM process.

  • Explains the relationship between periodic returns and lognormal price distributions.
  • Uses Python’s NumPy for efficient computation.

Simulates trading volumes with the Pareto distribution.

  • Generates realistic equity volumes lacking autocorrelation and price dependency.

Environment

Recommended Setup

For seamless execution, use the Anaconda Distribution, which simplifies dependency management and ensures compatibility.

  1. Download and install Anaconda from here.
  2. Open Anaconda Navigator and launch Jupyter Notebook.
  3. Navigate to the project directory to begin.

Execution

Running the Notebooks

  1. Open a notebook in Jupyter.
  2. In the toolbar, select RunRun All Cells to execute sequentially.

Suggested Order

For those new to Monte Carlo simulations in finance, follow this order:

  1. lognormal_distribution.ipynb
  2. pareto_distribution.ipynb
  3. simulating_equity_prices.ipynb
  4. simulating_trading_volume.ipynb

For detailed instructions, refer to the Jupyter documentation.

Contributing

We welcome contributions! Please feel free to submit pull requests or open issues for any improvements.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Citation

If you use this work in your research, please cite:

@misc{monte-carlo-equity-trading,
  author = {Shadman, Nabil},
  title = {Monte Carlo Simulation in Equity Trading},
  year = {2023},
  publisher = {GitHub},
  url = {https://github.com/nabilshadman/monte-carlo-simulation-equity-trading/}
}