QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
twoassetbarrieroption.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) 2012 Master IMAFA - Polytech'Nice Sophia - Université de Nice Sophia Antipolis
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
20/*! \file twoassetbarrieroption.hpp
21 \brief Barrier option on two assets
22*/
23
24#ifndef quantlib_two_asset_barrier_option_hpp
25#define quantlib_two_asset_barrier_option_hpp
26
30
31namespace QuantLib {
32
33 class GeneralizedBlackScholesProcess;
34
35 //! %Barrier option on two assets
36 /*! \ingroup instruments */
38 public:
39 class arguments;
40 class engine;
42 Barrier::Type barrierType,
43 Real barrier,
44 const ext::shared_ptr<StrikedTypePayoff>& payoff,
45 const ext::shared_ptr<Exercise>& exercise);
46
47 bool isExpired() const override;
48 void setupArguments(PricingEngine::arguments*) const override;
49
50 protected:
51 // arguments
54 };
55
56
57 //! %Arguments for two-asset %barrier %option calculation
59 public:
60 arguments();
63 void validate() const override;
64 };
65
66 //! %Two-asset barrier-option %engine base class
68 : public GenericEngine<TwoAssetBarrierOption::arguments,
69 TwoAssetBarrierOption::results> {
70 protected:
71 bool triggered(Real underlying) const;
72 };
73
74}
75
76
77#endif
Barrier type.
template base class for option pricing engines
basic option arguments
Definition: option.hpp:57
base option class
Definition: option.hpp:36
ext::shared_ptr< Payoff > payoff() const
Definition: option.hpp:45
ext::shared_ptr< Exercise > exercise() const
Definition: option.hpp:46
Arguments for two-asset barrier option calculation
Two-asset barrier-option engine base class
Barrier option on two assets
void setupArguments(PricingEngine::arguments *) const override
bool isExpired() const override
returns whether the instrument might have value greater than zero.
QL_REAL Real
real number
Definition: types.hpp:50
Definition: any.hpp:35
Option on a single asset.
Payoffs for various options.