yearfrac.h File Reference

#include "cgeneral.h"
#include "bastypes.h"
#include "metric.h"

Functions

TMetricDoubleFunc JpmcdsDayCountToMetricFunc (long dayCountConv)
 Returns metric function to use for interpolation routines for a given day count convention.
char * JpmcdsFormatDayCountConv (long dayCountConv)
 Maps day count conventions to (private) strings.
int JpmcdsStringToDayCountConv (char *dayCountString, long *type)
 Converts String to Day Count Convention.
int JpmcdsDayCountValid (char *routine, long dayCountConv)
 Returns SUCCESS if day count convention is valid, FAILURE otherwise.

Detailed Description


Function Documentation

int JpmcdsDayCountValid ( char *  routine,
long  dayCountConv 
)

Returns SUCCESS if day count convention is valid, FAILURE otherwise.

If routine != NULL, then populates the error log on FAILURE. Otherwise if routine IS NULL, then the error log is not populated on FAILURE.

int JpmcdsStringToDayCountConv ( char *  dayCountString,
long *  type 
)

Converts String to Day Count Convention.

This function is fairly permissive in terms of what it will accept. For example, "Actual/360", "A", etc. Strings of the form "30/Actual" are disallowed, however.


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.