QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
svismilesection.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2014 Peter Caspers
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_svi_smile_section_hpp
25#define quantlib_svi_smile_section_hpp
26
27#include <ql/termstructures/volatility/smilesection.hpp>
28#include <ql/time/daycounters/actual365fixed.hpp>
29#include <vector>
30
31namespace QuantLib {
32
34
38
39 public:
41
42
46 SviSmileSection(Time timeToExpiry, Rate forward, std::vector<Real> sviParameters);
52 SviSmileSection(const Date& d,
53 Rate forward,
54 std::vector<Real> sviParameters,
55 const DayCounter& dc = Actual365Fixed());
57 Real minStrike() const override { return 0.0; }
58 Real maxStrike() const override { return QL_MAX_REAL; }
59 Real atmLevel() const override { return forward_; }
60
61 protected:
62 Volatility volatilityImpl(Rate strike) const override;
63
64 private:
65 void init();
67 std::vector<Real> params_;
68};
69}
70
71#endif
Actual/365 (Fixed) day count convention.
Concrete date class.
Definition: date.hpp:125
day counter class
Definition: daycounter.hpp:44
interest rate volatility smile section
Stochastic Volatility Inspired Smile Section.
Real atmLevel() const override
Real minStrike() const override
std::vector< Real > params_
Volatility volatilityImpl(Rate strike) const override
Real maxStrike() const override
#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