Skip to content

Commit caafda8

Browse files
committed
Add test to XIRR
1 parent dd78dac commit caafda8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,7 @@ describe('FinanceJS', function() {
115115
cal.IAR(0.08, 0.03).should.equal(4.854368932038833);
116116
});
117117

118+
it('should compute XIRR', function() {
119+
cal.XIRR([-1000, -100, 1200],[new Date(2015, 11, 1 ), new Date(2016, 7, 1 ), new Date(2016, 7, 19 )],0 ).should.equal(14.11);
120+
});
118121
});

0 commit comments

Comments
 (0)