Skip to content

smanchkanti/market-maker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Market Maker

Market Maker is an Options Market Maker program that simulates the behavior of a market maker in the financial options market. The program uses the Black-Scholes option pricing model, random price generation, and includes AI-based volatility prediction using LSTM neural networks. It also includes pricing for natural gas and oil.

Features

  • Option Market Making: The program acts as a market maker for options, handling buy and sell orders.
  • Black-Scholes Model: The program uses the Black-Scholes option pricing model to calculate option prices based on the current market conditions.
  • Random Price Generation: The program generates random price changes based on the given volatility.
  • Volatility Prediction: The program includes an AI-based volatility prediction model trained using LSTM neural networks to forecast future volatility.
  • P&L Calculation: The program tracks profit and loss (P&L) for both options and futures.
  • Pricing for Natural Gas and Oil: The program provides pricing for natural gas and oil based on random price changes and volatility.

Dependencies

  • C++ Standard Library

Usage

  1. Ensure you have a C++ compiler installed.
  2. Compile the code using the compiler with C++11 support. For example:

g++ maker.cpp -std=c++11 -o market-maker

  1. Run the executable.

./market-maker

File Structure

  • maker.cpp: The main source file containing the options market maker program.

Option Market Making

The program acts as a market maker for options. It generates bid and ask prices for a list of predefined options based on the current market conditions. The bid and ask prices are calculated using the Black-Scholes option pricing model, taking into account the current price of the underlying asset, strike price, time to expiry, risk-free rate, and volatility. The program handles both buy and sell orders for options and tracks the profit and loss (P&L) based on executed trades.

Random Price Generation

To simulate market conditions, the program generates random price changes for the underlying asset based on the given volatility. The random price changes are generated using a normal distribution with the mean of zero and the specified volatility.

Volatility Prediction

The program includes an AI-based volatility prediction model trained using LSTM neural networks. The model is trained on historical volatility data to forecast future volatility. During the simulation, the program uses the predicted volatility to generate more accurate option prices and market conditions.

Pricing for Natural Gas and Oil

The program provides pricing for natural gas and oil based on random price changes and volatility. It generates random price changes for natural gas and oil using a normal distribution with the mean and volatility specified for each asset.

Releases

No releases published

Packages

No packages published

Languages

  • C++ 100.0%