Content deleted Content added
(One intermediate revision by one other user not shown) | |||
Line 1:
{{Short description|Historical performance of an investment portfolio}}
The '''modified Dietz method'''<ref name="Dietz1966">{{cite book
|author=Peter O. Dietz
Line 470 ⟶ 471:
}
for (int i = 0; i < cashFlow.length; i++) {
if (numD[i] < 0) {
throw new ArithmeticException("numD[i]<0 , " + "i=" + i);
Line 478 ⟶ 479:
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];
}
|