Modified Dietz a continuation of Part II

If you just want to calculate an Annualized return (without all the bumpf which follows), go here

Suppose we invest $1,000 each year, for five years, and our portfolio is now worth $6,523.33 (the last $1K investment having been made one year ago).

A quickie review:

We make investments of A1, A2, A3, ... AN for time periods (in months*) of T1, T2, T3, ... TN and our current portolio is $P.
* If the times were in YEARS, then we'd get the Annualized return instead of the MONTHLY return.

The MONTHLY return, R, must satisfy:

(1)       f(R) = A1(1+R)T1 + A2(1+R)T2 + A3(1+R)T3 + ... + AN(1+R)TN - P = Σ An(1+R)Tn - P = 0

We have a linear approximation for R, namely:

(2)       RLinear = { P - Σ An} / ΣAnTn

Now we consider applying ...
>Is that the end of the quickie review?
Yes.

Now we consider applying this linear approximation at the end of EACH month, calculating a return for each month. If the return for the first month is 1.23% then we put r1=0.0123 and if all the Monthly Returns are called r1, r2, r3 ... rN (for N successive months) then we can get a return for all N months by computing the N-Month Gain Factor:
GN = (1+r1)(1+r2)(1+r3) ...(1+rN)     then Dietz's annualized return is just:    RDietz = GN12/N - 1 so that ...

>Hold on a minute! If we calculate each month then we gotta know that P-value each month, right?
Yes, we must know the value of our portfolio each month. But remember that our linear approximation replaces (1+R)T by 1+TR (in Equation (1)) and that's a pretty lousy approximation if either T or R is large. However, if we do things monthly, then T is a fraction of a month ... and the monthly returns wouldn't be very large, eh? That's the idea behind this Dietz technique.

Remember the example in Part I?

That linear approximation isn't bad when R is small ... and how big can a monthly return be?


Fig. 1
Okay, let's do it for the first month, assuming we start from scratch, with no money invested.

We now assume that A1, A2, A3 etc. are our investments for that first month (negative if they are withdrawals from our portfolio) and T1, T2, T3 etc. are fractions of a month and represent the length of time each investment is in (or out) of the portfolio.

>Fractions of a month?
If an investment is made on January 12, then it's in for (31-12+1)=20 days out of the 31 days in January, so the length of time - as a fraction of a month - is just 20/31=0.645, okay?
>Okay.

Then we can use Equation (2) and calculate r1. Now on to the second month.

>Are we going to go thru every single ...?
Patience. Just two months, then we'll get the idea.

We start our second month with, say, P1 dollars.
That's the P-value we used in Equation (2) to calculate r1 for that first month when we started with nothing in our portfolio.

At the end of month two our portfolio is worth P2 dollars.
But now, not only does an investment A (invested for a fraction of a month, T) grow during that month by a factor (1+r2)T but so does P1, by a factor (1+r2).   Remember, P1 is in for the whole month!

So Equation (1) is changed to read:

(3)       f(R) = P1(1+r2) + Σ An(1+r2)Tn - P2 = 0

and the linearization (replacing things like (1+r)T by 1+Tr) gives

(4)       f(R) = P1(1+r2) + Σ An(1+Tnr2) - P2 = 0

in which case we can find r2, namely

(5)       r2 = { P2 - P1 - Σ An} / { P1 + ΣAnTn }


>Can you just jump to the final answer?
Okay.

If

  • our portfolio starts a particular month with a market value of P1 and
  • the investments for that month are A1, A1, ... AN (being negative in the case of a withdrawal) and
  • these dollar values are invested for fractions of a month: T1, T1, ... TN and
  • the market value of our portfolio at the end of the month is P2 (before any first-of-the-month investment)
then the Modified Dietz approximate gain for that month is given by the magic formula:

and if these gains are computed for each of N successive months, say r1, r2, ... rN, then an approximate annualized return for the portfolio is:

R = {(1+r1)(1+r2)...(1+rN)}12/N - 1

>I assume we'd have a problem if we started with nothing and our cash flow sum was zero, like ΣA = 0,
and our time-weighted stuff, ΣAT, that was also 0 and ...

Quite so. You'd get {P2 - 0}/0 and the dreaded #DIV /0!. For example, if we invest $1,000 at the beginning of the month and, every week - or, let's say, 0.25 months - we withdraw $1K, then another $1K withdrawal then deposit $1K and, at the end of the month we find that our portfolio is worth just $1.00, then ...

>That's confusing. Can't you ...?
Here's a table:
AmountTime
$1,0001.00
-$1,0000.75
-$1,0000.50
$1,0000.25
where the initial $1,000 was invested for 1.00 months and the $1,000 withdrawal was 0.75 months ago, etc. and, at the end of the month, we have just $1.00 in our portfolio.
>A picture, please.
Okay, here's a picture:

The left half shows the values of f(R), as in Equation (1), and where we've called x = 1+R ... and the right half shows the value of our portfolio 1.00 months ago then 0.75 months ago then etc. ... with the returns for each 1/4 month, namely 50% then 150% then 0% then
-20% and we end up with just that $1.00 in our portfolio. Dietz would give ... uh ... #DIV/0!, because:

ΣAn = 1000-1000-1000+1000 = 0, and
ΣAnTn = 1000(1.00)-1000(0.75)-1000(0.50)+1000(0.25) = 0
and Dietz says the monthly return is: r = {1 - 0}/0 = ...

