Login  Register

Re: Generating pairwise correlated GBM data

Posted by Luigi Ballabio on Feb 19, 2016; 1:51pm
URL: http://quantlib.414.s1.nabble.com/Generating-pairwise-correlated-GBM-data-tp17308p17310.html

Hello,
    you can use the StochasticProcessArray to take a number of 1-D processes and their correlation matrix and build the corresponding multi-dimensional process, that can then be passed to the MultiPathGenerator class to generate the prices.

By default, the StochasticProcessArray class fixes a defective correlation matrix using the spectral salvaging algorithm.  You can lookup the pseudoSqrt function in QuantLib to see its implementation. The function can use a few other algorithms, but at this time you can't choose them when you instantiate StochasticProcessArray.

You can look at QuantLib/test-suite/pathgenerator.cpp for examples.

Hope this helps,
    Luigi


On Thu, Feb 18, 2016 at 11:24 AM U.Mutlu <[hidden email]> wrote:
Hi,

1) Is it possible to generate correlated price data in quantlib
by using a correlation matrix? (needed for simulations)

2) Sometimes there can be a problem with the correlation matrix,
especially if it is not positive definite, ie. a defective correlation matrix.
Here's an example for a defective correlation matrix:
(
http://blogs.sas.com/content/iml/2012/09/12/when-is-a-correlation-matrix-not-a-correlation-matrix.html
)
  1.0  0.6  0.9
  0.6  1.0  0.9
  0.9  0.9  1.0
In such cases one has to find a replacement matrix (Nearest Correlation Matrix
Problem).
Anybody know of C/C++/C#/Java code or library for computing/finding the
nearest correlation matrix?


--
Thx


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users