QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
dividendbarrieroption.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2008 Andreas Gaida
5 Copyright (C) 2008 Ralph Schreyer
6 Copyright (C) 2008 Klaus Spanderen
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
26#ifndef quantlib_dividend_barrier_option_hpp
27#define quantlib_dividend_barrier_option_hpp
28
29#include <ql/instruments/barrieroption.hpp>
30#include <ql/instruments/dividendschedule.hpp>
31#include <ql/instruments/payoffs.hpp>
32
33namespace QuantLib {
34
36
40 class QL_DEPRECATED DividendBarrierOption : public BarrierOption {
41 public:
42 class arguments;
43 class engine;
45 Barrier::Type barrierType,
46 Real barrier,
47 Real rebate,
48 const ext::shared_ptr<StrikedTypePayoff>& payoff,
49 const ext::shared_ptr<Exercise>& exercise,
50 const std::vector<Date>& dividendDates,
51 const std::vector<Real>& dividends);
52 protected:
53 void setupArguments(PricingEngine::arguments*) const override;
54
55 private:
57 };
58
59
61 public:
63 arguments() = default;
64 void validate() const override;
65 };
66
67 QL_DEPRECATED_DISABLE_WARNING
69 : public GenericEngine<DividendBarrierOption::arguments,
70 DividendBarrierOption::results> {
71 protected:
72 bool triggered(Real underlying) const;
73 };
74 QL_DEPRECATED_ENABLE_WARNING
75
76}
77
78#endif
Arguments for barrier option calculation
Barrier option on a single asset.
Single-asset barrier option with discrete dividends.
template base class for option pricing engines
QL_REAL Real
real number
Definition: types.hpp:50
Definition: any.hpp:35
std::vector< ext::shared_ptr< Dividend > > DividendSchedule