Last modified: 2002 Feb 11
HOME
Fixed Income Procedures
Instructions:
These procedures can be downloaded
individually, or together as one zip file:
fixedin.zip. Place all Gauss files
(including declaration files ending in ".dec")
into your "/gauss/src" directory.
Gauss Programs
- setbond.g &
calvec2.dat &
calvec2.dht
Procedure and calender data file with header, to
calculate accrued interest, time to each cash flow (in years) and
a cash flow matrix, given today's date and vectors of bond
maturities and coupons.
- macdur.g Procedure to calculate Macaulay
duration, modified duration, and continuously compounded yield to
maturities given a vector of bond prices, as well as cash flow and
time to each cash flow matrices.(see setbond.g above for setting
up these matrices)
- yldtomat.g Procedure to calculate
continuosly compounded yield to maturities given a vector of
bond prices, as well as cash flow and time to each cash flow
matrices.
- zcsmooth.g Procedure to estimate a
smooth zero coupon yield curve, and forward yield curve, given a set
of coupon bearing and/or non-coupon bearing risk free assets
(eg. U.S. Treasury bonds,notes,bills & strips). This is a rather
flexible procedure which provides several tuning parameters to
control the extent of desired smoothing versus goodness of fit to
the data.
- zcoupytm.g Procedure to calculate a
vector of zero-coupon equivalent yield to maturities given a series
of equally spaced maturities. This is the "text-book" method of
constructing a zero coupon yield curve from a full set of bond
prices which are unlikely to be observed in practice. See zcsmooth.g
above for a more practical method, or combine this procedure with
another procedure which interpolates missing bond data.
- bondytm.gProcedure to calculate a vector of
yield to maturities (expressed as an APR) given vectors of coupon bond
characteristics.
- pricefy.g Procedure to calculate bond prices
given the bond's yield to maturity and other characteristics.
- coupdate.gProcedure to find a matrix of
coupon dates, and time to each coupon (in years) given today's date
and a vector of bond maturities. See setbond.g for a similar
procedure.
Perl Scripts for Cleaning up U.S. Treasury Quote Data