Modified Dietz method: Difference between revisions

Content deleted Content added
Line 457:
 
try {
 
double[] weight = new double[cashFlow.length];
 
Line 466 ⟶ 465:
for (int i=0; i<cashFlow.length; i++) {
if (numD[i] < 0) {
throw new ArithmeticException ("numD[i]<0 , " + "i=" + i);
}
weight[i] = (double) (numCD - numD[i]) / numCD;