Package name.abuchen.portfolio.math

Source Code of name.abuchen.portfolio.math.IRR

package name.abuchen.portfolio.math;

import java.util.Date;
import java.util.List;

import name.abuchen.portfolio.math.NewtonGoalSeek.Function;

public final class IRR
{
    public static double calculate(List<Date> dates, List<Double> values)
    {
        Function npv = new NPVFunction(dates, values);
        Function derivative = new PseudoDerivativeFunction(npv);
        return NewtonGoalSeek.seek(npv, derivative, 0.05d) - 1;
    }
}
TOP

Related Classes of name.abuchen.portfolio.math.IRR

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.