33 lines
882 B
C++
33 lines
882 B
C++
#ifndef _CASHFLOW_CASHFLOW_HPP_
|
|
#define _CASHFLOW_CASHFLOW_HPP_
|
|
#include <math.h>
|
|
#include <cashflow/passthru.hpp>
|
|
#include <cashflow/purecflo.hpp>
|
|
#include <cashflow/prepay.hpp>
|
|
#include <common/block.hpp>
|
|
|
|
class CashFlow
|
|
{
|
|
public:
|
|
CashFlow();
|
|
~CashFlow();
|
|
WORD generateCashFlows(const PurePassThru &somePurePassThru,Block<PureCashFlow> &cashFlows);
|
|
WORD generateCashFlows(const PurePassThru &purePassThru,Block<PureCashFlow> &cashFlows,PrePay somePrepay);
|
|
WORD convergePSA(PurePassThru &purePassThru,double convergeFactor,double issueBal,short runMonths);
|
|
WORD binaryPartitionPSA(PurePassThru &purePassThru,double convergeFactor,double issueBal,short runMonths);
|
|
private:
|
|
enum {MinPSA=0,MaxPSA=1600};
|
|
double factorFlows(const PurePassThru &purePassThru,double issueBalance,short runMonths);
|
|
};
|
|
|
|
inline
|
|
CashFlow::CashFlow()
|
|
{
|
|
}
|
|
|
|
inline
|
|
CashFlow::~CashFlow()
|
|
{
|
|
}
|
|
#endif
|