I have forgotten
my Password

Or login with:

• http://facebook.com/
• https://www.google.com/accounts/o8/id
• https://me.yahoo.com
COST (GBP)
1.56
12.37
0

# coupon Prev Date

Finance namespace
Controller: CodeCogs

C++

## CouponPrevDate

 intcouponPrevDate( int sett int mat Finance::Banking::YearlyFreq freq Finance::Banking::YearBasis basis` = yb_USA` )
Calculate the previous coupon date before the settlement date. This value may be equal to the settlement date.

For a security, the settlement date is the date after issue when the security is traded to the buyer. The maturity date is the date at which the security expires.

### Example 1

```#include <stdio.h>

#include <codecogs/units/date/date.h>
#include <codecogs/units/date/dateymd.h>
#include <codecogs/finance/banking/couponprevdate.h>

int main(void)
{
int prevDate;
int settDate=Units::Date::date(1998, 1, 25);
int maturityDate=Units::Date::date(1999, 11, 15);

prevDate=Finance::Banking::couponPrevDate(settDate,
maturityDate,
Finance::Banking::yf_SemiAnnual);
int y, m, d;

Units::Date::dateYMD(settDate, y, m, d);
printf("settlement=%i/%i/%i\n", y, m, d);

Units::Date::dateYMD(maturityDate, y, m, d);
printf("maturity=%i/%i/%i\n", y, m, d);

Units::Date::dateYMD(prevDate, y, m, d);
printf("previous coupon date=%i/%i/%i\n", y, m, d);

return 0;
}```
Output:
```settlement=1998/1/25
maturity=1999/11/15
previous coupon date=1997/11/15```

The yearly frequency to be used in financial calculations <table border="0"> <tr align="center"><td width="100"> <strong>Type</strong></td><td><strong>Description</strong></td></tr> <tr> <td align="center" valign="top"><em>yf_Annual</em></td> <td>Payments are made annually.</td> </tr> <tr> <td align="center" valign="top"><em>yf_SemiAnnual</em></td> <td>Payments are semi-annual (2 per year).</td> </tr> <tr> <td align="center" valign="top"><em>yf_Quarterly</em></td> <td>Payments are quarterly (4 per year).</td> </tr> </table>

### Authors

James Warren (August 2005)

<div align="center"> <table border="0"> <tr align="center"><td width="100"> <strong>Type</strong></td><td><strong>Value</strong></td><td><strong>Description</strong></td></tr> <tr><td align="center" valign="top"><em>yb_US</em></td><td valign="top">0</td><td>US (NASD) 30/360 - As with the European 30/360 (yb_EU, with the additional provision that if the end date occurs on the 31st of a month it is moved to the 1st of the next month if the start date is earlier than the 30th.</td></tr> <tr><td align="center" valign="top"><em>yb_Act</em></td><td valign="top">1</td><td>Uses the exact number of elapsed days between the two dates, as well as the exact length of the year.</td></tr> <tr><td align="center" valign="top"><em>yb_Act360</em></td><td valign="top">2</td><td>Uses the exact number of elapsed days between two dates but assumes the year only have 360 days</td></tr> <tr><td align="center" valign="top"><em>yb_Act365</em></td><td valign="top">3</td><td>Uses the exact number of elapsed days between two dates but assumes the year always has 365 days</td></tr> <tr><td align="center" valign="top"><em>yb_EU</em></td><td valign="top">4</td><td>European 30/360 - Each month is assumed to have 30 days, such that the year has only 360 days. Start and end dates that occur on the 31st of a month become equal to the 30th of the same month.</td></tr> </table> </div>

### Parameters

 sett The settlement date, expressed as a serial Julian date. mat The maturity date of the settlement, expressed as a serial Julian date. freq The frequency with which payments are made: basis The year basis to use for the calculation:

### Returns

The previous coupon date of the security.

### Authors

James Warren (August 2005)
##### Source Code

Source code is available when you agree to a GP Licence or buy a Commercial Licence.

Not a member, then Register with CodeCogs. Already a Member, then Login.