' Calculates the price of a coupon bearing bond (ISMA unadjusted follwing). Function B_Price_ISMA(Sett_d As Date, Mat_d As Double, Cpn As Double, Yield As Double) As Double Dim L As Double, t As Double, sz As Double Dim n As Long L = (-Sett_d + Mat_d) / 365 n = Int(L) t = L - n sz = Cpn * (1 - t) B_Price_ISMA = (-Application.PV(Yield, n, Cpn, 100) + Cpn) / (1 + Yield) ^ t - sz End Function