Login  Register

Re: mortgage bond

Posted by stefanadelbert on Apr 13, 2009; 3:14am
URL: http://quantlib.414.s1.nabble.com/mortgage-bond-tp12877p12891.html

Hi Nathan

Today I've been playing with QLNet and ASP and have got a proof of concept going. I've just used the FixedRateBond class so far and have essentially modelled an interest only mortgage with it.

I have not had a look at your code yet, but I reckon that for my purposes I might take your C++ code and port it to the C# QLNet project onto a branch, if you're OK with that. I still need to finalise with the owners of QLNet about how best to do that.

Stefan

Nathan Abbott wrote
Sorry for the delay. Here is what I have written so for. First the code is
off QuantLib 0.9.7. It will not work with the current copy of QuantLib in
subversion.

in ql/cashflows/cashflows.hpp,cashflows.cpp
    I add a sumAmount to the cashflows class. The loan class use this
method.


in ql/cashflows/fixedratecoupon.hpp, fixedratecoupon.cpp
    I add delaydays method to a FixedRateLeg. We need this for Mortgage
Bonds

in ql/experimental/loans/amortizingfixedrateleg.hpp,
amortizingfixedrateleg.cpp
    I created a AmortizingFixedRateLeg class. This has the amortizing logic
need to create a loan cash flow.

in ql/experimental/loans/loan.hpp, loan.cpp
    This is a base loan class. It is very similiar to the bond class.

 in ql/experimental/loans/fixedrateloan.hpp, fixedrateloan.cpp
    This is a FixedRateLoan class that inherits from the loan class. It use
the AmortizingFixedRateLeg to create it legs. It can create its own cash
flows and get the npv from an pricingengine.

in ql/experimental/loans/discountingloanengine.cpp
    This is the pricing engine for the loan class.

 in ql/experimental/mortgagebonds/mortgagebond.hpp, mortgagebond.cpp
    This is a base MortgageBond class. Obviously, it inherits from the bond
class. Right now all it has is a  WAL calculation method.

  in ql/experimental/mortgagebonds/fixedratemortgagebond.hpp,
fixedratemortgagebond.cpp
    This is a FixedRateMortgageBond class. Obviously, it inherits from the
mortgagebond class. It is very similiar to the AmortizingFixedRateBond


On Wed, Apr 8, 2009 at 3:24 AM, Jose Aparicio-Navarro <japari@free.fr>wrote:

> Hi Nathan, yes thank you, I want to sign for the free copy :-)
> I'll try to look at it from the prepayments/default side. But I do not
> think I'll implement anything in the short term.
> It is 0.9.7 code, right?
>
> Regards
> Pepe
>
>
> Quoting Nathan Abbott <nkabbott@gmail.com>:
>
> > I have a version of a Loan class, a FixedRateLoan class, a MortgageBond
> > class, and a FixedRateMortgageBond class that I am working on. If any
> body
> > wants to look at them just email me. Any suggests and comments would be
> > helpful.
> >
>

 
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
QuantLib-dev mailing list
QuantLib-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/quantlib-dev