QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
dividendvanillaoption.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2004, 2007 StatPro Italia srl
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 <http://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
24#ifndef quantlib_dividend_vanilla_option_hpp
25#define quantlib_dividend_vanilla_option_hpp
26
27#include <ql/instruments/oneassetoption.hpp>
28#include <ql/instruments/dividendschedule.hpp>
29#include <ql/instruments/payoffs.hpp>
30
31namespace QuantLib {
32
33 class GeneralizedBlackScholesProcess;
34
36
40 class QL_DEPRECATED DividendVanillaOption : public OneAssetOption {
41 public:
42 class arguments;
43 class engine;
45 const ext::shared_ptr<StrikedTypePayoff>& payoff,
46 const ext::shared_ptr<Exercise>& exercise,
47 const std::vector<Date>& dividendDates,
48 const std::vector<Real>& dividends);
52 Volatility impliedVolatility(
53 Real price,
54 const ext::shared_ptr<GeneralizedBlackScholesProcess>& process,
55 Real accuracy = 1.0e-4,
56 Size maxEvaluations = 100,
57 Volatility minVol = 1.0e-7,
58 Volatility maxVol = 4.0) const;
59 protected:
60 void setupArguments(PricingEngine::arguments*) const override;
61
62 private:
64 };
65
66 class DividendVanillaOption::arguments : public OneAssetOption::arguments {
67 public:
69 arguments() = default;
70 void validate() const override;
71 };
72
73 QL_DEPRECATED_DISABLE_WARNING
75 : public GenericEngine<DividendVanillaOption::arguments,
76 DividendVanillaOption::results> {};
77 QL_DEPRECATED_ENABLE_WARNING
78
79}
80
81
82#endif
83
Single-asset vanilla option (no barriers) with discrete dividends.
template base class for option pricing engines
Base class for options on a single asset.
QL_REAL Real
real number
Definition: types.hpp:50
Real Volatility
volatility
Definition: types.hpp:78
std::size_t Size
size of a container
Definition: types.hpp:58
Definition: any.hpp:35
std::vector< ext::shared_ptr< Dividend > > DividendSchedule