Fifty Shades of J/Chapter 50

From J Wiki
Jump to navigation Jump to search

Table of Contents ... Glossary ... Previous Chapter

Financial Maths and J – part 2; Growth Rates

Principal Topics

IRR (Internal rate of return), income stream. NPV (net present value), NFV (net future value), cost benefit ratio, average growth rate, average compound growth, annuities

Average Growth Rates

‘Growth’ is a concept which is superficially easy but more subtle when it comes to ways of measuring it. The income stream is has an overall absolute growth of 20+50+70+80 = 220 over 4 periods which represents is an overall growth per period of the 4th root of 2.2 = 1.2178, that is 21.78%. This is identical to the IRR if all the inflows were in the last period

   4%:220%100
1.21788
   is
_100 20 50 70 80
   irr _100 0 0 0 220
21.7883

as opposed to an IRR of 32.1% (see Financial Mathematics part 1. IRR is not the only criterion for comparing different project proposals, and it is natural to ask questions about growth, suuch as what is the average growth. The successive period growths in is are 20 50 70 80 divided by 100 12 170 240 and so their average arithmetic average is

   gwth=.monad :'(}.y)%(}:+/\|y)'
   gwth is
0.2 0.416667 0.411765 0.333333
   mean=. +/ % #
   mean 1+gwth is
1.34044

quite close to the IRR of 32.3%. However this takes no account of discounting future costs Another possibility is to adjust all inflows and outflows to net present values by applying a discount rate p, and then obtain the ratio of ((inflows-outflows)/outflows), that is (net benefits)/costs. First the 5% and 10% discounted values of is are compared in

   npv=.] *(ptod@[)^(i.@#@])    NB. net present value
   5 npv is                          NB. is discounted at 5%
_100 19.0476 45.3515 60.4686 65.8162
   10 npv is                         NB. is discounted at 10%
_100 18.1818 41.3223 52.592 54.6411
   mean gwth  5 npv is
0.307983                             NB. is discounted at 5%
    mean gwth 32.1 npv is
0.190569                             NB. is discounted at IRR

19% growth may sound impressive but has to be set against the discounted value of 220 which is +/}.32.31 npv is = 100.00, in other words the initial investment has been returned in real terms but no more. This is what IRR predicts. A more realistic way of computing average growth rate is to compute the sum of the outflows :

   costs=.+/@:(0&>.@-)        NB. outflows (i.e. -ve values)

and divide all items in the stream by costs to obtain (net benefits)/costs :

   bcr=.(+/%costs)@:npv        NB. net benefit cost ratio

Now compare the streams is1 and is2 each discounted by 10% :

   0 bcr is
1.2
   10 bcr is
0.667372
   32.1 bcr is
0.00429935

This gives yet another insight into IRR as that discounted value for which the original investment is returned but with no ultimate increase in wealth, although of course in the business context the inflows are available to spend, reinvest, pay salaries or salaries, etc. Here are another two slightly longer income streams, both with total outflows of 110 and inflows of 290 and differing only in the order of the inputs

   is1=._100 20 45 60 _10 55 70 20 10 10
   is2=._100 20 45 60 _10 10 10 20 70 55
   10 bcr every is1;is2
0.80926 0.67133

Converting bcr’s to an average compound growth rate (agr) means taking the 9th root using %: :

   9%:1+0.80926 0.67131
1.0681 1.0587
   agr=.ktop@((<:@#@])%:>:@bcr)
   10 agr every is1;is2
6.80985 5.8729

that is the agrs are roughly 7% and 6% given a discount rate of 10%. For is

   0 agr is
21.7883

a value which how already been met as a form of the 4th root of 2.2. For a discount rate equal to the IRR

   32.1 agr is
0.107311

that is, the original investment is returned in real terms, and an average intermediate growth rate of around 11% for redistribution has been experienced.

If discounting is applied at around the irr value of 30.2 to is1 then the net benefit would be more or less zero :

   30 agr is1        NB. net benefits are …
0.0527249            NB. … virtually zero

The difference between average growth rate calculations and IRRs is that the former set a discount rate and return a rate of income irrespective of the ultimate effect on capital, wheras the latter calculates a discount rate account on the assumption that capital does no more than break even. Thus AGRs should not be directly compared with IRRs, but should be seen as an alternative criterion. For income streams which do not differ significantly in either length or initial value, it usually results in the same relative ordering.

The relationship between irr and agr can be observed by moving all inflows, 220 in total in the case of is, to the final period :

   irr _100 0 0 0 220
21.7883
   0 agr every _100 0 0 0 220;is
21.788 21.788

that is for a nil discount rate the average compound growth rate is unaffected by when the inflows occur, whereas the earlier they occur the greater is the irr value.

In the case of personal investment, IRR can give a rough guide to the true value of investment returns. Consider a share purchase for £33.50 which attracts nine annual dividends of £2, £2, £2, £2.50, £3, £4, £4.45, £5.25 and £4.50, immediately after the last of which it is sold for £65.80.

   is3=._33.5 2 2 2 2.5 3 4 4.45 5.25 4.55 65.88
   irr is3
14.5668

This gives the investor a figure with which to compare the inflation rate in the same period. For lower rates the sum of the discount rates and average growth rate are roughly similar as would be expected :

   0 2.5 5 10 15 agr every <is3
11.1 8.71 6.51 2.5 _1.04

Annuities

These are a special case where the inflows are regular, and so the relevant calculations have closed forms. The factor {1-(1+p)-n/p} is a multiplier which converts payments per period to present value, so an annuity paid for 10 periods at 6% has a present worth per pound given by

   AnnFac=.-.@((ptok@[)^-@])%0.01&*@[    NB. Annuity factor
   6 AnnFac 10
7.36

as confirmed by

   irr _7.36,10#1
6

Future Value Analysis and Average Compound Growth Rate

An alternative method for evaluating investments is Future Value Analysis (FVA) which is a form of mirror image of NPV, that is for a given discount rate it is the value necessary in tomorrow’s money which is equal to that in today’s whereas NPV gives the value of today’s money tomorrow.

   npv=.] *(ptod@[)^(i.@#@])     NB. net present value
   nfv=.] * ptok@[ ^ i.@-@#@]    NB. net future value

The examples below illustrate how npv ’anchors’ values in the first period whereas nfv anchors them in the last period.

   is
_100 20 50 70 80
   10 npv is
_100 18.1818 41.3223 52.592 54.6411
   10 nfv is
_146.41 26.62 60.5 77 80
   (10 nfv is)*100%146.41
_100 18.1818 41.3223 52.592 54.6411

npv and nfv are inverse in the sense that if the nfv series is scaled down to the initial value of the npv series, the two are identical. Also since the between item ratios are unchanged there is no change to the IRRs :

   ;irr every (10 nfv is1);10 npv is1
18.3545 18.3545

With no discounting each original unit in is has grown to 2.2. With ‘reverse discounting’ at 10% as in nfv each original 100 units have been shown above to have grown to +/26.62 60.5 77 80 = 244.12 units. This is expressed in

   ret=.((+/@:}.@nfv) % -@{.@])    NB. return per unit

Here is the result of doing this for the series is3 :

   4 ret is3
3.02

meaning that each original unit has grown to 3.02. This is the 10th root of 3.02 = 1.1169 which is therefore the average compound growth rate of is3 over the period of the stream. Define

   acg=.ktop@(<:@#@] %: ret)    NB. average compound growth
   4 acg is3                    NB. equivalent % comp growth
11.7  
   4 agr is3                    NB. average growth rate
7.37

The interpretation of ACG is that when the final value of an income stream is fixed, for a given inflation rate the ACG is the average rate which must be applied to previous elements in the stream in order to achieve the final value. This might be an appropriate analysis in e.g. pension planning, or in determining the initial investment and return for the reinvestment of inflows necessary to achieve a final target. In the example above 11.7% reinvestment is required to combat an inflation rate of 4%. This can be compared with an IRR of 13.5%.

Here is another comparable dividend stream :

   is4=._27.9 1.5 1.5 1.6 1.7 1.8 1.8 1.95 2 57.4

which is lower on all these measures :

   (4 ret is3),(irr is3),(4 acg is3),(4 agr is3)
3.015 13.46 11.67 7.373
   (4 ret is4),(irr is4),(4 acg is4),(4 agr is4)
2.647 12.61 11.42 7.135

whereas the following stream is higher in all values :

   is5=._29.5 1.5 2 2 2.5 3 4 4.5 75.3
   (4 ret is5),(irr is5),(4 acg is5),(4 agr is5)
3.307 17.97 16.12 11.66

thus demonstrating that the various techniques lead to different values but in general lead to the same ordering.

Code Summary

irr=: dtop@pos@real@roots                         NB. internal rate of return
dtop=: 100&*@<:@%                                 NB. discount factor to %age
pos=: #~ >&0                                      NB. select positive values
real=: #~ (= +)                                   NB. select real values
roots=: >@{:@p.                                   NB. extract list of roots
npv=: ] *(ptod@[)^(i.@#@])                        NB. net present value
ptod=: %@>:@(0.01&*)                              
bcr=: (+/%costs)@:npv                             NB. net benefit cost ratio
costs=: +/@:(0&>.@-)                              NB. outflows (i.e. -ve values)
nfv=: ] * ptok@[ ^ i.@-@#@]                       NB. net future value
ptok=: >:@*&0.01                                  
acg=: ktop@(<:@#@] %: ret)                        NB. avge compound growth
agr=: ktop@((<:@#@])%:>:@bcr)                     NB. average growth rate per cent
AnnFac=: -.@((ptok@[)^-@])%0.01&*@[               NB. Annuity factor
ret=: ((+/@:}.@nfv) % -@{.@])                     NB. return per unit

Data Streams

is=: _100 20 50 70 80                             
is1=: _100 20 45 60 _10 55 70 20 10 10            
is2=: _100 20 45 60 _10 10 10 20 70 55            
is3=: _33.5 2 2 2 2.5 3 4 4.45 5.25 4.55 65.88    
is4=: _27.9 1.5 1.5 1.6 1.7 1.8 1.8 1.95 2 57.4   
is5=: _29.5 1.5 2 2 2.5 3 4 4.5 75.3

Script

File:Fsojc50.ijs