QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
interestratevolsurface.hpp
Go to the documentation of this file.
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
20/*! \file interestratevolsurface.hpp
21 \brief Interest rate volatility (smile) surface
22*/
23
24#ifndef quantlib_interest_rate_vol_surface_hpp
25#define quantlib_interest_rate_vol_surface_hpp
26
29
30namespace QuantLib {
31
32 //! Interest rate volatility (smile) surface
33 /*! This abstract class defines the interface of concrete
34 Interest rate volatility (smile) surfaces which will
35 be derived from this one.
36
37 Volatilities are assumed to be expressed on an annual basis.
38 */
40 public:
41 /*! \name Constructors
42 See the TermStructure documentation for issues regarding
43 constructors.
44 */
45 //@{
46 /*! \warning term structures initialized by means of this
47 constructor must manage their own reference date
48 by overriding the referenceDate() method.
49 */
50 explicit InterestRateVolSurface(ext::shared_ptr<InterestRateIndex>,
52 const DayCounter& dc = DayCounter());
53 //! initialize with a fixed reference date
54 InterestRateVolSurface(ext::shared_ptr<InterestRateIndex>,
55 const Date& referenceDate,
56 const Calendar& cal = Calendar(),
58 const DayCounter& dc = DayCounter());
59 //! calculate the reference date based on the global evaluation date
60 InterestRateVolSurface(ext::shared_ptr<InterestRateIndex>,
62 const Calendar&,
64 const DayCounter& dc = DayCounter());
65 //@}
66 //! \name VolatilityTermStructure interface
67 //@{
68 //! period/date conversion
69 Date optionDateFromTenor(const Period&) const;
70 //@}
71 const ext::shared_ptr<InterestRateIndex>& index() const;
72 //! \name Visitability
73 //@{
74 void accept(AcyclicVisitor&) override;
75 //@}
76 protected:
77 ext::shared_ptr<InterestRateIndex> index_;
78 };
79
80
81 // inline
82
83 inline const ext::shared_ptr<InterestRateIndex>&
85 return index_;
86 }
87
88}
89
90#endif
Black volatility (smile) surface.
degenerate base class for the Acyclic Visitor pattern
Definition: visitor.hpp:33
Black volatility (smile) surface.
calendar class
Definition: calendar.hpp:61
Concrete date class.
Definition: date.hpp:125
day counter class
Definition: daycounter.hpp:44
Interest rate volatility (smile) surface.
ext::shared_ptr< InterestRateIndex > index_
void accept(AcyclicVisitor &) override
const ext::shared_ptr< InterestRateIndex > & index() const
Date optionDateFromTenor(const Period &) const
period/date conversion
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
BusinessDayConvention
Business Day conventions.
unsigned QL_INTEGER Natural
positive integer
Definition: types.hpp:43
base class for interest rate indexes
Definition: any.hpp:35