Duration and Yield of a Portfolio of Bonds

Posted by Lluis Pujol Bajador on
URL: http://quantlib.414.s1.nabble.com/Duration-and-Yield-of-a-Portfolio-of-Bonds-tp6219.html

Hi,

Under Python I need to obtain the overall yield and casflow duration of a portfolio of bonds (plain vanilla either Fixed or FRN).

I am already able to obtain the single duration and yield for each bond but in order to correctly obtain the real yield (and not a weigthed average yield) of the portfolio I should create a Leg object with all the cashflows of the portfolio. As far as I know the cashflows for a Leg object need to be sorted and thus I don't know how to easily proceed .

Is there any builtin method to add cashflows from another Leg?

Any hint  of a way to achieve a single Leg object with all shorted cashflows under Python?

Thanks in advance.

LluĂ­s. 

 

 

 

 

 


 


------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users