每月债券的优惠券date – 优秀
我试图计算债券的所有现金stream量date,债券的发生date是每月。 对于其他频率我通常使用COUPNCD。 我尝试使用= EDATE(到期date; -1),但date不正确,因为它不考虑优惠券的支付方式,除非不存在,否则总是在同一天。
例:
结算date:2014年12月31日; 到期日:30-05-2016; 基数:2(实际/ 360)和频率:4
计算优惠券date= COUPNCD我得到以下date的现金stream量:
28-02-2015 30-05-2015 30-08-2015 30-11-2015 29-02-2016 30-05-2016
如果我计算= EDATE(date; -3)我得到:
28-02-2015 30-05-2015 30-08-2015 29-11-2015 29-02-2016 30-05-2016
你有什么想法可以帮助我吗?
谢谢 :)
我有关于functionCOUPNCD
和COUPNUM
相同的问题 – 不能使用12(用于每月支付)作为频率属性。
有一个办法 – 你可以写下面的用户定义函数。 我现在在我的财务模型中使用它,它完美的工作。
Option Explicit Public Function DC_CoupNum(Settlement As Date, Maturity As Date, NumberOfPayments As Integer) As Integer Dim NewDate As Date Dim i As Integer Dim r As Integer Select Case NumberOfPayments Case 1 r = 12 Case 2 r = 6 Case 4 r = 3 Case 12 r = 1 End Select NewDate = Maturity i = 0 Do While NewDate > Settlement i = i + 1 NewDate = Application.WorksheetFunction.EDate(NewDate, -1 * r) ' Debug.Print NewDate Loop DC_CoupNum = i End Function Public Function DC_CoupNcd(Settlement As Date, Maturity As Date, Frequency As Integer, Optional NextC As Boolean = True) As Date 'next coupon date after the settlement date 'NextC = True ... next coupon date 'NextC = False ... previous coupon date Dim m, o Select Case Frequency Case 1 m = 12 Case 2 m = 6 Case 4 m = 3 Case 12 m = 1 End Select o = DC_CoupNum(Settlement, Maturity, Frequency) - 1 If NextC = False Then o = o + 1 If Maturity = WorksheetFunction.EoMonth(Maturity, 0) Then 'pokud je Maturity konec mesice DC_CoupNcd = Application.WorksheetFunction.EoMonth(Maturity, -o * m) Else DC_CoupNcd = Application.WorksheetFunction.EDate(Maturity, -o * m) End If End Function
我无法重现您的EDATE()
结果。 使用下面的公式,我可以得到与COUPNCD()
函数完全相同的值:
=EDATE(maturity;0) ==> 30-05-2016 =EDATE(maturity;-3) ==> 29-02-2016 =EDATE(maturity;-6) ==> 30-11-2015 =EDATE(maturity;-9) ==> 30-08-2015 =EDATE(maturity;-12) ==> 30-05-2015 =EDATE(maturity;-15) ==> 28-02-2015
( maturity
为30-05-2016)
请检查您是否使用EDATE()
函数的正确参数,如上所示。