QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
quantovanillaoption.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) 2002, 2003 Ferdinando Ametrano
5 Copyright (C) 2007 StatPro Italia srl
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/*! \file quantovanillaoption.hpp
22 \brief Quanto version of a vanilla option
23*/
24
25#ifndef quantlib_quanto_vanilla_option_hpp
26#define quantlib_quanto_vanilla_option_hpp
27
30
31namespace QuantLib {
32
33 //! %Results from quanto option calculation
34 template<class ResultsType>
35 class QuantoOptionResults : public ResultsType {
36 public:
38 void reset() override {
39 ResultsType::reset();
41 }
45 };
46
47 //! quanto version of a vanilla option
48 /*! \ingroup instruments */
50 public:
54 QuantoVanillaOption(const ext::shared_ptr<StrikedTypePayoff>&,
55 const ext::shared_ptr<Exercise>&);
56 //! \name greeks
57 //@{
58 Real qvega() const;
59 Real qrho() const;
60 Real qlambda() const;
61 //@}
62 void fetchResults(const PricingEngine::results*) const override;
63
64 private:
65 void setupExpired() const override;
66 // results
68 };
69
70}
71
72
73#endif
template base class for option pricing engines
template class providing a null value for a given type.
Definition: null.hpp:76
Base class for options on a single asset.
basic option arguments
Definition: option.hpp:57
Results from quanto option calculation
quanto version of a vanilla option
OneAssetOption::arguments arguments
GenericEngine< arguments, results > engine
void setupExpired() const override
void fetchResults(const PricingEngine::results *) const override
QuantoOptionResults< OneAssetOption::results > results
QL_REAL Real
real number
Definition: types.hpp:50
Definition: any.hpp:35
Option on a single asset.
Payoffs for various options.