Skip to content

Monte Carlo-based Option Pricing library in C++ with support for European and Asian options featuring parallelization.

Notifications You must be signed in to change notification settings

pratycodes/Simulated-Option-Pricer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Monte Carlo Simulation-Based Options Pricing Library

This project implements a Monte Carlo simulation-based engine for pricing vanilla and exotic options using the Geometric Brownian Motion (GBM) model. The library is designed for educational purposes and showcases the implementation of parallelization with OpenMP to speed up Monte Carlo simulations.

Table of Contents

Introduction

This C++ project implements a Monte Carlo-based engine for pricing financial derivatives, specifically European and Asian options, using the Geometric Brownian Motion (GBM) model. The project incorporates parallelization using OpenMP to speed up Monte Carlo simulations, improving performance when simulating large numbers of paths.

A Monte Carlo simulation is a way to model the probability of different outcomes in a process that cannot easily be predicted due to the intervention of random variables. It is a technique used to understand the impact of risk and uncertainty. A Monte Carlo simulation takes the variable that has uncertainty and assigns it a random value. The model is then run, and a result is provided. This process is repeated again and again while assigning many different values to the variable in question. Once the simulation is complete, the results are averaged to arrive at an estimate.

The library can be used to price:

  • European Call/Put options
  • Arithmetic Asian Call/Put options

Features

  • Monte Carlo Simulation: Pricing of European and Asian options using Monte Carlo methods.
  • Geometric Brownian Motion (GBM): Utilizes the GBM model to simulate the underlying asset price.
  • Parallelization with OpenMP: Uses OpenMP to parallelize Monte Carlo simulations, speeding up the process.
  • Modular Design: The code is modular and allows for easy extension to include more complex option pricing methods.

Dependencies

  • C++17: The code is written in C++17.
  • OpenMP: For parallelizing the Monte Carlo simulations.
  • CMake: To manage the build process.

Installation

Prerequisites

Ensure you have the following tools installed:

  • C++ Compiler (e.g., GCC or Clang)
  • CMake (Version 3.10 or above)
  • OpenMP (Can be installed via Homebrew on macOS: brew install libomp)

Building the Project

  1. Clone the repository:

    git clone https://github.com/pratycodes/Simulated-Option-Pricer
    cd MonteCarloLibrary
  2. Create a build directory:

    mkdir build
    cd build
  3. Run cmake to configure the project:

    cmake ..
  4. Build the project using make:

    make

Running the Tests

After building the project, you can run the tests (e.g., for European or Asian options pricing):

./TestOptionPricing

This will execute the Monte Carlo simulation for pricing European options and output the results.

Contributing

Contributions are welcome! Feel free to fork the repository, make changes, and submit pull requests. Please make sure to adhere to the following guidelines:

  • Write clear, descriptive commit messages.
  • Ensure all tests pass before submitting a pull request.
  • Follow the project's coding style and conventions.

License

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

About

Monte Carlo-based Option Pricing library in C++ with support for European and Asian options featuring parallelization.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages