Content deleted Content added
RandFreeman (talk | contribs) Adding short description: "Historical performance of an investment portfolio" |
|||
Line 471:
}
for (int i = 0; i < cashFlow.length; i++) {
if (numD[i] < 0) {
throw new ArithmeticException("numD[i]<0 , " + "i=" + i);
Line 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];
}
|