zr2coup.h File Reference

#include "bastypes.h"
#include "cashflow.h"
#include "interp.h"
#include "ldate.h"

Functions

int JpmcdsZerosToCouponsPoint (TCurve *zc, long interpType, TDate startDate, TDateInterval *interval, TDate maturityDate, long fixedDayCountConv, TBoolean stubAtEnd, double *couponRate)
int JpmcdsZerosToCouponsPointAdj (TCurve *zc, long interpType, TDate startDate, TDateInterval *interval, TDate maturityDate, long fixedDayCountConv, TBoolean stubAtEnd, long accBadDayConv, long payBadDayConv, char *holidayFile, double *couponRate)

Detailed Description


Function Documentation

int JpmcdsZerosToCouponsPoint ( TCurve zc,
long  interpType,
TDate  startDate,
TDateInterval interval,
TDate  maturityDate,
long  fixedDayCountConv,
TBoolean  stubAtEnd,
double *  couponRate 
)

A convenience function for JpmcdsZerosToCouponsPointAdj with no bad-day adjustment.

Calls JpmcdsZerosToCouponsPoint with badDayConv = JPMCDS_BAD_DAY_NONE.

Parameters:
zc (I) Zero-coupon rate curve
interpType (I)
startDate (I) Date instrument begins at
interval (I) Time between payments
maturityDate (I) Date instrument matures at
fixedDayCountConv (I) See JpmcdsDayCountFraction
stubAtEnd (I) TRUE=Back, FALSE=Front
couponRate (O) Rate for this instrument

int JpmcdsZerosToCouponsPointAdj ( TCurve zc,
long  interpType,
TDate  startDate,
TDateInterval interval,
TDate  maturityDate,
long  fixedDayCountConv,
TBoolean  stubAtEnd,
long  accBadDayConv,
long  payBadDayConv,
char *  holidayFile,
double *  couponRate 
)

Calculates a par swap rate for the swap starting at startDate, maturing at maturityDate, with fixed day count convention fixedDayCountConv and fixed payments occuring at time intervals defined by interval. In other words, the routine calculates the fixed rate such that the present value of the fixed and floating sides are equal. The floating side is assumed to be at par.

Bad day adjustment is performed on the startDate, maturityDate, and all fixed coupon payment dates.

The arguments stubType and stubAtEnd only have an effect if startDate and maturityDate are not on cycle.

Parameters:
zc (I) Zero-coupon rate curve
interpType (I)
startDate (I) Date instrument begins at
interval (I) Time between payments
maturityDate (I) Date instrument matures at
fixedDayCountConv (I) See JpmcdsDayCountFraction
stubAtEnd (I) TRUE=Back, FALSE=Front
accBadDayConv (I) See JpmcdsBusinessDay for methods
payBadDayConv (I) See JpmcdsBusinessDay for methods
holidayFile (I) Used to adjust swap dates
couponRate (O) Rate for this instrument


Distributed by BN Algorithms Ltd -- consulting in quantitative finance, mathematical algorithms and software implementations. CDS Home Page. For enquires contact webs@bnikolic.co.uk.
This documentation is derived from ISDA CDS Standard Model version 1.7. You can get a copy of the original ISDA code at www.bnikolic.co.uk. This is a derivative work under the terms of the ISDA CDS Standard Model Public License. BN Algorithms Ltd licenses this work to you solely for on-screen viewing on your own computer. Making copies and further distribution of this work is prohibited.
This documentation is provided "as-is", without warranty of any kind, either expressed or implied, including, without limitation, warranties that the documentation is free of defects, merchantable, fit for a particular purpose or non-infringing. the entire risk as to the quality of the documentation is with you. Should this documentation prove defective in any respect, you (not the licensor) assume the cost of any necessary correction. This disclaimer of warranty constitutes an essential part of this license.