As of September 2024, I have slowly become more and more interested in quant, and decided it is time to make a few projects given the experience I have.
I decided to create a simple options-pricing engine in C++ and named it "Optio", which is the latin origin of the word "option".
Optio is a tool for pricing vanilla (European, American) and exotic (Asian, Barrier, Lookback) options, along with their Greeks. It utilizes a variety of pricing models, including Black-Scholes, binomial/trinomial trees, and Monte Carlo simulations.
- Clone the repository.
- In project directory, run
make
to build the Makefile. - Run
./main
inbuild/
to start the command-line interface. - Follow the CLI prompts to:
- Create an option by specifying its type and parameters.
- Name the option to store it in memory.
- Retrieve the option's price and Greeks.
-
Option Classes
- Defines the Option and FloatingOption parent classes, providing functionality to create, modify, and display various vanilla and exotic options.
- Includes methods to retrieve input parameters, Greeks, and the option price.
-
Utility Functions
- Contains key helper functions for probability distributions, forward prices, Greeks calculations (delta, gamma, vega, etc.), and Heston stochastic volatility models.
-
Vanilla Options Pricing
- Contains classes for European and American options.
- Implements Black-Scholes pricing, Monte Carlo simulations, and binomial/trinomial tree methods for pricing and Greeks.
-
Exotic Options Pricing
- Contains classes for Asian, Lookback, and Barrier options.
- Uses Monte Carlo simulations for pricing exotic options due to their path-dependent nature.
-
Black-Scholes Model -- Used to price European options, incorporating dividends.
-
Monte Carlo Simulations -- Used for exotic and European options, leveraging variance reduction techniques such as antithetic variates and delta/gamma control variates for faster and more accurate pricing.
-
Leisen-Reimer Binomial Tree -- Primarily used for American options, offering efficient and accurate pricing by centering the tree around the option’s strike price.