0
|
15501 Views
|
9 Replies
|
3 Total Likes
View groups...
Share
GROUPS:

# Annuity with irregular payments

Posted 10 years ago
 For some reason I can't figure out how to solve this problem. How much money do I need to deposit today, earning 4% interest, to make the following semi-annual irregular payments over the next 5 years - $500,$673, $245,$345, $245,$674, $425,$145, $37,$423? Here's what I've come up with but it doesn't like the variable payment payments={500, 673, 245, 345, 245, 674, 425, 145, 37, 423}; Solve[TimeValue[Annuity[{payements, {-onePay}}, 5, 1/2], EffectiveInterest[.04, 1/2], 5] == 0, onePay]  Thanks! Tim
9 Replies
Sort By:
Posted 10 years ago
 Udo, Your use of Fold[] was a neat bit of programming. When I worked through this approach it gaveIn[105]:= p=.;s=.; s=(((((((((p1.02-500)1.02-673)1.02-245)1.02-345)1.02-245)1.02-674)1.02-425)1.02-145)1.02-37)1.02-423; Solve[s==0,p] Out[107]= {{p->3378.77}}In[108]:= p=.;s=.;s=(((((((((p1.0198-500)1.0198-673)1.0198-245)1.0198-345)1.0198-245)1.0198-674)1.0198-425)1.0198-145)1.0198-37)1.0198-423; Solve[s==0,p] Out[109]= {{p->3381.86}}The difference encapsulated in your model result is due to using an approximate rate of 1.02 versus a more precise effective rate of 1.0198. Ludwig Schläfli was a good mathematician, even if not seen by others as good in practical matters.
Posted 10 years ago
 If I understand your question, it is why should the term "effectiverate" be used? This is a label referring to the interest rate per period in the problem, with that period being 1/2 a time interval. Interest rates are normally quoted on an annual basis which is useful for purposes of comparison, and are often referred to as the nominal annual rate. Given a nominal interest rate 0.04 the effective interest rate e is given by ((1+e)^2)-1 = 0.04 where there are 2 periods in one year. Sometimes the term effective rate is used by bankers to mean either the nominal rate or the effective rate as defined here, which can be confusing. The naive approach using "effectiverate" showed Daniel's required deposit was different because he used continuous compounding rather than effective rate. In making this type of calculation we implicitly assume an average rate of interest over the term of the investment; the answer obtained depends on which mean rate of return is used, which could be arithmetic mean rate of return, or geometric mean rate of return, the latter being assumed by "effectiverate". How much do you think Ludwig Schläfl would have invested if there were penalties for not delivering on payments? Why is your answer of 3378.77 different to the other two?
Posted 10 years ago
 Given a nominal interest rate 0.04 the effective interest rate e is given by ((1+e)^2)-1 = 0.04 where there are 2 periods in one year. True, e is not 1.04/2, of course. Thanks.
Posted 10 years ago
 Assume that payments occur every 6 months, and payments and interest receipts coincide and take a naive approach payments = {500, 673, 245, 345, 245, 674, 425, 145, 37, 423}; (*made 6 monthly*) Print["payments required = ", payments]; effectiverate = (1 + .04)^0.5 - 1; (*compunding every 6 months*) Print["effectiverate = ", effectiverate]; bondelements = Table[payments[[i]]/(1 + effectiverate)^i, {i, 1, Length[payments]}]; (*investment components to make payments*) p = Apply[Plus, bondelements]; (*principal investment needed*) Print["principal investment required = ", p]; output is payments required = {500,673,245,345,245,674,425,145,37,423} effectiverate = 0.0198039 principal investment required = 3381.8 Use of standard expressions by Daniel gives another answer payments = {500, 673, 245, 345, 245, 674, 425, 145, 37, 423}; tvm = TimeValue[Cashflow[payments, 1/2], EffectiveInterest[.04, 0], -1/2]; Print["principal investment required = ", tvm]; principal investment required = 3375.65 But this is reconciled if we use annual compounding in the code, EffectiveInterest[.04,1] payments = {500, 673, 245, 345, 245, 674, 425, 145, 37, 423}; tvm = TimeValue[Cashflow[payments, 1/2], EffectiveInterest[.04, 1], -1/2]; Print["principal investment required = ", tvm]; principal investment required = 3381.8 It is important to sketch a time-line diagram when timing or amounts become irregular, such as when interest is calculated annually on average balances. Using the Ruffle[list1,list2] command is useful for resolving irregularities in the problem formulation.
Posted 10 years ago
 Why this effectiverate should be used, Brett?  In[13]:= Clear[pmt] pmt = {500, 673, 245, 345, 245, 674, 425, 145, 37, 423}; Solve[Fold[Sqrt[1.04] #1 - #2 &, x, pmt] == 0, x] Out[15]= {{x -> 3381.8}} If somebody calls something effective, some modeling happened: With Daniel's model one has to deposit 3375.65, with my model 3378.77 and with your model one needs 3381.8 to get the payments done. Ludwig Schläfli sollte wie sein Vater Geschäftsmann werden. Aber er machte die denkbar schlechtesten Geschäfte, da er nicht begreifen konnte, dass man einen Gegenstand teurer verkaufte, als dass man ihn einkaufte. Ludwig Schläfli should become a businessman like his father. But he made the worst possible deals because of his inability to understand that people buy cheap and sell dear.
Posted 10 years ago
 @Udo - The typo was a mistake on my part but even with it corrected it doesn't work.
Posted 10 years ago
 You committed a typoso possibly without typo your method works too
Posted 10 years ago
 Doesn't In[13]:= Solve[Fold[1.02 #1 - #2 &, x, {500, 673, 245, 345, 245, 674, 425, 145, 37, 423}] == 0, x] Out[13]= {{x -> 3378.77}} help? (The interest is per year, the payment starts 6 month after the deposit and in the end no money remains.)And this shows the account history just after a payment resp. the initial deposit ListPlot[Transpose[ {Range[0, 5, 0.5], FoldList[1.02 #1 - #2 &, 3378.77, {500, 673, 245, 345, 245, 674, 425, 145, 37, 423}]} ], PlotLabel -> "Tim pays the bill"] and this is what has been payed every half year: In[32]:= (1.02 Most[#] - Rest[#])&[FoldList[1.02 #1 - #2 &, 3378.77, {500, 673, 245, 345, 245, 674, 425, 145, 37, 423}]] Out[32]= {500., 673., 245., 345., 245., 674., 425., 145., 37., 423.} probe it In[33]:= % - {500, 673, 245, 345, 245, 674, 425, 145, 37, 423} Out[33]= {0., 0., 0., 0., 0., 0., 0., 0., 0., 0.} 
Posted 10 years ago
 I'm not certain but I suspect you want Cashflow rather than Annuity for this purpose. TimeValue should then suffice for the rest; I don't think Solve is needed.In particular it might be along the lines below. payments = {500, 673, 245, 345, 245, 674, 425, 145, 37, 423}; TimeValue[Cashflow[payments, 1/2], EffectiveInterest[.04, 0], -1/2] (* Out[64]= 3375.65382702 *) Some parameters might need to be adjusted in case the time period alignments are not as intended.