- Modified Dietz Method
-
The Modified Dietz Method is a calculation used to determine an approximation of the performance of an investment portfolio based on money-weighted cash flow.[1] A more precise way of calculating performance in the presence of external cash flows remains True Time-Weighted Rate of Return.
In the absence of daily portfolio valuations, the modified Dietz method weights individual cash flows by the amount of time from when those cash flows occur till the end of the period.
The formula for modified Dietz is as follows:
where:
EMV = ending market value
BMV = beginning market value
CF = the net cash flow for the period (contributions to a portfolio are entered as positive cash flows while withdrawals are entered as negative cash flows)
and the sum of each cash flow, CFi, multiplied by its weight, WiThe weight (Wi) is the proportion of the total number of days remaining in the period after the cash flow CFi occurs. Wi can be calculated as:
where:
CD = the number of calendar days during the return period being calculated
Di = The day in the return period on which the cash flow (CFi) occurredThe result of the calculation is given as a rate for the period. i.e. 50%, whether the period is 3 months, 1 year, 2 years, ...
Note that the Simple Dietz Method is just a special case of the Modified Dietz Method (i.e., in the Simple Dietz Method, all cash flows are assumed to occur at the midpoint of the period -- the Modified Dietz Method better takes into account the timing of cash flows).
Modified Dietz is an example of a money (or dollar) weighted methodology. If modified Dietz returns for finite periods (typically monthly) are geometrically linked, the methodology become time weighted (although not true time weighted which requires valuations at the point of each cash flow).
Excel VBA Function for Modified Dietz Return:
Public Function MDIETZ(dStartValue As Double, dEndValue As Double, iPeriod As Integer, rCash As Range, rDays As Range) As Double 'Jelle-Jeroen Lamkamp 10 Jan 2008 Dim i As Integer: Dim Cash() As Double: Dim Days() As Integer Dim Cell As Range: Dim SumCash As Double: Dim TempSum As Double 'Some error trapping If rCash.Cells.Count <> rDays.Cells.Count Then MDIETZ = CVErr(xlErrValue): Exit Function If Application.WorksheetFunction.Max(rDays) > iPeriod Then MDIETZ = CVErr(xlErrValue): Exit Function ReDim Cash(rCash.Cells.Count - 1) ReDim Days(rDays.Cells.Count - 1) i = 0 For Each Cell In rCash Cash(i) = Cell.Value: i = i + 1 Next Cell i = 0 For Each Cell In rDays Days(i) = Cell.Value: i = i + 1 Next Cell SumCash = Application.WorksheetFunction.Sum(rCash) TempSum = 0 For i = 0 To (rCash.Cells.Count - 1) TempSum = TempSum + (((iPeriod - Days(i)) / iPeriod) * Cash(i)) Next i MDIETZ = (dEndValue - dStartValue - SumCash) / (dStartValue + TempSum) End Function
The above VBA program is designed to use with Excel. Here is a Java program written for general purposes.
Java Method for Modified Dietz Return:
private static double modifiedDietz (double emv, double bmv, double cashFlow[], double numCD, double numD[]) { /* Anthony Wong Sep 9, 2010 * * emv: Ending Market Value * bmv: Beginning Market Value * cashFlow[]: Cash Flow * numCD: actual number of days in the period * numD[]: number of days between beginning of the period and date * of cashFlow[] */ double md = -99999; // initialize modified dietz with a debugging number try { double[] weight = new double[cashFlow.length]; for (int i=0; i<cashFlow.length; i++) { weight[i] = (numCD - numD[i]) / numCD; } double ttwcf = 0; // total time weighted cash flows for (int i=0; i<cashFlow.length; i++) { ttwcf += weight[i] * cashFlow[i]; } double tncf = 0; // total net cash flows for (int i=0; i<cashFlow.length; i++) { tncf += cashFlow[i]; } md = (emv - bmv - tncf) / (bmv + ttwcf); } catch (ArrayIndexOutOfBoundsException e) { System.err.println("Caught " + "ArrayIndexOutOfBoundsException: " + e.getMessage()); } catch (ArithmeticException e) { System.err.println("Caught " + "ArithmeticExcepion: " + e.getMessage()); } catch (Exception e) { System.err.println("Caught " + "Exception: " + e.getMessage()); } return md; }
Component Weights
For multiple periods, a return for a portfolio can be calculated by the True Time-Weighted Rate of Return approach and the Modified Dietz Method approximates it. However, since all trades within a single day settle at the close, neither the Modified Dietz Method nor the True Time-Weighted Rate of Return approach is applicable to the case where one seeks to calculate the return of a component of a portfolio for a single day.
For instance, if one did not own a stock at the open (BMV = 0) and bought it during a day for $100 (=CF) and it closed at $99 (=EMV), taking into consideration that all settlement occurs at the close (W = 0), produces a negative infinite Modified Dietz return.
More problems are created if the Modified Dietz method is further adjusted so as to put purchases at the open and sales at the close. For instance, consider a fund opening with just $100 of a single stock that is sold for $110 during the day and where, during the same day, another stock is purchased for $110, closing with a value of $120. At settlement, the trades are a wash and the fund’s return is 20%. The component weights, w, (as opposed to the time weights W) required to get the Modified Dietz Returns for these two issues to roll up to the fund return are 1200% for the first stock and a negative 1100% for the second:
w*10/100 + (1-w)*10/110 = 20/100 → w = 12.
But such weights are absurd in this long-only fund. More complicated situations with more components and trades only make for additional problems. Time weighting is also not applicable since only a single unsegmented period is under consideration and would here lead to the same absurd results.
In order to calculate the return of a component of a portfolio, a more advanced approach is needed than either of these methods provide.
See also
- Accounting rate of return
- Capital budgeting
- internal rate of return
- Rate of Return
- Simple Dietz Method
- True Time-Weighted Rate of Return
Further reading
- Carl Bacon. Practical Portfolio Performance Measurement and Attribution. West Sussex: Wiley, 2003. ISBN 0470856793
- Bruce J. Feibel. Investment Performance Measurement. New York: Wiley, 2003. ISBN 0471268496
Categories:- Finance theories
- Investment
- Mathematical finance
Wikimedia Foundation. 2010.