QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
correlationstructure.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2014 Jose Aparicio
5
6 This file is part of QuantLib, a free-software/open-source library
7 for financial quantitative analysts and developers - http://quantlib.org/
8
9 QuantLib is free software: you can redistribute it and/or modify it
10 under the terms of the QuantLib license. You should have received a
11 copy of the license along with this program; if not, please email
12 <quantlib-dev@lists.sf.net>. The license is also available online at
13 <http://quantlib.org/license.shtml>.
14
15 This program is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the license for more details.
18*/
19
20#ifndef quantlib_correl_term_structure_hpp
21#define quantlib_correl_term_structure_hpp
22
23#include <ql/termstructure.hpp>
24
25namespace QuantLib {
26
27 // pretty much like the volatility TS, here the correlation range is
28 // obviously known in advance and theres no reference to a strike.
29
41 public:
48
54 const DayCounter& dc = DayCounter());
57 const Calendar& cal,
59 const DayCounter& dc = DayCounter());
62 const Calendar& cal,
64 const DayCounter& dc = DayCounter());
68 Date dateFromTenor(const Period&) const;
70 virtual Size correlationSize() const = 0;
71 private:
73 };
74
75 // inline definitions
78 return bdc_;
79 }
80
81 inline Date
83 // swaption style, still holds here.
85 p,
87 }
88}
89
90#endif
calendar class
Definition: calendar.hpp:61
Date advance(const Date &, Integer n, TimeUnit unit, BusinessDayConvention convention=Following, bool endOfMonth=false) const
Definition: calendar.cpp:130
CorrelationTermStructure(const Date &referenceDate, const Calendar &cal, BusinessDayConvention bdc, const DayCounter &dc=DayCounter())
initialize with a fixed reference date
Date dateFromTenor(const Period &) const
period/date conversion
virtual Size correlationSize() const =0
The size of the squared correlation.
BusinessDayConvention businessDayConvention() const
Concrete date class.
Definition: date.hpp:125
day counter class
Definition: daycounter.hpp:44
Basic term-structure functionality.
virtual Natural settlementDays() const
the settlementDays used for reference date calculation
virtual const Date & referenceDate() const
the date at which discount = 1.0 and/or variance = 0.0
virtual Calendar calendar() const
the calendar used for reference and/or option date calculation
BusinessDayConvention
Business Day conventions.
unsigned QL_INTEGER Natural
positive integer
Definition: types.hpp:43
std::size_t Size
size of a container
Definition: types.hpp:58
Definition: any.hpp:35