-
Notifications
You must be signed in to change notification settings - Fork 2
/
GeneticVanillaSwap.h
50 lines (37 loc) · 1.35 KB
/
GeneticVanillaSwap.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#pragma once
#include <GeneticSwap.h>
class GeneticVanillaSwapPricer
{
GeneticSwap_PTR geneticVanillaSwap_;
public:
//! constructor
GeneticVanillaSwapPricer(GeneticSwap_PTR geneticVanillaSwap):geneticVanillaSwap_(geneticVanillaSwap){}
//! destructor
virtual ~GeneticVanillaSwapPricer(){}
//! To validate the result
// initLibor[i] = L_i[T_0]
double geneticVanillaSwap_Analytical_1(std::vector<double> liborInitValue, std::vector<double> dateLibor)const;
//getter
GeneticSwap_PTR getGeneticVanillaSwap()const{return geneticVanillaSwap_;}
size_t find(double paymentDay, std::vector<double> dateLibor)const;
//protected:
//
// virtual double forwardSwapRate(
// const LMM::Index indexValuationDate,
// const VanillaSwap & vanillaSwap,
// const std::vector<double> & numeraire
// ) const;
//
// virtual double pvFixedLeg(
// const LMM::Index indexValuationDate,
// const VanillaSwap & vanillaSwap,
// const std::vector<double> & numeraire
// ) const;
//
//! YY TODO: maybe move it here, as the fixing leg ...
//double pvFloatingLeg(LMM::Index indexValuationDate,
// const VanillaSwap& vanillaSwap,
// const std::vector<double>& numeraire, //numeraire[i]: numeraire value at T_i
// const matrix& liborMatrix) const;
};
typedef boost::shared_ptr<GeneticVanillaSwapPricer> GeneticVanillaSwapPricer_PTR;