QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
impliedvolatility.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2007, 2009 StatPro Italia srl
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_implied_volatility_hpp
25#define quantlib_implied_volatility_hpp
26
27#include <ql/instrument.hpp>
28#include <ql/quotes/simplequote.hpp>
29#include <ql/processes/blackscholesprocess.hpp>
30
31namespace QuantLib {
32
33 namespace detail {
34
36
44 public:
45 static Volatility calculate(const Instrument& instrument,
46 const PricingEngine& engine,
47 SimpleQuote& volQuote,
48 Real targetValue,
49 Real accuracy,
50 Natural maxEvaluations,
51 Volatility minVol,
52 Volatility maxVol);
53 // utilities
54
59 static ext::shared_ptr<GeneralizedBlackScholesProcess> clone(
60 const ext::shared_ptr<GeneralizedBlackScholesProcess>&,
61 const ext::shared_ptr<SimpleQuote>&);
62 };
63
64 }
65
66}
67
68#endif
Abstract instrument class.
Definition: instrument.hpp:44
interface for pricing engines
market element returning a stored value
Definition: simplequote.hpp:33
helper class for one-asset implied-volatility calculation
static ext::shared_ptr< GeneralizedBlackScholesProcess > clone(const ext::shared_ptr< GeneralizedBlackScholesProcess > &, const ext::shared_ptr< SimpleQuote > &)
static Volatility calculate(const Instrument &instrument, const PricingEngine &engine, SimpleQuote &volQuote, Real targetValue, Real accuracy, Natural maxEvaluations, Volatility minVol, Volatility maxVol)
QL_REAL Real
real number
Definition: types.hpp:50
unsigned QL_INTEGER Natural
positive integer
Definition: types.hpp:43
Real Volatility
volatility
Definition: types.hpp:78
Definition: any.hpp:35