This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.math.BigDecimal; | |
| public class IRR { | |
| //Approximate number of days between 2 successive cash flows. Eg. For monthly cash flows interval will be 30 | |
| private static final int INTERVAL = 30; | |
| public static BigDecimal getAnnualIrr(double[] cash_flows) { | |
| return calculateIrrRecursively(BigDecimal.valueOf(1.0), BigDecimal.valueOf(100.0), BigDecimal.valueOf(1.0), cash_flows); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.FileInputStream; | |
| import java.io.FileNotFoundException; | |
| import java.io.FileOutputStream; | |
| import java.io.IOException; | |
| import java.io.OutputStream; | |
| import java.security.InvalidAlgorithmParameterException; | |
| import java.security.KeyStore; | |
| import java.security.KeyStoreException; | |
| import java.security.NoSuchAlgorithmException; | |
| import java.security.UnrecoverableEntryException; |