![]() |
eFinancialPlanner
V1.0 (proof of concept)
Personal Financial Planning based on Maslowian Portfolio Theory
|
Public Member Functions | |
| string | get_full_name () |
| float | age (int Mnbr=0) |
| int | months2simulate () |
| int | load_from_db (string investorID) |
| void | load_ER (int person=0, char person_type= 'i') |
| void | save_ER (int person=0, char person_type= 'i') |
| void | load_covar (int person, char person_type= 'i') |
| void | save_covar (int person, char person_type= 'i') |
Public Attributes | |
| int | investor_id |
| string | user_name |
| string | first_name |
| string | last_name |
| string | password |
| string | currency |
| the default currency for that customer More... | |
| struct tm | birth_date |
| float | simulate_till_age |
| float * | assetClass_covar = new float[(NBR_ASSET_CLASSES + 1) * (NBR_ASSET_CLASSES + 1)] |
| float | assetClass_mu [(NBR_ASSET_CLASSES+1)] |
| note: index 0 not used More... | |
| std::map< int, string > | assetClass_name |
| note: index 0 not used More... | |
| std::map< int, float > | ER |
| std::map< int, std::map< int, float > > | covar |
Protected Member Functions | |
| int | age2monthNbr (float theAge) |
| string | dateStr2Age (string the_date) |
| bool | save () |
| int | get_from_db (string investorID, string password) |
| bool | add_to_db () |
| bool | exists (int iid) |
| void | load_preferences () |
| sets the experience, knowledge and desirability vectors More... | |
| bool | save_preferences () |
| sets the experience, knowledge and desirability vectors More... | |
| void | set_max_exposure () |
| sets the max_exposure vector based on the experience, knowledge and desirability More... | |
| bool | set_scale (string scale_type, int ac, int val) |
| investor () | |
| void | reload_ER (int person, char person_type= 'i') |
| TODO: the ER and assetClass_mu as well as the covar and assetClass_covar are redundant ==> eliminate the C-style assetClass_*. More... | |
| void | reload_covar (int person, char what2do, char person_type= 'i') |
Protected Attributes | |
| std::map< int, int > | experience |
| std::map< int, int > | knowledge |
| std::map< int, int > | desirability |
| std::map< int, float > | max_exposure |
| the maximum exposure per asset class More... | |
class investor
copyright: (c) Philippe De Brouwer 2014
last modification:
Definition at line 11 of file investor.class.cpp.
|
inlineprotected |
CONSTRUCTOR
needed because initalization of vectors cannot be done inside a class outside of a method
Definition at line 60 of file investor.class.cpp.
|
protected |
add_to_db
does not check data any more, simply tries to push it to the DB only returns 0 if the userID already exists.
Definition at line 313 of file investor.class.cpp.
|
inline |
returns the age of a customer in years (with decimal part)
Definition at line 108 of file investor.class.cpp.
|
inlineprotected |
age2monthNbr
returns the month number for a given age note that this is negative for ages younger than the actual age.
Definition at line 200 of file investor.class.cpp.
|
inlineprotected |
dateStr2Age
Definition at line 209 of file investor.class.cpp.
|
protected |
exists
checks if a given investor-id really exists
Definition at line 343 of file investor.class.cpp.
|
protected |
get_from_db returns the investor_id if successful (otherwise 0)
Definition at line 249 of file investor.class.cpp.
| string investor::get_full_name | ( | ) |
overloading << operator overload the << operator to output the goal in a readable format get_full_name returns the full name of an investor
Definition at line 103 of file investor.class.cpp.
|
inherited |
load_covar
< note: person_type = 'i' for persons (later to provide for 'a' advisor, organization, etc.)
< TODO eliminate this
if we did not find a personalized expectation for each asset class, then we load the default values
< TODO eliminate this
Definition at line 135 of file market.class.cpp.
|
inherited |
load_ER
< note: person_type = 'i' for persons (later to provide for 'a' advisor, organization, etc.)
Definition at line 61 of file market.class.cpp.
| int investor::load_from_db | ( | string | uid | ) |
returns the investor_id if successful (otherwise 0) NOTE for user interaction use get_from_db(uid, password) for password verification!!
Definition at line 134 of file investor.class.cpp.
|
protected |
sets the experience, knowledge and desirability vectors
set_preferences
Definition at line 383 of file investor.class.cpp.
|
inline |
months2simulate
Definition at line 124 of file investor.class.cpp.
|
protectedinherited |
reload_vol
the situation here is more complex as the user expect that only the volatilities will be reset to the default values and not the correlations ...
what2do = [v|c|b] as in [vol | corr | both]
< both
< volatilities
< correlations
Definition at line 281 of file market.class.cpp.
|
protectedinherited |
TODO: the ER and assetClass_mu as well as the covar and assetClass_covar are redundant ==> eliminate the C-style assetClass_*.
set_mu
the expect value for all asset classes set_covar
the expect value for all assets reload_ER
note: person_type = 'i' for persons (later to provide for 'a' advisor, organization, etc.)
this function simply deletes the personalized expected returns. This is sufficient because later we check if they exists and only then load them (see function load_ER().
Definition at line 247 of file market.class.cpp.
|
protected |
save
Definition at line 220 of file investor.class.cpp.
|
inherited |
save_covar
Definition at line 172 of file market.class.cpp.
|
inherited |
save_ER
Definition at line 109 of file market.class.cpp.
|
protected |
sets the experience, knowledge and desirability vectors
Definition at line 416 of file investor.class.cpp.
|
protected |
sets the max_exposure vector based on the experience, knowledge and desirability
get_max_exposure
sets the map max_exposure in this object
Definition at line 363 of file investor.class.cpp.
|
protected |
set_scale
Definition at line 402 of file investor.class.cpp.
|
inherited |
Definition at line 16 of file market.class.cpp.
|
inherited |
note: index 0 not used
Definition at line 17 of file market.class.cpp.
|
inherited |
note: index 0 not used
Definition at line 18 of file market.class.cpp.
| struct tm investor::birth_date |
Definition at line 20 of file investor.class.cpp.
|
inherited |
Definition at line 26 of file market.class.cpp.
| string investor::currency |
the default currency for that customer
Definition at line 19 of file investor.class.cpp.
|
protected |
Definition at line 41 of file investor.class.cpp.
|
inherited |
Definition at line 25 of file market.class.cpp.
|
protected |
Definition at line 39 of file investor.class.cpp.
| string investor::first_name |
Definition at line 16 of file investor.class.cpp.
| int investor::investor_id |
Definition at line 14 of file investor.class.cpp.
|
protected |
Definition at line 40 of file investor.class.cpp.
| string investor::last_name |
Definition at line 17 of file investor.class.cpp.
|
protected |
the maximum exposure per asset class
Definition at line 42 of file investor.class.cpp.
| string investor::password |
Definition at line 18 of file investor.class.cpp.
| float investor::simulate_till_age |
Definition at line 21 of file investor.class.cpp.
| string investor::user_name |
Definition at line 15 of file investor.class.cpp.