QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
Loading...
Searching...
No Matches
variancegammamodel.cpp
Go to the documentation of this file.
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4Copyright (C) 2010 Adrian O' Neill
5
6This file is part of QuantLib, a free-software/open-source library
7for financial quantitative analysts and developers - http://quantlib.org/
8
9QuantLib is free software: you can redistribute it and/or modify it
10under the terms of the QuantLib license. You should have received a
11copy 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
15This program is distributed in the hope that it will be useful, but WITHOUT
16ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17FOR A PARTICULAR PURPOSE. See the license for more details.
18*/
19
22#include <ql/shared_ptr.hpp>
23
24namespace QuantLib {
25
27 const ext::shared_ptr<VarianceGammaProcess> & process)
28 : CalibratedModel(3), process_(process) {
34 NoConstraint());
35
37
38 registerWith(process_->riskFreeRate());
39 registerWith(process_->dividendYield());
41 }
42
44 process_ = ext::make_shared<VarianceGammaProcess>(process_->s0(),
45 process_->dividendYield(),
46 process_->riskFreeRate(),
47 sigma(), nu(), theta());
48 }
49
50}
51
Calibrated model class.
Definition: model.hpp:86
std::vector< Parameter > arguments_
Definition: model.hpp:126
Standard constant parameter .
Definition: parameter.hpp:71
No constraint.
Definition: constraint.hpp:79
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
Definition: observable.hpp:226
Constraint imposing positivity to all arguments
Definition: constraint.hpp:92
ext::shared_ptr< VarianceGammaProcess > process_
ext::shared_ptr< VarianceGammaProcess > process() const
VarianceGammaModel(const ext::shared_ptr< VarianceGammaProcess > &process)
Definition: any.hpp:37
Maps shared_ptr to either the boost or std implementation.
simple quote class
Variance Gamma model.