Dear all,
I am looking to solve the following:
I have price data of bonds (p_date; end-of-month prices) and the first coupon that the bond ever paid (fc_date), as well as the frequency with which the coupon is paid. If it is 2, it is paid semianually, if it is 4, quarterly and so on. Now I am looking for the last coupon payment before the p_date (c_date).
E.g. for a transaction price on June 30, 2015: if the first coupon payment is made on November 08, 2012 and the frequency is 4, the coupon date I am looking for is Feb 8, 2015.
Maybe there is an elegant way to solve this and since I am a beginner, I would be happy to learn from any advice. Thank you in advance.
Maryna
I am looking to solve the following:
I have price data of bonds (p_date; end-of-month prices) and the first coupon that the bond ever paid (fc_date), as well as the frequency with which the coupon is paid. If it is 2, it is paid semianually, if it is 4, quarterly and so on. Now I am looking for the last coupon payment before the p_date (c_date).
ID | p_date | fc_date | frequency | c_date |
1 | 31-Jul-14 | 15-Jul-13 | 2 | 15-Jul-14 |
1 | 31-Aug-14 | 15-Jul-13 | 2 | 15-Jul-14 |
1 | 30-Sep-14 | 15-Jul-13 | 2 | 15-Jul-14 |
1 | 31-Oct-14 | 15-Jul-13 | 2 | 15-Jul-14 |
1 | 30-Nov-14 | 15-Jul-13 | 2 | 15-Jul-14 |
2 | 31-Jul-14 | 1-Mar-97 | 2 | 1-Mar-14 |
2 | 31-Aug-14 | 1-Mar-97 | 2 | 1-Mar-14 |
2 | 30-Sep-14 | 1-Mar-97 | 2 | 1-Sep-14 |
2 | 31-Dec-14 | 8-Nov-12 | 4 | 8-Nov-14 |
2 | 31-Jan-15 | 8-Nov-12 | 4 | 8-Nov-14 |
2 | 28-Feb-15 | 8-Nov-12 | 4 | 8-Feb-15 |
3 | 30-Jun-15 | 8-Nov-12 | 4 | 8-May-15 |
Maybe there is an elegant way to solve this and since I am a beginner, I would be happy to learn from any advice. Thank you in advance.
Maryna
Comment