QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
blackcallablebondengine.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2008 Allen Kuo
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
24#ifndef quantlib_black_callable_bond_engine_hpp
25#define quantlib_black_callable_bond_engine_hpp
26
27#include <ql/experimental/callablebonds/callablebond.hpp>
28#include <ql/experimental/callablebonds/callablebondvolstructure.hpp>
29
30namespace QuantLib {
31
33
44 : public CallableFixedRateBond::engine {
45 public:
48 Handle<YieldTermStructure> discountCurve);
51 Handle<YieldTermStructure> discountCurve);
52 void calculate() const override;
53
54 private:
57 // present value of all coupons paid during the life of option
58 Real spotIncome() const;
59 // converts the yield volatility into a forward price volatility
61 };
62
63
65
76 public:
79 const Handle<Quote>& fwdYieldVol,
80 const Handle<YieldTermStructure>& discountCurve)
81 : BlackCallableFixedRateBondEngine(fwdYieldVol, discountCurve) {}
82
85 const Handle<CallableBondVolatilityStructure>& yieldVolStructure,
86 const Handle<YieldTermStructure>& discountCurve)
87 : BlackCallableFixedRateBondEngine(yieldVolStructure, discountCurve) {}
88 };
89
90}
91
92
93#endif
Black-formula callable fixed rate bond engine.
Handle< CallableBondVolatilityStructure > volatility_
Black-formula callable zero coupon bond engine.
BlackCallableZeroCouponBondEngine(const Handle< CallableBondVolatilityStructure > &yieldVolStructure, const Handle< YieldTermStructure > &discountCurve)
volatility is the quoted fwd yield volatility, not price vol
BlackCallableZeroCouponBondEngine(const Handle< Quote > &fwdYieldVol, const Handle< YieldTermStructure > &discountCurve)
volatility is the quoted fwd yield volatility, not price vol
Shared handle to an observable.
Definition: handle.hpp:41
QL_REAL Real
real number
Definition: types.hpp:50
Real Volatility
volatility
Definition: types.hpp:78
Definition: any.hpp:35