Content deleted Content added
Tags: Mobile edit Mobile web edit Advanced mobile edit |
|||
Line 452:
==Java method for modified Dietz return==
<syntaxhighlight lang="java">
private static double modifiedDietz
/* emv: Ending Market Value
Line 467:
if (numCD <= 0) {
throw new ArithmeticException
}
for (int i=0; i<cashFlow.length; i++) {
if (numD[i] < 0) {
throw new ArithmeticException
}
weight[i] = (double) (numCD - numD[i]) / numCD;
|