QuantLib
: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
ql
math
matrixutilities
factorreduction.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) 2009 Jose Aparicio
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 factorreduction.hpp
21
\brief Single factor correlation reduction
22
*/
23
24
#ifndef quantlib_factorreduction_hpp
25
#define quantlib_factorreduction_hpp
26
27
#include <
ql/math/matrix.hpp
>
28
29
namespace
QuantLib
{
30
31
/*! Iterative procedure to compute a correlation matrix reduction to
32
a single factor dependence vector by minimizing the residuals.
33
34
It assumes that such a reduction is possible, notice that if the
35
dependence can not be reduced to one factor the correlation
36
factors might be above 1.
37
38
The matrix passed is destroyed.
39
40
See for instance: "Modern Factor Analysis", Harry H. Harman,
41
University Of Chicago Press, 1976. Chapter 9 is relevant to
42
this context.
43
*/
44
std::vector<Real>
factorReduction
(Matrix mtrx,
Size
maxIters = 25);
45
46
}
47
48
#endif
QuantLib::Size
std::size_t Size
size of a container
Definition:
types.hpp:58
matrix.hpp
matrix used in linear algebra.
QuantLib
Definition:
any.hpp:35
QuantLib::factorReduction
std::vector< Real > factorReduction(Matrix mtrx, Size maxIters)
Definition:
factorreduction.cpp:26
Generated by
Doxygen
1.9.5