QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
voltermstructure.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2007 Ferdinando Ametrano
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
24#ifndef quantlib_vol_term_structure_hpp
25#define quantlib_vol_term_structure_hpp
26
27#include <ql/termstructure.hpp>
28
29namespace QuantLib {
30
32
37 public:
48 const DayCounter& dc = DayCounter());
51 const Calendar& cal,
53 const DayCounter& dc = DayCounter());
56 const Calendar& cal,
58 const DayCounter& dc = DayCounter());
60
63 Date optionDateFromTenor(const Period&) const;
65 virtual Rate minStrike() const = 0;
67 virtual Rate maxStrike() const = 0;
68 protected:
70 void checkStrike(Rate strike,
71 bool extrapolate) const;
72 private:
74 };
75
76 // inline definitions
77
80 return bdc_;
81 }
82
83 inline Date
85 // swaption style
87 p,
89 }
90}
91
92#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
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
Volatility term structure.
virtual Rate maxStrike() const =0
the maximum strike for which the term structure can return vols
virtual Rate minStrike() const =0
the minimum strike for which the term structure can return vols
void checkStrike(Rate strike, bool extrapolate) const
strike-range check
virtual BusinessDayConvention businessDayConvention() const
the business day convention used in tenor to date conversion
Date optionDateFromTenor(const Period &) const
period/date conversion
BusinessDayConvention
Business Day conventions.
unsigned QL_INTEGER Natural
positive integer
Definition: types.hpp:43
Real Rate
interest rates
Definition: types.hpp:70
Definition: any.hpp:35