swaption.hpp
Go to the documentation of this file.
1 /* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 
3 /*
4  Copyright (C) 2006 Ferdinando Ametrano
5  Copyright (C) 2006 Cristina Duminuco
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 
21 #ifndef qla_swaption_hpp
22 #define qla_swaption_hpp
23 
24 #include <qlo/baseinstruments.hpp>
25 #include <ql/instruments/swaption.hpp>
26 #include <ql/pricingengines/swaption/blackswaptionengine.hpp>
27 
28 namespace QuantLib {
29  class SwapIndex;
30 }
31 
32 namespace QuantLibAddin {
33 
34  class Swaption : public Instrument {
35  public:
36  Swaption(const boost::shared_ptr<ObjectHandler::ValueObject>& properties,
37  const boost::shared_ptr<QuantLib::VanillaSwap>& vanillaSwap,
38  const boost::shared_ptr<QuantLib::Exercise>& exercise,
39  QuantLib::Settlement::Type settlementType,
40  bool permanent);
41  // MakeSwaption
42  Swaption(const boost::shared_ptr<ObjectHandler::ValueObject>& properties,
43  const boost::shared_ptr<QuantLib::SwapIndex>& swapIndex,
44  const QuantLib::Period& optionTenor,
45  QuantLib::Rate strike,
46  const boost::shared_ptr<QuantLib::PricingEngine>& engine,
47  bool permanent);
48 
49  std::string underlyingSwap() {
50  return ObjectHandler::convert2<std::string>(propertyValue("VANILLASWAP"));
51  }
52 
53  };
54 
55 }
56 
57 #endif
std::string underlyingSwap()
Definition: swaption.hpp:49
Definition: baseinstruments.hpp:34
Definition: swaption.hpp:34
Definition: abcd.hpp:38
Definition: abcd.hpp:30
Swaption(const boost::shared_ptr< ObjectHandler::ValueObject > &properties, const boost::shared_ptr< QuantLib::VanillaSwap > &vanillaSwap, const boost::shared_ptr< QuantLib::Exercise > &exercise, QuantLib::Settlement::Type settlementType, bool permanent)