QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
sabrsmilesection.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2006 Mario Pucci
5 Copyright (C) 2015 Peter Caspers
6
7 This file is part of QuantLib, a free-software/open-source library
8 for financial quantitative analysts and developers - http://quantlib.org/
9
10 QuantLib is free software: you can redistribute it and/or modify it
11 under the terms of the QuantLib license. You should have received a
12 copy of the license along with this program; if not, please email
13 <quantlib-dev@lists.sf.net>. The license is also available online at
14 <http://quantlib.org/license.shtml>.
15
16 This program is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18 FOR A PARTICULAR PURPOSE. See the license for more details.
19*/
20
25#ifndef quantlib_sabr_smile_section_hpp
26#define quantlib_sabr_smile_section_hpp
27
28#include <ql/termstructures/volatility/smilesection.hpp>
29#include <ql/time/daycounters/actual365fixed.hpp>
30#include <vector>
31
32namespace QuantLib {
33
35 public:
36 SabrSmileSection(Time timeToExpiry,
37 Rate forward,
38 const std::vector<Real>& sabrParameters,
39 Real shift = 0.0,
41 SabrSmileSection(const Date& d,
42 Rate forward,
43 const std::vector<Real>& sabrParameters,
44 const Date& referenceDate = Date(),
45 const DayCounter& dc = Actual365Fixed(),
46 Real shift = 0.0,
48
49 Real minStrike() const override { return -shift_; }
50 Real maxStrike() const override { return QL_MAX_REAL; }
51 Real atmLevel() const override { return forward_; }
52 Real alpha() const { return alpha_; }
53 Real beta() const { return beta_; }
54 Real nu() const { return nu_; }
55 Real rho() const { return rho_; }
56 protected:
57 Real varianceImpl(Rate strike) const override;
58 Volatility volatilityImpl(Rate strike) const override;
59
60 private:
62 void initialise(const std::vector<Real>& sabrParameters);
63 };
64
65
66}
67
68#endif
Actual/365 (Fixed) day count convention.
Concrete date class.
Definition: date.hpp:125
day counter class
Definition: daycounter.hpp:44
Real atmLevel() const override
Real minStrike() const override
Real varianceImpl(Rate strike) const override
void initialise(const std::vector< Real > &sabrParameters)
Real maxStrike() const override
Volatility volatilityImpl(Rate strike) const override
interest rate volatility smile section
virtual const Date & referenceDate() const
virtual VolatilityType volatilityType() const
virtual Rate shift() const
#define QL_MAX_REAL
Definition: qldefines.hpp:176
Real Time
continuous quantity with 1-year units
Definition: types.hpp:62
QL_REAL Real
real number
Definition: types.hpp:50
Real Volatility
volatility
Definition: types.hpp:78
Real Rate
interest rates
Definition: types.hpp:70
Definition: any.hpp:35