getcovariance.hpp
Go to the documentation of this file.
1 /* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  Copyright (C) 2006 Ferdinando Ametrano
4 
5  This file is part of QuantLib, a free-software/open-source library
6  for financial quantitative analysts and developers - http://quantlib.org/
7 
8  QuantLib is free software: you can redistribute it and/or modify it
9  under the terms of the QuantLib license. You should have received a
10  copy of the license along with this program; if not, please email
11  <quantlib-dev@lists.sf.net>. The license is also available online at
12  <http://quantlib.org/license.shtml>.
13 
14  This program is distributed in the hope that it will be useful, but WITHOUT
15  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  FOR A PARTICULAR PURPOSE. See the license for more details.
17 */
18 
19 
20 #ifndef qla_getcovariance_hpp
21 #define qla_getcovariance_hpp
22 
23 #include <oh/libraryobject.hpp>
24 #include <ql/math/matrixutilities/getcovariance.hpp>
25 
26 namespace QuantLibAddin {
27 
28  inline QuantLib::Matrix getCovariance(std::vector<double> vols,
29  const QuantLib::Matrix& corr,
30  double tol)
31  {
32  return QuantLib::getCovariance(vols.begin(), vols.end(), corr, tol);
33  }
34 
35  class CovarianceDecomposition : public ObjectHandler::LibraryObject<
36  QuantLib::CovarianceDecomposition>
37  {
38  public:
40  const boost::shared_ptr<ObjectHandler::ValueObject>& properties,
41  const QuantLib::Matrix& cov,
42  QuantLib::Real tol,
43  bool permanent);
44  };
45 }
46 
47 #endif
48 
CovarianceDecomposition(const boost::shared_ptr< ObjectHandler::ValueObject > &properties, const QuantLib::Matrix &cov, QuantLib::Real tol, bool permanent)
Definition: getcovariance.hpp:35
Definition: abcd.hpp:38
QuantLib::Matrix getCovariance(std::vector< double > vols, const QuantLib::Matrix &corr, double tol)
Definition: getcovariance.hpp:28