QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
analyticdoublebarrierbinaryengine.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) 2015 Thema Consulting SA
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 analyticdoublebarrierbinaryengine.hpp
21 \brief analytic binary double barrier (one-touch double barrier) option engine
22*/
23
24#ifndef quantlib_binary_double_barrier_engine_hpp
25#define quantlib_binary_double_barrier_engine_hpp
26
29
30namespace QuantLib {
31
32 //! Analytic pricing engine for double barrier binary options
33 /*! This engine implements C.H.Hui series ("One-Touch Double Barrier
34 Binary Option Values", Applied Financial Economics 6/1996), as
35 described in "The complete guide to option pricing formulas 2nd Ed",
36 E.G. Haug, McGraw-Hill, p.180
37
38 The Knock In part of KI+KO and KO+KI options pays at hit, while the
39 Double Knock In pays at end.
40 This engine thus requires European esercise for Double Knock options,
41 and American exercise for KIKO/KOKI.
42
43 \ingroup barrierengines
44
45 greeks are calculated by simple numeric derivation
46
47 \test
48 - the correctness of the returned value is tested by reproducing
49 results available in literature.
50 */
52 public:
53 explicit AnalyticDoubleBarrierBinaryEngine(ext::shared_ptr<GeneralizedBlackScholesProcess>);
54 void calculate() const override;
55
56 private:
57 ext::shared_ptr<GeneralizedBlackScholesProcess> process_;
58 };
59
60}
61
62
63#endif
Black-Scholes processes.
Analytic pricing engine for double barrier binary options.
ext::shared_ptr< GeneralizedBlackScholesProcess > process_
Double-Barrier-option engine base class
double Barrier european option on a single asset
Definition: any.hpp:35