[R-SIG-Finance] correlation matrix

Arun.stat arun.kumar.saha at gmail.com
Sun Nov 27 10:52:44 CET 2011


Hi Debashis, I dont think there is any direct implementation in R for that.
What you need is to have a PD matrix for the underlying VCV matrix, which is
not the case for yours. Do you have lot of missing data? May be you can try
with constructing VCV matrix after considering pairwise variables and then
tweak the eigen value little bit to make your estimated VCV matrix PD.

One algorithm for that may be like (if your estimated matrix is NND):

Mod_VCV = Original_VCV + (Identity_Mat(n) - Original_VCV)*(Lambda/(1-Lambda)
+ a_very_small_positive_number)

Lambda is the smallest eigen value for you estimated VCV matrix.

HTH,

Thanks and regards,
_____________________________________________________

Arun Kumar Saha, FRM
QUANTITATIVE RISK AND HEDGE CONSULTING SPECIALIST
Visit me at: http://in.linkedin.com/in/ArunFRM
_____________________________________________________

--
View this message in context: http://r.789695.n4.nabble.com/correlation-matrix-tp4112075p4112158.html
Sent from the Rmetrics mailing list archive at Nabble.com.



More information about the R-SIG-Finance mailing list