Skip to content

michael545/options-pricing

Repository files navigation

Options Pricing Models/Approaches (QuantLib 1.38)

This project contains C++ code for modeling and pricing financial options using QuantLib and exploring different pricing models (European, American, and Asian options).

Structure

  • main.cpp: Main source file for the options pricing logic.

Dependencies

Getting Started (Windows with VS Code)

A step-by-step process to set up the environment correctly, install dependencies, and build the target.

1. Environment Setup

Install Prerequisites:

  1. Git for Windows
  2. Visual Studio 2022 (Community Edition)
    • During install, select the "Desktop development with C++" workload.
  3. Visual Studio Code
    • With the "CMake Tools" extension.

Install vcpkg Package Manager: Open a PowerShell terminal and run:

cd C:\
mkdir dev
cd dev
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat
.\vcpkg integrate install

2. Install Dependencies

Install QuantLib (this may take 20-60 minutes as it builds Boost):

.\vcpkg install quantlib\:x64-windows-static

3. Build and Run

Open in VS Code: Open the project folder (containing CMakeLists.txt) in VS Code.

Build:

Select the kit for Visual Studio Build Tools 2022 Release - amd64 when prompted. Click the Build button in the status bar, can also, build from the command line:

cmake -B build -DCMAKE_TOOLCHAIN_FILE=C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake
cmake --build build

Run : after building, do:

 ./build/Release/main.exe

Notes

  • For educational and prototyping purposes only.
  • The Asian option Monte Carlo simulation can/will be slow for large sample sizes; change requiredSamples in main.cpp for faster testing.

Contributing

suggestions welcome! please open an issue or PR for improvements.

License

FOR educational use. See LICENSE file.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages