Definition at line 8 of file economic_entity.h.
#include <economic_entity.h>
|
| virtual double | FV (int n, double i, double P, double A) const |
| |
| virtual std::unordered_map< std::string, double > | GenerateParamList () const |
| |
| virtual double | GetEconParameter (const std::string &key) const |
| |
| void | InitEconParameters () |
| |
| virtual double | PMT (int n, double i, double P, double F) const |
| |
| virtual double | PV (double i, const std::vector< double > &A) const |
| |
| virtual double | PV (int n, double i, double F, double A) const |
| |
| virtual void | SetEconParameter (const std::string &key, double value) |
| |
◆ FV()
| virtual double EconomicEntity::FV |
( |
int | n, |
|
|
double | i, |
|
|
double | P, |
|
|
double | A ) const |
|
inlinevirtual |
calculates the future value of a series of payments, using compound rate i per time period, for present payment P plus regular payments A that occurs every period for n periods.
- Parameters
-
| n | Number of periods |
| i | Compound Rate |
| P | Present payment |
| A | Regular payment at each period. |
- Returns
- Future value
Definition at line 73 of file economic_entity.h.
◆ GenerateParamList()
| virtual std::unordered_map< std::string, double > EconomicEntity::GenerateParamList |
( |
| ) |
const |
|
inlinevirtual |
◆ GetEconParameter()
| virtual double EconomicEntity::GetEconParameter |
( |
const std::string & | key | ) |
const |
|
inlinevirtual |
Fetches the value corresponding to "key" from financial_data_.
- Parameters
-
| key | the name of the parameter to fetch. Must be an exact match |
- Returns
- The value associated with "key" in financial_data_
Definition at line 13 of file economic_entity.h.
◆ InitEconParameters()
| void EconomicEntity::InitEconParameters |
( |
| ) |
|
|
inline |
Initialize the list of EconParameters from the ParamList.
Definition at line 35 of file economic_entity.h.
◆ PMT()
| virtual double EconomicEntity::PMT |
( |
int | n, |
|
|
double | i, |
|
|
double | P, |
|
|
double | F ) const |
|
inlinevirtual |
computes the regular payment for n time periods that is equivalent to the combination of a single payment of P immediately and a single payment F after n time periods, using a discount rate of i per time periods
- Parameters
-
| n | Number of payments |
| i | Discount rate |
| P | Immediate payment |
| F | Future payment |
- Returns
- the regular payment (PMT) which is equivalent to P and F
Definition at line 96 of file economic_entity.h.
◆ PV() [1/2]
| virtual double EconomicEntity::PV |
( |
double | i, |
|
|
const std::vector< double > & | A ) const |
|
inlinevirtual |
calculates the present value of a series of payments described by the vector [A], occurring over a time period defined by the length of [A], with a discount rate of i per time periods
- Parameters
-
| i | Discount rate |
| A | Vector of payments which also defines how many time periods are summed over (by the length of A) |
- Returns
- Present value
Definition at line 119 of file economic_entity.h.
◆ PV() [2/2]
| virtual double EconomicEntity::PV |
( |
int | n, |
|
|
double | i, |
|
|
double | F, |
|
|
double | A ) const |
|
inlinevirtual |
calculates the present value of a series of payments, using discount rate i per time period, for future payment F that occurs n time periods in the future plus regular payments A that occurs each time period for n periods
- Parameters
-
| n | Number of periods |
| i | Discout rate |
| F | Future payment |
| A | Regular payments at each period |
- Returns
- Present value
Definition at line 51 of file economic_entity.h.
◆ SetEconParameter()
| virtual void EconomicEntity::SetEconParameter |
( |
const std::string & | key, |
|
|
double | value ) |
|
inlinevirtual |
Add a new EconParameter to financial_data_.
- Parameters
-
| key | The key of the EconParameter |
| value | The value of the EconParameter |
Definition at line 25 of file economic_entity.h.
◆ kDefaultUnitCost
| int EconomicEntity::kDefaultUnitCost = 1 |
|
staticconstexprprotected |
The documentation for this class was generated from the following file: