Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
YieldCurveEUR Struct Reference

#include <test/yieldcurvemarketdata.hpp>

+ Collaboration diagram for YieldCurveEUR:

Public Member Functions

 YieldCurveEUR ()
 

Public Attributes

Handle< YieldTermStructure > discountEonia
 
Handle< YieldTermStructure > forward3M
 
Handle< YieldTermStructure > forward6M
 
DayCounter dayCounter
 

Detailed Description

Definition at line 37 of file yieldcurvemarketdata.hpp.

Constructor & Destructor Documentation

◆ YieldCurveEUR()

Definition at line 39 of file yieldcurvemarketdata.hpp.

39 : dayCounter(Actual365Fixed()) {
40 // Vectors to hold dates and disc
41 vector<Date> dates(7);
42 vector<Rate> discEonia(7);
43 vector<Rate> disc3M(7);
44 vector<Rate> disc6M(7);
45
46 // Populate the vectors
47 dates[0] = Date(5, Feb, 2016);
48 discEonia[0] = 1.000000000;
49 disc3M[0] = 1.000000000;
50 disc6M[0] = 1.000000000;
51 dates[1] = Date(5, Aug, 2016);
52 discEonia[1] = 1.001296118;
53 disc3M[1] = 1.000482960;
54 disc6M[1] = 0.999875649;
55 dates[2] = Date(6, Feb, 2017);
56 discEonia[2] = 1.003183503;
57 disc3M[2] = 1.001536429;
58 disc6M[2] = 1.000221239;
59 dates[3] = Date(5, Feb, 2021);
60 discEonia[3] = 1.008950857;
61 disc3M[3] = 0.999534627;
62 disc6M[3] = 0.992455644;
63 dates[4] = Date(6, Feb, 2023);
64 discEonia[4] = 0.996461253;
65 disc3M[4] = 0.984474484;
66 disc6M[4] = 0.974435009;
67 dates[5] = Date(5, Feb, 2026);
68 discEonia[5] = 0.960894135;
69 disc3M[5] = 0.944011343;
70 disc6M[5] = 0.932147253;
71 dates[6] = Date(5, Feb, 2036);
72 discEonia[6] = 0.830169833;
73 disc3M[6] = 0.807585583;
74 disc6M[6] = 0.794115491;
75
76 // Create the discount curves
77 discountEonia = Handle<YieldTermStructure>(QuantLib::ext::make_shared<DiscountCurve>(dates, discEonia, dayCounter));
78 forward3M = Handle<YieldTermStructure>(QuantLib::ext::make_shared<DiscountCurve>(dates, disc3M, dayCounter));
79 forward6M = Handle<YieldTermStructure>(QuantLib::ext::make_shared<DiscountCurve>(dates, disc6M, dayCounter));
80
81 // Enable extrapolation on all curves by default
82 discountEonia->enableExtrapolation();
83 forward3M->enableExtrapolation();
84 forward6M->enableExtrapolation();
85 }
Handle< YieldTermStructure > forward3M
Handle< YieldTermStructure > discountEonia
Handle< YieldTermStructure > forward6M

Member Data Documentation

◆ discountEonia

Handle<YieldTermStructure> discountEonia

Definition at line 88 of file yieldcurvemarketdata.hpp.

◆ forward3M

Handle<YieldTermStructure> forward3M

Definition at line 89 of file yieldcurvemarketdata.hpp.

◆ forward6M

Handle<YieldTermStructure> forward6M

Definition at line 90 of file yieldcurvemarketdata.hpp.

◆ dayCounter

DayCounter dayCounter

Definition at line 91 of file yieldcurvemarketdata.hpp.