1 /* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 
3 /*
4  Copyright (C) 2007 Ferdinando Ametrano
5  Copyright (C) 2007 Giorgio Facchinetti
6  Copyright (C) 2015 Peter Caspers
7 
8  This file is part of QuantLib, a free-software/open-source library
9  for financial quantitative analysts and developers - http://quantlib.org/
10 
11  QuantLib is free software: you can redistribute it and/or modify it
12  under the terms of the QuantLib license.  You should have received a
13  copy of the license along with this program; if not, please email
14  <quantlib-dev@lists.sf.net>. The license is also available online at
15  <http://quantlib.org/license.shtml>.
16 
17  This program is distributed in the hope that it will be useful, but WITHOUT
18  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
19  FOR A PARTICULAR PURPOSE.  See the license for more details.
20 */
21 
22 /*! \file strippedoptionletbase.hpp
23 
24 */
25 
26 #ifndef quantlib_strippedoptionletbase_hpp
27 #define quantlib_strippedoptionletbase_hpp
28 
29 #include <ql/patterns/lazyobject.hpp>
30 #include <ql/time/businessdayconvention.hpp>
31 #include <ql/types.hpp>
32 #include <ql/termstructures/volatility/volatilitytype.hpp>
33 
34 #include <vector>
35 
36 namespace QuantLib {
37 
38     class Date;
39     class Calendar;
40     class DayCounter;
41 
42     /*! Abstract base class interface for a (time indexed) vector of (strike
43         indexed) optionlet (i.e. caplet/floorlet) volatilities.
44     */
45     class StrippedOptionletBase : public LazyObject {
46       public:
47         virtual const std::vector<Rate>& optionletStrikes(Size i) const = 0;
48         virtual const std::vector<Volatility>& optionletVolatilities(Size i) const = 0;
49 
50         virtual const std::vector<Date>& optionletFixingDates() const = 0;
51         virtual const std::vector<Time>& optionletFixingTimes() const = 0;
52         virtual Size optionletMaturities() const = 0;
53 
54         virtual const std::vector<Rate>& atmOptionletRates() const = 0;
55 
56         virtual DayCounter dayCounter() const = 0;
57         virtual Calendar calendar() const = 0;
58         virtual Natural settlementDays() const = 0;
59         virtual BusinessDayConvention businessDayConvention() const = 0;
60         virtual VolatilityType volatilityType() const = 0;
61         virtual Real displacement() const = 0;
62     };
63 
64 }
65 
66 #endif
67