[R-SIG-Finance] Urgent on the help

kriskumar at earthlink.net kriskumar at earthlink.net
Mon Sep 1 02:46:32 CEST 2008


Hi Yunlei,

There are many recipes to find the nearest non-singular matrix. Peter Jackel has a nice paper outlining three popular approaches to this. 

The R package corpcor has an implementation of Higham's approach.

>require(corpcor)
>posDefmat<-make.positive.definite(mat,tol)

Should do the trick now it  would be a good idea to compares this to Rebonato's method, which  is essentially setting the negative or close to zero eigen values to a small positive number (1e-5) and rescale to get the non-singular matrix back. This is a good practice  just to compare these things and see what magic dust(:-)). higham's procedure adds to the original matrix.

Hth

Best
Krishna
----
"When I get a little money, I buy books and if any 
      is left, I buy food and clothes."  -- Erasmus

-----Original Message-----
From: <Yunlei.Hu at barclayscapital.com>

Date: Tue, 22 Jul 2008 09:17:11 
To: <r-sig-finance at stat.math.ethz.ch>
Subject: [R-SIG-Finance] Urgent on the help



 Dear all

I am using quadratic programming to solve the portfolio optimization in
cosidering transaction cost. Is there any R optimization package can do
this? 

Solve.QP require the positive definite matrix in Dmat, while in my case,
this matrix in the objective function is not positive definite.

>  It is in a bit of emergency. I would be really appreciated if anybody
> can give me the reply ASAP. 
> 
> Many thanks
>  Yunlei 
> 
_______________________________________________

This e-mail may contain information that is confidential, privileged or otherwise protected from disclosure. If you are not an intended recipient of this e-mail, do not duplicate or redistribute it by any means. Please delete it and any attachments and notify the sender that you have received it in error. Unless specifically indicated, this e-mail is not an offer to buy or sell or a solicitation to buy or sell any securities, investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Barclays. Any views or opinions presented are solely those of the author and do not necessarily represent those of Barclays. This e-mail is subject to terms available at the following link: www.barcap.com/emaildisclaimer. By messaging with Barclays you consent to the foregoing.  Barclays Capital is the investment banking division of Barclays Bank PLC, a company registered in England (number 1026167) with its registered offi!
 ce at 1 Churchill Place, London, E14 5HP.  This email may relate to or be sent from other members of the Barclays Group.

_______________________________________________
R-SIG-Finance at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.


More information about the R-SIG-Finance mailing list