eFinancialPlanner  V1.0 (proof of concept)
Personal Financial Planning based on Maslowian Portfolio Theory
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
aGOAL Struct Reference

Public Member Functions

 aGOAL (int investor_id=0)
 constructor More...
 
void set_from_db ()
 
void set_to_pstmnt ()
 
bool save ()
 
bool add_to_db ()
 
void save_results ()
 
bool set_goal_type (string g_type)
 saves the benchmark and savings plan, !!! TODO More...
 
bool set_amount (string amnt)
 Needs goal_type to be set first. More...
 
bool set_description (string desc)
 
bool set_currency (string curr)
 
bool set_priority (string imp)
 check if exists, if not then add the default More...
 
bool set_from_date (string f_date)
 
bool set_till_date (string t_date)
 
bool set_frequency (string freq)
 
bool set_realization_age (string real_age, float actual_age)
 
bool set_max_shortfall (string shortfall)
 
int show_graph_till_MNbr ()
 

Public Attributes

int goal_id
 variables stored in database before investment_problem.solve(): More...
 
int investor = 0
 
int goal_type
 (0, "unallocated"), (1, "amount@date"), (2, "income from/to"), (3, "rainy day savings"), (4, "amount asap"); More...
 
float amount
 
float target_amount
 target_amount is for goal_type amount More...
 
std::map< int, float > means_goal
 the means implied by the goal (eg. the regular income during retirement for goal type income from/to) More...
 
string description
 
string currency
 
int priority
 
string from_date
 
string till_date
 
string frequency
 
float realization_age
 
float max_shortfall
 
float alpha = 0.1
 variables calculated and allocated during investment_problem.solve() BEFORE solution: More...
 
int realization_monthNbr
 
std::map< int, float > saving_plan
 variables calculated and allocated during investment_problem.solve() AFTER solution: More...
 
int optimal_portf
 
float realized_shortfall
 
std::map< int, float > benchmark
 
std::string remarks
 
string color
 
string color_followup
 
bool success
 
string simulation_string = ""
 a string containing the simulated values of the advised portfolio [45,1000], [45,083, 1100], etc.]] More...
 
float simulation_endvalue = 0
 the last value obtained by the simulation (only used in the Follow-Up screens to allow the evolution to start from the end-value of the simulation) More...
 
string s_low = ""
 javaScript variable for the lower quantile as [[45,100], [45.1,101],....] More...
 
string s_exp = ""
 
string s_high = ""
 

javaScript variable for the expecpted evolution

More...
 
string s_goal = ""
 

javaScript variable for the upper quantile

More...
 

Friends

ostream & operator<< (ostream &os, const aGOAL &the_goal)
 other functions: More...
 

Detailed Description

struct aGOAL

Definition at line 5 of file aGOAL.struct.cpp.

Constructor & Destructor Documentation

aGOAL::aGOAL ( int  investor_id = 0)
inline

constructor

Definition at line 8 of file aGOAL.struct.cpp.

Member Function Documentation

bool aGOAL::add_to_db ( )

Definition at line 280 of file aGOAL.struct.cpp.

bool aGOAL::save ( )

save

Definition at line 327 of file aGOAL.struct.cpp.

void aGOAL::save_results ( )
bool aGOAL::set_amount ( string  amnt)

Needs goal_type to be set first.

Definition at line 142 of file aGOAL.struct.cpp.

bool aGOAL::set_currency ( string  curr)

Definition at line 148 of file aGOAL.struct.cpp.

bool aGOAL::set_description ( string  desc)

Definition at line 163 of file aGOAL.struct.cpp.

bool aGOAL::set_frequency ( string  freq)

Definition at line 208 of file aGOAL.struct.cpp.

bool aGOAL::set_from_date ( string  f_date)

Definition at line 223 of file aGOAL.struct.cpp.

void aGOAL::set_from_db ( )

set_from_db

assumes that a result set of my_sql is active an loads its content in the object

< (0, "unallocated"), (1, "amount@date"), (2, "income from/to"), (3, "rainy day savings"), (4, "amount asap");

Definition at line 362 of file aGOAL.struct.cpp.

bool aGOAL::set_goal_type ( string  g_type)

saves the benchmark and savings plan, !!! TODO

Definition at line 126 of file aGOAL.struct.cpp.

bool aGOAL::set_max_shortfall ( string  shortfall)

Definition at line 268 of file aGOAL.struct.cpp.

bool aGOAL::set_priority ( string  imp)

check if exists, if not then add the default

Definition at line 177 of file aGOAL.struct.cpp.

bool aGOAL::set_realization_age ( string  real_age,
float  actual_age 
)

