QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
makeswaption.hpp
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
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_make_swaption_hpp
26#define quantlib_make_swaption_hpp
27
28#include <ql/time/businessdayconvention.hpp>
29#include <ql/instruments/swaption.hpp>
30#include <ql/optional.hpp>
31
32namespace QuantLib {
33
34 class SwapIndex;
35 class Swap;
36 class Calendar;
37 class IborIndex;
38 class Period;
39 class PricingEngine;
40
42
46 public:
47 MakeSwaption(ext::shared_ptr<SwapIndex> swapIndex,
48 const Period& optionTenor,
49 Rate strike = Null<Rate>());
50
51 MakeSwaption(ext::shared_ptr<SwapIndex> swapIndex,
52 const Date& fixingDate,
53 Rate strike = Null<Rate>());
54
55 operator Swaption() const;
56 operator ext::shared_ptr<Swaption>() const ;
57
64 MakeSwaption& withIndexedCoupons(const ext::optional<bool>& b = true);
65 MakeSwaption& withAtParCoupons(bool b = true);
66
68 const ext::shared_ptr<PricingEngine>& engine);
69 private:
70 ext::shared_ptr<SwapIndex> swapIndex_;
73 mutable ext::shared_ptr<VanillaSwap> underlyingSwap_;
74
79 mutable ext::shared_ptr<Exercise> exercise_;
80
84 ext::optional<bool> useIndexedCoupons_;
85
86 ext::shared_ptr<PricingEngine> engine_;
87 };
88
89}
90
91#endif
Concrete date class.
Definition: date.hpp:125
BusinessDayConvention optionConvention_
MakeSwaption & withOptionConvention(BusinessDayConvention bdc)
MakeSwaption & withExerciseDate(const Date &)
ext::optional< bool > useIndexedCoupons_
ext::shared_ptr< VanillaSwap > underlyingSwap_
ext::shared_ptr< SwapIndex > swapIndex_
MakeSwaption & withAtParCoupons(bool b=true)
MakeSwaption & withIndexedCoupons(const ext::optional< bool > &b=true)
MakeSwaption & withNominal(Real n)
Settlement::Type delivery_
ext::shared_ptr< PricingEngine > engine_
MakeSwaption & withSettlementMethod(Settlement::Method settlementMethod)
ext::shared_ptr< Exercise > exercise_
MakeSwaption & withPricingEngine(const ext::shared_ptr< PricingEngine > &engine)
Settlement::Method settlementMethod_
MakeSwaption & withSettlementType(Settlement::Type delivery)
MakeSwaption & withUnderlyingType(Swap::Type type)
template class providing a null value for a given type.
Definition: null.hpp:76
Swaption class
Definition: swaption.hpp:81
BusinessDayConvention
Business Day conventions.
QL_REAL Real
real number
Definition: types.hpp:50
Real Rate
interest rates
Definition: types.hpp:70
Definition: any.hpp:35