QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
multiassetoption.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) 2000, 2001, 2002, 2003 RiskMap srl
5 Copyright (C) 2004 Neil Firth
6 Copyright (C) 2007 StatPro Italia srl
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 multiassetoption.hpp
23 \brief Option on multiple assets
24*/
25
26#ifndef quantlib_multiasset_option_hpp
27#define quantlib_multiasset_option_hpp
28
29#include <ql/option.hpp>
30
31namespace QuantLib {
32
33 //! Base class for options on multiple assets
34 class MultiAssetOption : public Option {
35 public:
36 class engine;
37 class results;
38 MultiAssetOption(const ext::shared_ptr<Payoff>&,
39 const ext::shared_ptr<Exercise>&);
40 //! \name Instrument interface
41 //@{
42 bool isExpired() const override;
43 //@}
44 //! \name greeks
45 //@{
46 Real delta() const;
47 Real gamma() const;
48 Real theta() const;
49 Real vega() const;
50 Real rho() const;
51 Real dividendRho() const;
52 //@}
53 void setupArguments(PricingEngine::arguments*) const override;
54 void fetchResults(const PricingEngine::results*) const override;
55
56 protected:
57 void setupExpired() const override;
58 // results
61 };
62
63 //! %Results from multi-asset option calculation
65 public Greeks {
66 public:
67 void reset() override {
70 }
71 };
72
74 public GenericEngine<MultiAssetOption::arguments,
75 MultiAssetOption::results> {};
76
77}
78
79
80#endif
81
template base class for option pricing engines
additional option results
Definition: option.hpp:69
void reset() override
Definition: option.hpp:71
Results from multi-asset option calculation
Base class for options on multiple assets.
void setupArguments(PricingEngine::arguments *) const override
bool isExpired() const override
returns whether the instrument might have value greater than zero.
void setupExpired() const override
void fetchResults(const PricingEngine::results *) const override
base option class
Definition: option.hpp:36
QL_REAL Real
real number
Definition: types.hpp:50
Definition: any.hpp:35
Base option class.