The following Matlab project contains the source code and Matlab examples used for model a mortgage backed security.
CFEVALDEMO2 illustrates how CFEVAL (available from FEX) can be used to model a mortgage, a mortgage passthrough, or a collateralized mortgage obligation.