set_realization_age

this will also set the from_date = to_date and frequency NOT to be used for a income-type-goal!!

Definition at line 189 of file aGOAL.struct.cpp.

bool aGOAL::set_till_date ( string  t_date)

set_till_date

assumes that from_date is already set and valid!!!!!

Definition at line 242 of file aGOAL.struct.cpp.

void aGOAL::set_to_pstmnt ( )

Definition at line 381 of file aGOAL.struct.cpp.

int aGOAL::show_graph_till_MNbr ( )

Friends And Related Function Documentation

ostream& operator<< ( ostream &  os,
const aGOAL the_goal 
)
friend

other functions:

overload the << operator to output the goal in a readable format

Definition at line 80 of file aGOAL.struct.cpp.

Member Data Documentation

float aGOAL::alpha = 0.1

variables calculated and allocated during investment_problem.solve() BEFORE solution:

Definition at line 29 of file aGOAL.struct.cpp.

float aGOAL::amount

Definition at line 14 of file aGOAL.struct.cpp.

std::map<int, float> aGOAL::benchmark

Definition at line 35 of file aGOAL.struct.cpp.

string aGOAL::color

Definition at line 37 of file aGOAL.struct.cpp.

string aGOAL::color_followup

Definition at line 38 of file aGOAL.struct.cpp.

string aGOAL::currency

Definition at line 20 of file aGOAL.struct.cpp.

string aGOAL::description

Definition at line 19 of file aGOAL.struct.cpp.

string aGOAL::frequency

Definition at line 24 of file aGOAL.struct.cpp.

string aGOAL::from_date

Definition at line 22 of file aGOAL.struct.cpp.

int aGOAL::goal_id

variables stored in database before investment_problem.solve():

Definition at line 11 of file aGOAL.struct.cpp.

int aGOAL::goal_type

(0, "unallocated"), (1, "amount@date"), (2, "income from/to"), (3, "rainy day savings"), (4, "amount asap");

Definition at line 13 of file aGOAL.struct.cpp.

int aGOAL::investor = 0

Definition at line 12 of file aGOAL.struct.cpp.

float aGOAL::max_shortfall

Definition at line 26 of file aGOAL.struct.cpp.

std::map<int, float> aGOAL::means_goal

the means implied by the goal (eg. the regular income during retirement for goal type income from/to)

Definition at line 17 of file aGOAL.struct.cpp.

int aGOAL::optimal_portf

Definition at line 33 of file aGOAL.struct.cpp.

int aGOAL::priority

Definition at line 21 of file aGOAL.struct.cpp.

float aGOAL::realization_age

Definition at line 25 of file aGOAL.struct.cpp.

int aGOAL::realization_monthNbr

Definition at line 30 of file aGOAL.struct.cpp.

float aGOAL::realized_shortfall

Definition at line 34 of file aGOAL.struct.cpp.

std::string aGOAL::remarks

Definition at line 36 of file aGOAL.struct.cpp.

string aGOAL::s_exp = ""

Definition at line 43 of file aGOAL.struct.cpp.

string aGOAL::s_goal = ""

javaScript variable for the upper quantile

javaScript variable for the goal

Definition at line 45 of file aGOAL.struct.cpp.

string aGOAL::s_high = ""

javaScript variable for the expecpted evolution

Definition at line 44 of file aGOAL.struct.cpp.

string aGOAL::s_low = ""

javaScript variable for the lower quantile as [[45,100], [45.1,101],....]

Definition at line 42 of file aGOAL.struct.cpp.

std::map<int, float> aGOAL::saving_plan

variables calculated and allocated during investment_problem.solve() AFTER solution:

Definition at line 32 of file aGOAL.struct.cpp.

float aGOAL::simulation_endvalue = 0

the last value obtained by the simulation (only used in the Follow-Up screens to allow the evolution to start from the end-value of the simulation)

Definition at line 41 of file aGOAL.struct.cpp.

string aGOAL::simulation_string = ""

a string containing the simulated values of the advised portfolio [45,1000], [45,083, 1100], etc.]]

Definition at line 40 of file aGOAL.struct.cpp.

bool aGOAL::success

Definition at line 39 of file aGOAL.struct.cpp.

float aGOAL::target_amount

target_amount is for goal_type amount

for goal_type 1 this is the target amount, for goal_type 2 this is the monthly income, for goal_type 3 this is the fixe amount needed

Date
the same as amount, for "income" goal, it is zero, etc.

Definition at line 16 of file aGOAL.struct.cpp.

string aGOAL::till_date

Definition at line 23 of file aGOAL.struct.cpp.


The documentation for this struct was generated from the following file: