quant-pricer-cpp
Loading...
Searching...
No Matches
asian.hpp
Go to the documentation of this file.
1
2#pragma once
3
4#include <cstdint>
5
6namespace quant::asian {
7
9enum class Average { Arithmetic, Geometric };
10enum class Qmc { None, Sobol, SobolScrambled };
11
12struct McParams {
13 double spot;
14 double strike;
15 double rate;
16 double dividend;
17 double vol;
18 double time;
19 std::uint64_t num_paths;
20 std::uint64_t seed;
21 int num_steps; // averaging steps
22 bool antithetic{true};
23 bool use_geometric_cv{true};
27};
28
30 double value;
31 double std_error;
32 double ci_low;
33 double ci_high;
34};
35
37
38} // namespace quant::asian
Asian option Monte Carlo (arithmetic/geometric) with optional geometric CV.
Definition asian.hpp:6
Qmc
Definition asian.hpp:10
McStatistic price_mc(const McParams &p)
Definition asian.cpp:33
Payoff
Definition asian.hpp:8
Average
Definition asian.hpp:9
Definition asian.hpp:12
double spot
Definition asian.hpp:13
Average avg
Definition asian.hpp:25
Qmc qmc
Definition asian.hpp:26
std::uint64_t num_paths
Definition asian.hpp:19
double vol
Definition asian.hpp:17
double strike
Definition asian.hpp:14
double dividend
Definition asian.hpp:16
bool use_geometric_cv
Definition asian.hpp:23
Payoff payoff
Definition asian.hpp:24
bool antithetic
Definition asian.hpp:22
int num_steps
Definition asian.hpp:21
double rate
Definition asian.hpp:15
double time
Definition asian.hpp:18
std::uint64_t seed
Definition asian.hpp:20
Definition asian.hpp:29
double ci_low
Definition asian.hpp:32
double value
Definition asian.hpp:30
double std_error
Definition asian.hpp:31
double ci_high
Definition asian.hpp:33