>#DIV/0!, I get it. Other than that, is Dietz any good?
Let's do an example ...
>Can you do it for just two months ... please?
Well, we shouldn't test Dietz on just two months, but we'll consider IDENTICAL months, where we begin the first month with
P0 = $0 and, in each month, we make five transactions as follows:

n
An
Tn
AnTn
1
$600
1 month
$600
2
-$300
0.8 month
$-240
3
$100
0.5 month
$50
4
-$100
0.3 month
-$30
5
$200
0.2 month
$40
SUMsΣ An =$500 ΣAnTn=$420
Further, at the end of each month the market values of our portfolio are:
Month
1
2
3
4
5
6
7
8
9
10
11
12
Market Values
$508.40
$1,026.97
$1,555.91
$2,095.44
$2,645.75
$3,207.06
$3,779.61
$4,363.60
$4,959.28
$5,566.86
$6,186.60
$6,818.74

>Funny ... those Market Values.
Actually, I picked them so that the monthly gain, every month, is exactly 2.0% so we know what the correct answer is, for the annualized return, namely 1.0212 - 1 = .2682 or 26.82%.

Okay, we repeat, twelve times, calculations like the magic formula: r = { P2 - P1 - Σ An} / { P1 + ΣAnTn }

Here goes:

r1 = {508.40 - 0 - 500}/(0+420) = 0.0200 (or 2.00%)

r2 = {1026.97 - 508.40 - 500}/(508.40+420) = 0.0200 (or 2.00%)

etc. etc.

r12 = {6818.74 - 6186.60 - 500}/(6186.60+420) = 0.0200 (or 2.00%)

Note that we chose the same monthly activity so we could use, again and again, the two numbers An =$500 and AnTn=$420.

>How convenient.
Pay attention. We get an annualized Dietz approximation of (1.020)(1.020)(1.020) ... (1.020) - 1 = .268 (or 26.8%).

>Pretty good! How does the Linear approximation compare to Dietz. The Linear doesn't have to deal with monthly market values, right? Just the starting and ending market values and the money that goes in and out and ...
The Linear approximation is 25.8%, obtained from Equation (2) including the An and Tn for all 12 months ... all at once.

>So Dietz is really good, eh?
Yes, so long as the monthly gains are reasonably small ... and the market isn't too volatile.

>Volatile?
Yes. In the above example, every month had the same gain. If we vary these monthly gains, then ...

>Example, please.
Suppose our end-of-month market values are :
$505.86 $1015.89 $1,521.87 $2,054.85 $2,556.14 $3,082.44 $3,647.42 $4,166.13 $4,716.52 $5,309.38 $5,812.11 $6,315.11

Then we'd get (for our annualized return): Exact = 10.1%, Linear = 9.9% and Modified Dietz = 11.4%

>I've heard of Time-weighted Returns. Is that Dietz?
A time-weighted return doesn't have anything to do with YOUR portfolio gains (or losses). It measures how well (or poorly) a portfolio or mutual fund manager does ... normally. However, there's seems to be a lack of agreement as to what "Time-weighted" means. Sometimes it's just Dietz, renamed! In any case, ignore it!

>And why is Dietz "modified"??
The orginal, unmodified Dietz formula assumed every investment was made in the middle of the month, so every Tn = 0.5 month.

>Are you recommending Dietz?
No, I don't recommend, I analyze and write tutorials and sleep and ...

>Yeah, yeah, I've heard that before.

One other thing of interest:
Dietz does an excellent job of determining each MONTHLY return and, for twelve month's worth of returns, Dietz's "annualized" gain factor is calculated according to   1+R = (1+r1)(1+r2)...(1+r12)  

If the monthly returns are all equal, Dietz does well ... as in the first example, above, where the gain each month was 2%. But, in the second example I changed the gain each month, at random (so the end-of-month portfolios changed randomly) and Dietz didn't do as well. In fact, the Newton return (see Part II) ignores the monthly portfolio market values, using only the amounts of each investment (or withdrawal) and the time when each was made. In fact, if these don't change, then the Exact annualized return won't change - that's the Newton return, eh?

>But Dietz always gives a larger annual return, right?
Wrong. It depends upon the monthly portfolio market values.

Suppose we invest $1,000 at the beginning of April and another $1,000 in the middle of April then sleep for a year, ignoring our portfolio ... which varies dramatically throughout the year. We wake up to find that the market value of our portfolio is $2,000. We haven't made a cent. Our annual return has been 0%. We might as well have kept our $2K under the pillow.

However, if our portfolio went down then up as in Fig. 2a, Dietz would say our return has been negative. If our portfolio went up then down (as in Fig. 2b), Dietz would say it's been positive.

>Newton, I assume, would disagree.
Indubitably.


Fig. 2a


Fig. 2b

>These are pretty exaggerated examples. I mean, making or losing $500 a month ...
Well, if you'd like more mathematical ritual, click HERE for Part 3 1/2.


>How different can Dietz and Newton be?
I have a spreadsheet you can play with:

In fact, we can generate various Random monthly portfolio values and watch Dietz change ... all the while staring at Newton's ANNUALIZED RETURN. In fact, using just a single Newton iteration, starting with the Linear approximation, is pretty darn good. In fact ... uh ... are you listening?

for Part IV.

or even click HERE for Part 3 1/2

or even click here for "just Dietz stuff".