Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I would like to get the cash flows and dates for the remaining coupons and principal repayment for a FinancialBond object. These must be calculated internally by the FinancialBond object for many of its possible return values but I can't see how to get the cashflows explicitly. Thanks

share|improve this question
1  
Welcome to Mathematica.SE! Please consider registering your account so that any upvotes you get on this question are added to those you might get on future questions and answers. That way, over time you will be able to do more on the site (post graphics, edit things, etc). –  Sjoerd C. de Vries Nov 28 '12 at 10:25

1 Answer 1

Unless I'm mistaken, FinancialBond is a function that returns values given parameters. It isn't similar to those objects returned by the likes of NonlinearModelFit, that have internal data and methods.

Coupon dates can be found using, for instance, the following:

matDate = {2020, 12, 31};
faceValue = 1000;
couponRate = 0.07; 
cDates = 
 Rest@NestWhileList[
   FinancialBond[
     {"FaceValue" -> faceValue, "Coupon" -> couponRate, 
      "Maturity" -> matDate, "CouponInterval" -> 1/2}, 
     {"InterestRate" -> 0.06, "Settlement" -> #, "DayCountBasis" -> "Actual/360"}, 
     "NextCouponDate"
   ] &, 
   DateList[][[;; 3]], 
   DateDifference[#, matDate] > 0 &
]

{{2012, 12, 31}, {2013, 6, 30}, {2013, 12, 31}, {2014, 6, 30}, {2014, 12, 31}, {2015, 6, 30}, {2015, 12, 31}, {2016, 6, 30}, {2016, 12, 31}, {2017, 6, 30}, {2017, 12, 31}, {2018, 6, 30}, {2018, 12, 31}, {2019, 6, 30}, {2019, 12, 31}, {2020, 6, 30}, {2020, 12, 31}}

Cash flows are simply the product of "FaceValue" and "Coupon" terms on these days plus the "FaceValue" at maturity date, unless you use a rate function instead of a fixed rate.

cf = ConstantArray[faceValue couponRate, Length@cDates];
cf[[-1]] += faceValue;

You could make a CashFlow object from that:

cfo = Cashflow[{cDates, cf}\[Transpose]];

This could be used to calculate the time value of the cashflow:

TimeValue[cfo, 0.05, DateList[][[;; 3]]]

1655.630782

share|improve this answer
    
This solution doesn't allow one to "go back in time". If you run that same code today you will get the dates from {2015, 12, 31} to {2020, 12, 31}. There is a dependency on today's date apparently. Maybe there is something in "Financial Bond" that I have missed. –  user1775372 Aug 24 at 9:41
    
@user1775372 It doesn't "go back in time" because the OP was talking about "remaining coupons", i.e., coupons that will be active in the future. If you want to calculate this from a date in the past just replace the DateList[][[;; 3]], part of the code with the date of your interest. –  Sjoerd C. de Vries Aug 24 at 15:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.