Coverage Report

Created: 2026-10-31 06:47

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/quantlib/ql/experimental/volatility/volcube.hpp
Line
Count
Source
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
 <https://www.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 volcube.hpp
21
    \brief Interest rate (optionlet/swaption) volatility cube
22
*/
23
24
#ifndef quantlib_volatility_cube_h
25
#define quantlib_volatility_cube_h
26
27
#include <ql/handle.hpp>
28
#include <ql/shared_ptr.hpp>
29
#include <vector>
30
31
namespace QuantLib {
32
33
    class Period;
34
    class AbcdAtmVolCurve;
35
    class InterestRateVolSurface;
36
    class InterestRateIndex;
37
38
    class VolatilityCube {
39
      public:
40
        VolatilityCube(std::vector<Handle<InterestRateVolSurface> >,
41
                       std::vector<Handle<AbcdAtmVolCurve> >);
42
        const Period& minIndexTenor() const;
43
        const Period& maxIndexTenor() const;
44
        const std::vector<Handle<InterestRateVolSurface> >& surfaces() const;
45
        const std::vector<Handle<AbcdAtmVolCurve> >& curves() const;
46
      protected:
47
        std::vector<Handle<InterestRateVolSurface> > surfaces_;
48
        std::vector<Handle<AbcdAtmVolCurve> > curves_;
49
    };
50
51
    // inline
52
53
    inline const std::vector<Handle<InterestRateVolSurface> >&
54
0
    VolatilityCube::surfaces() const {
55
0
        return surfaces_;
56
0
    }
57
58
    inline const std::vector<Handle<AbcdAtmVolCurve> >&
59
0
    VolatilityCube::curves() const {
60
0
        return curves_;
61
0
    }
62
63
}
64
65
#endif