How johnathanmartin1/call_put_options_montecarlo_pricer works
This is a C++ command-line Monte Carlo option-pricing program. Its demonstrated workflow creates Asian and European contracts, configures and reports their parameters, runs automatic-precision random-walk simulation, then reports simulated prices and contract-specific values. The source excerpts establish the entry-point calls and payoff calculations; MonteCarlo.cpp and Factories.h are present in the tree but unsampled, so their internal dispatch details are not expanded.
Main entry points: put_call_values_monte_carlo_model.cpp Pricing workflow · Contract.cpp Contract parameters · Asian.cpp Asian option · MonteCarlo.cpp Random walk simulation
Components 14
Program entry
- Pricing workflow
put_call_values_monte_carlo_model.cpp - Contract factory
Factories.h
Option contracts
- Contract parameters
Contract.cpp - European option
European.cpp - Asian option
Asian.cpp
Monte Carlo
- Auto-precision run
MonteCarlo.cpp - Random walk simulation
MonteCarlo.cpp - Simulated prices
Contract.cpp - Per-simulation averages
Contract.cpp
Pricing analysis
- Call and put valuation
European.cpp - Asian payoff
Asian.cpp - Summary statistics
statistics.cpp - Printed valuations
put_call_values_monte_carlo_model.cpp
Other components
- CLI user
Connections 19
- CLI user → Pricing workflow: runs program
- Pricing workflow → Contract factory: creates contracts
- Pricing workflow → Contract parameters: sets parameters
- Pricing workflow → Auto-precision run: starts simulation
- Pricing workflow → Contract parameters: prints parameters
- Auto-precision run → Random walk simulation: runs simulation
- Random walk simulation → Simulated prices: updates prices
- Random walk simulation → Per-simulation averages: updates averages
- Pricing workflow → Contract parameters: reports average
- Contract parameters → Summary statistics: summarizes prices
- Pricing workflow → European option: requests call and put
- European option → Call and put valuation: calculates values
- Call and put valuation → Simulated prices: reads prices
- Call and put valuation → Summary statistics: calculates errors
- Pricing workflow → Asian option: requests Asian value
- Asian option → Per-simulation averages: reads averages
- Asian option → Asian payoff: calculates payoff
- Asian payoff → Summary statistics: computes mean
- Pricing workflow → Printed valuations: prints results