QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
continuousarithmeticasianvecerengine.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) 2014 Bernd Lewerenz
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 continuousarithmeticasianvecerengine.hpp
21 \brief Vecer engine for continuous arithmetic Asian options
22*/
23
24#ifndef quantlib_continuous_arithmetic_asian_vecer_engine_hpp
25#define quantlib_continuous_arithmetic_asian_vecer_engine_hpp
26
29
30namespace QuantLib {
31
32 //! Vecer engine for continuous-avaeraging Asian options
33 /*! See <http://www.stat.columbia.edu/~vecer/asian-vecer.pdf> */
36 public:
38 ext::shared_ptr<GeneralizedBlackScholesProcess> process,
39 Handle<Quote> currentAverage,
40 Date startDate,
41 Size timeSteps = 100,
42 Size assetSteps = 100,
43 Real z_min = -1.0,
44 Real z_max = 1.0);
45 void calculate() const override;
46
47 protected:
48 // Replication of average by holding this amount in assets
49 Real cont_strategy(Time t, Time T1,Time T2,Real v, Real r) const;
50 private:
51 ext::shared_ptr<GeneralizedBlackScholesProcess> process_;
58 };
59
60}
61
62
63#endif
Asian option on a single asset.
Black-Scholes processes.
Vecer engine for continuous-avaeraging Asian options.
Real cont_strategy(Time t, Time T1, Time T2, Real v, Real r) const
ext::shared_ptr< GeneralizedBlackScholesProcess > process_
Continuous-averaging Asian engine base class.
Concrete date class.
Definition: date.hpp:125
Shared handle to an observable.
Definition: handle.hpp:41
const DefaultType & t
Real Time
continuous quantity with 1-year units
Definition: types.hpp:62
QL_REAL Real
real number
Definition: types.hpp:50
std::size_t Size
size of a container
Definition: types.hpp:58
Definition: any.hpp:35
ext::shared_ptr< YieldTermStructure > r
ext::shared_ptr< BlackVolTermStructure > v