Initial
This commit is contained in:
22
cashflow/Irr.hpp
Normal file
22
cashflow/Irr.hpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef _CASHFLOW_IRR_HPP_
|
||||
#define _CASHFLOW_IRR_HPP_
|
||||
#ifndef _COMMON_ARRAY_HPP_
|
||||
#include <common/array.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_MATH_HPP_
|
||||
#include <common/math.hpp>
|
||||
#endif
|
||||
|
||||
class IRR
|
||||
{
|
||||
public:
|
||||
static double irr(Array<double> &cashflows);
|
||||
static double npv(Array<double> &cashflows,double rate);
|
||||
static double pv(Array<double> &cashflows,double rate);
|
||||
static double pvD(Array<double> &cashflows,double rate);
|
||||
private:
|
||||
static double IRR_ERROR;
|
||||
static double IRR_ACCURACY;
|
||||
static int IRR_MAX_ITERATIONS;
|
||||
};
|
||||
#endif
|
||||
Reference in New Issue
Block a user