98 void parse_bm(std::map<int, float> benchmark,
int ref_number);
110 string button_to(
string go_to,
string description,
char type_redir);
139 s =
"<div class=\"alert alert-info\">";
150 s =
"<div class=\"alert alert-info\">";
173 s =
"<button class=\"btn btn-primary\" onclick=\"location.href='";
181 s = s + go_to +
"';\">";
196 cout <<
"<div class=\"row-fluid\">";
197 cout <<
"<div class=\"col-md-3 alert alert-info\">\n";
200 cout <<
"<div class=\"col-md-1\"><center> or </center></div>\n";
201 cout <<
"<div class=\"col-md-2 alert alert-info\" >";
209 cout <<
"<div class=\"row-fluid\">";
210 cout <<
"<div class=\"span1\"></div>\n";
211 cout <<
"<div class=\"span5 alert alert-info\">\n";
214 cout <<
"<div class=\"span1\"><p class=\"center\">...OR...</p></div>\n";
215 cout <<
"<div class=\"span4 alert alert-info\" >";
273 cout <<
"\n<form class=\"regform\" method=\"post\" action=\"" +
oConfig.
soft_url +
"\">\n";
274 cout <<
"<fieldset>\n";
277 cout <<
"<label for=\"email\">valid e-mail</label><input type=\"email\" name=\"email\" autofocus=\"true\" required placeholder=\"boss@universe.org\">\n";
278 cout <<
"</li>\n<li>";
279 cout <<
"<label for=\"password\">Password</label><input type=\"password\" name=\"password\" required value=\"\" autocomplete=\"off\" placeholder=\"min 8 characters, captial, special, etc.\" pattern=\"(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{8,}\" title=\"Password must be 8 or more characters with at least one number, an upper-case letter, a lower-case letter, and one special character!\">\n";
280 cout <<
"</li>\n<li>";
281 cout <<
"<label for=\"password1\">Repeat Password</label><input type=\"password\" name=\"password1\" required value=\"\" autocomplete=\"off\" placeholder=\"8-10 characters\" pattern=\"(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{8,}\" title=\"Password must be 8 or more characters with at lest one number, an upper-case letter, a lower-case letter, and one special character!\">\n";
285 cout <<
"</li>\n<li>";
286 cout <<
"<label for=\"first_name\">First Name</label><input type=\"text\" name=\"first_name\" placeholder=\"FirstName\">\n";
287 cout <<
"</li>\n<li>";
288 cout <<
"<label for=\"last_name\">Last Name</label><input type=\"text\" name=\"last_name\" placeholder=\"LastName\">\n";
289 cout <<
"</li>\n<li>";
292 cout <<
"</li>\n<li>";
293 cout <<
"<label for=\"bdate\">birth date</label><input type=\"text\" id=\"datepicker\" data-date-format=\"yyyy-mm-dd\" data-date-viewmode=\"years\" required placeholder=\"yyyy-mm-dd\" title=\"Enter your birth date\" name=\"bdate\">\n";
296 cout <<
"<script type=\"text/javascript\">$('#datepicker').datepicker({format: \"yyyy-mm-dd\", autoclose: true, todayBtn: false, setEndDate: \"2016-01-01\"});</script>";
301 cout <<
"</li>\n<li>";
302 cout <<
"<label for=\"simtill\">simulate till age</label><input type=\"number\" required placeholder=\"90\" title=\"Till what age is this simulation relevant\" name=\"simtill\">\n";
303 cout <<
"</li>\n<li>";
305 cout <<
"</li>\n<li>";
307 cout <<
"</li>\n<li>";
308 cout <<
"<button class=\"btn btn-primary btn-block\" type=\"submit\" value=\"Submit\">" << t_Register <<
"</button>\n ";
310 cout <<
"</li></ol>\n";
311 cout <<
"</fieldset>";
312 cout <<
"<input type=\"hidden\" name=\"a\" value=\"re\" /> \n";
338 cout <<
"<div class=\"well\">";
340 cout <<
"<fieldset>\n";
343 cout <<
"<label for=\"email\">e-mail</label><input type=\"email\" name=\"email\" autofocus=\"true\" required placeholder=\"boss@universe.org\" value=\"" <<
user_name <<
"\">*\n";
344 cout <<
"</li>\n<li>";
345 cout <<
"<label for=\"password_old\">Old Password</label><input type=\"password\" name=\"password_old\" value=\"\" autocomplete=\"off\" placeholder=\"8-10 characters\" pattern=\"^(?=.{8,})(?=.*[a-z])(?=.*[A-Z])(?=.*[\\d])(?=.*[\\W]).*$\" title=\"Password must be 8 or more characters with at lest one number, an upper-case letter, a lower-case letter, and one special character!\">**\n";
346 cout <<
"</li>\n<li>";
347 cout <<
"<label for=\"password\">New Password</label><input type=\"password\" name=\"password\" value=\"\" autocomplete=\"off\" placeholder=\"8-10 characters\" pattern=\"^(?=.{8,})(?=.*[a-z])(?=.*[A-Z])(?=.*[\\d])(?=.*[\\W]).*$\" title=\"Password must be 8 or more characters with at lest one number, an upper-case letter, a lower-case letter, and one special character!\">**\n";
348 cout <<
"</li>\n<li>";
349 cout <<
"<label for=\"password1\">Repeat New Password</label><input type=\"password\" name=\"password1\" value=\"\" autocomplete=\"off\" placeholder=\"8-10 characters\" pattern=\"^(?=.{8,})(?=.*[a-z])(?=.*[A-Z])(?=.*[\\d])(?=.*[\\W]).*$\" title=\"Password must be 8 or more characters with at least one number, an upper-case letter, a lower-case letter, and one special character!\">**\n";
350 cout <<
"</li>\n<li>";
351 cout <<
"<label for=\"first_name\">First Name</label><input type=\"text\" name=\"first_name\" required placeholder=\"FirstName\" value=\"" <<
first_name <<
"\">*\n";
352 cout <<
"</li>\n<li>";
353 cout <<
"<label for=\"last_name\">Last Name</label><input type=\"text\" name=\"last_name\" required placeholder=\"LastName\" value=\"" <<
last_name <<
"\">*\n";
354 cout <<
"</li>\n<li>";
356 cout <<
"</li>\n<li>";
357 cout <<
"<label for=\"bdate\">birth date</label><input class=\"datepicker\" data-date-format=\"yyyy-mm-dd\" data-date-viewmode=\"years\" required placeholder=\"yyyy-mm-dd\" title=\"Enter your birth date\" name=\"bdate\" value=\"" <<
tm2DateStr(
birth_date) <<
"\">*\n";
358 cout <<
"<script>$('.datepicker').datepicker()</script>";
359 cout <<
"</li>\n<li>";
362 cout <<
"</li>\n<li>";
365 cout <<
"<label for=\"simtill\">simulate till age</label><input type=\"number\" required placeholder=\"110\" title=\"Till what age is this simulation relevant\" name=\"simtill\" value=\"" <<
simulate_till_age <<
"\" >*\n";
366 cout <<
"</li>\n<li>";
368 cout <<
"<button class=\"btn btn-primary\" type=\"submit\" value=\"Submit\">Save</button>\n ";
369 cout <<
"<button class=\"btn btn-primary\" type=\"reset\" value=\"reset\">Reset</button>\n ";
370 cout <<
"</li></ol>\n";
371 cout <<
"</fieldset>";
372 cout <<
"<input type=\"hidden\" name=\"a\" value=\"is\" /> \n";
375 cout << t_regFrm[
"policiesNote"];
376 cout <<
"<p>[**] only to be filled out IF you want to change the password, in that case all three fields have to be filled out.</p>";
411 string uid, pwd, pwd1, fName, lName,
currency, bdate, curr, simtill;
415 pwd =
cgi(
"password");
416 pwd1 =
cgi(
"password1");
417 fName =
cgi(
"first_name");
418 lName =
cgi(
"last_name");
419 curr =
cgi(
"currency");
420 bdate =
cgi(
"bdate");
421 simtill =
cgi(
"simtill");
423 debug_info +=
"<br>bdate: " + bdate;
472 string uid, pwdold, pwd, pwd1, fName, lName,
currency, bdate, curr, simtill;
476 pwdold =
cgi(
"password_old");
477 pwd =
cgi(
"password");
478 pwd1 =
cgi(
"password1");
479 fName =
cgi(
"first_name");
480 lName =
cgi(
"last_name");
481 curr =
cgi(
"currency");
482 bdate =
cgi(
"bdate");
483 simtill =
cgi(
"simtill");
485 debug_info +=
"<br>bdate: " + bdate;
499 if (pwdold !=
"" && pwd == pwd1)
501 cout <<
"<br>PASSWORDCHANGE not implemented yet, sorry!";
529 cout <<
"<h2>" <<
t_Login <<
"</h2>";
530 cout <<
"<form class=\"loginform\" method=\"post\" action=\"" +
oConfig.
soft_url +
"\">";
531 cout <<
"<fieldset id=\"login_form\">\n";
534 cout <<
"<label for=\"email\">e-mail</label><input type=\"email\" name=\"email\" autofocus=\"true\" required placeholder=\"boss@universe.org\">\n";
535 cout <<
"</li>\n<li>";
536 cout <<
"<label for=\"password\">Password</label><input type=\"password\" name=\"password\" >\n";
537 cout <<
"</li>\n<li>";
538 cout <<
"<button class=\"btn btn-primary btn-block\" type=\"submit\" value=\"Submit\">" << t_Login <<
"</button>\n ";
540 cout <<
"<input type=\"hidden\" name=\"a\" value=\"le\" /> \n";
541 cout <<
"</li></ol>\n";
542 cout <<
"</fieldset>";
571 pwd =
cgi(
"password");
581 hh.
footer(
"personalize",
"personalize");
610 cout <<
"<td><input type=\"number\" min=\"1\" max=\"5\" name=\"experience" << to_string(i) <<
"\" required size=\"1\" value=\"" <<
experience[i] <<
"\"></td>";
611 cout <<
"<td><input type=\"number\" min=\"1\" max=\"5\" name=\"knowledge" << to_string(i) <<
"\" required size=\"1\" value=\"" <<
knowledge[i] <<
"\"></td>";
612 cout <<
"<td><input type=\"number\" min=\"1\" max=\"5\" name=\"desirability" << to_string(i) <<
"\" required size=\"1\" value=\"" <<
desirability[i] <<
"\"></td>";
627 cout <<
"<tr><th> Asset Class </th><th>" <<
t_personalize[
"ER"][
"theader"] <<
"</th><th></th></tr>";
632 cout <<
"<td><input step=\"0.1\" type=\"number\" min=\"-10\" max=\"25\" name=\"ER" << to_string(ac) <<
"\" required size=\"1\" value=\"" <<
round2str(
ER[ac] * 100,1) <<
"\"></td><td>%</td>";
649 cout <<
"<td><input step=\"0.1\" type=\"number\" min=\"0\" max=\"100\" name=\"vol" << to_string(ac) <<
"\" required size=\"1\" value=\"" <<
round2str(sqrt(
covar[ac][ac]) * 100,1) <<
"\"></td><td>%</td>";
662 cout <<
"<th>" << t_personalize[
"vol"][
"theader"] <<
"</th>";
668 cout <<
"<td><input step=\"0.1\" type=\"number\" min=\"-10\" max=\"25\" name=\"ER" << to_string(ac) <<
"\" required size=\"1\" value=\"" <<
round2str(
ER[ac] * 100,1) <<
"\">%</td>";
669 cout <<
"<td><input step=\"0.1\" type=\"number\" min=\"0\" max=\"100\" name=\"vol" << to_string(ac) <<
"\" required size=\"1\" value=\"" <<
round2str(sqrt(
covar[ac][ac]) * 100,1) <<
"\">%</td>";
683 cout <<
"<tr><th></th>";
693 if (
covar[ac_i][ac_i] != 0 &&
covar[ac_j][ac_j] != 0)
695 covar_ij =
covar[ac_i][ac_j] / (sqrt(
covar[ac_i][ac_i] *
covar[ac_j][ac_j]));
702 cout <<
"<td>" <<
"<input " << ((ac_i <= ac_j)?
"disabled":
"") <<
" step=\"1\" type=\"number\" min=\"-100\" max=\"100\" name=\"corr" <<
add0(ac_i)<<
add0(ac_j) <<
"\" required size=\"1\" value=\"" <<
round2str(covar_ij * 100.0, 0) <<
"\"></td>";
719 cout <<
"<div class=\"panel-group\" id=\"accordion2\">";
726 cout <<
"<tr><td><label for=\"bdate\">birth date*</label></td><td><input class=\"datepicker\" data-date-format=\"yyyy-mm-dd\" data-date-viewmode=\"years\" required placeholder=\"yyyy-mm-dd\" title=\"Enter your birth date\" name=\"bdate\" value=\"" <<
tm2DateStr(
birth_date) <<
"\"></td><td>" <<
t_info_bdate <<
".</td>\n</tr>";
728 cout <<
"<script>$('.datepicker').datepicker()</script>";
730 cout <<
"<tr><td><label for=\"simtill\">simulate till age*</label></td><td><input type=\"number\" required placeholder=\"110\" title=\"Till what age is this simulation relevant\" name=\"simtill\" value=\"" <<
simulate_till_age <<
"\" ></td><td>" <<
t_info_simtill <<
"</td></tr>";
768 cout <<
"<br clear=\"all\">";
776 cout <<
"\n<div class=\"panel panel-default\">";
777 cout <<
"\n<div class=\"panel-heading\">";
778 cout <<
"<a data-toggle=\"collapse\" data-parent=\"#accordion2\" data-target=\"#collapse" << the_content <<
"\">";
779 cout <<
"<h3>" <<
t_personalize[the_content][
"title"] <<
" <span class=\"glyphicon glyphicon-triangle-bottom\"></span></h3></a>";
781 cout <<
"\n<div id=\"collapse" << the_content <<
"\" class=\"panel-collapse collapse\">";
782 cout <<
"\n<div class=\"panel-body\">";
786 cout << t_personalize[the_content][
"info"];
793 cout << t_personalize[the_content][
"info"];
795 cout <<
"\n<form method=\"post\" action=\"" +
oConfig.
soft_url +
"\">\n";
796 cout <<
"<fieldset>\n";
797 cout <<
"\n<table class=\"" << the_content <<
"\">";
807 cout <<
"<button class=\"btn btn-primary\" type=\"submit\" name =\"a\" value=\"ps\">Save " <<
t_personalize[the_content][
"content"] <<
"</button>\n ";
808 cout <<
"<button class=\"btn btn-primary\" type=\"reset\" value=\"reset\">Undo Last Changes</button>\n ";
809 if (show_reload) cout <<
"<button class=\"btn btn-primary\" type=\"submit\" name =\"a\" value=\"" <<
"r" << the_content <<
"\">" <<
t_reload <<
" " << t_personalize[the_content][
"content"] <<
"</button>\n ";
811 cout <<
"</fieldset>";
813 cout <<
"<input type=\"hidden\" name=\"content\" value=\"" << the_content <<
"\" /> \n";
814 cout <<
"<input type=\"hidden\" name=\"uid\" value=\"" <<
investor_id <<
"\" /> \n";
816 cout <<
"<p><a data-toggle=\"collapse\" data-parent=\"#accordion2\" data-target=\"#collapse" + the_content +
"\">";
817 cout <<
t_collapse <<
" <span class=\"glyphicon glyphicon-triangle-top\"></span></a></p>";
818 cout <<
"</div></div></div>" << endl;
832 hh.
footer(
"personalize",
"personalize");
842 string the_content =
cgi(
"content");
848 else if (the_content ==
"ERvol")
867 string s, uid,
currency, bdate, curr, simtill, ac;
871 curr =
cgi(
"currency");
872 bdate =
cgi(
"bdate");
873 simtill =
cgi(
"simtill");
881 error_message =
error_message +
"<li>I failed to save essential user information, please contact an administrator -- #ErrNo009</li>";
898 s =
cgi(
"experience" + ac);
899 set_scale(
"experience", i, atoi(s.c_str()));
900 s =
cgi(
"knowledge" + ac);
901 set_scale(
"knowledge", i, atoi(s.c_str()));
902 s =
cgi(
"desirability" + ac);
903 set_scale(
"desirability",i, atoi(s.c_str()));
915 ER[ac] = atof((
cgi(
"ER" + to_string(ac))).c_str()) / 100;
928 covar[ac][ac] = pow(atof((
cgi(
"vol" + to_string(ac))).c_str()) / 100, 2);
961 else if (action ==
"rERvol")
996 cout <<
"<form method=\"post\" action=\"" +
oConfig.
soft_url +
"?a=aa\">";
997 cout <<
"<table class=\"asset\">\n";
999 cout <<
"<th>Description</th><th>Asset Class</th><th>Amount</th><th>Currency</th><th>Actions</th>";
1003 cout <<
"<td><input type=\"text\" name=\"description\" required ></td>" ;
1005 cout <<
"<td><input type=\"number\" min=\"0\" name=\"amount\" required placeholder=\"1000\" title=\"Please enter a positive number\"></td>" ;
1011 cout <<
"<td><button type=\"submit\" value=\"Submit\"><img src=\"" <<
oConfig.
css_dir <<
"plus.svg\" alt=\"add\" width=\"16\"></button></td>" ;
1014 cout <<
"<td><button type=\"submit\" value=\"Submit\" data-toggle=\"tooltip\" title=\"" <<
t_save <<
"\"><span class=\"glyphicon glyphicon-ok\" style=\"color:green\"></span></button>";
1015 cout <<
"<button type=\"submit\" value=\"Submit\" data-toggle=\"tooltip\" title=\"" <<
t_reset <<
"\"><span class=\"glyphicon glyphicon-chevron-left\" style=\"color:blue\"></span></button>" ;
1018 cout <<
"<td><button type=\"reset\" data-toggle=\"tooltip\" title=\"" << t_reset <<
"\"><span class=\"glyphicon glyphicon-chevron-left\" style=\"color:blue\"></span></button></td>" ;
1022 cout <<
"</table>\n";
1023 cout <<
"<input type=\"hidden\" name=\"iid\" value=\"" <<
investor_id <<
"\" />\n ";
1041 string desc =
cgi(
"description");
1042 string aclass =
cgi(
"asset_class");
1043 string amnt =
cgi(
"amount");
1044 string curr =
cgi(
"currency");
1050 cout <<
"<p class=\"markup\">New asset, \"" << desc <<
"\", successfully added.</p>";
1063 string iid =
cgi(
"iid");
1064 string aid =
cgi(
"aid");
1086 string aid =
cgi(
"aid");
1087 string iid =
cgi(
"iid");
1088 string desc =
cgi(
"description");
1089 string aclass =
cgi(
"asset_class");
1090 string amnt =
cgi(
"amount");
1091 string curr =
cgi(
"currency");
1095 cout <<
"<p class=\"markup\">Changes to asset, \"" << desc <<
"\", successfully saved.</p>";
1112 string iid =
cgi(
"iid");
1113 string aid =
cgi(
"aid");
1137 cout <<
"<div class=\"clearBoth\">\n";
1152 bool success =
false;
1212 string gid =
cgi(
"gid");
1216 cout <<
"<p class=\"markup\">Goal #" << gid <<
"; successfully deleted.</p>";
1232 cout <<
"<div class=\"clearBoth\">\n";
1247 bool success =
false;
1303 string gid =
cgi(
"gid");
1411 int a = atoi(s.c_str());
1450 float sim_till = atof(s.c_str());
1468 s =
"UPDATE " +
oConfig.
tbl_prefix +
"_investors SET is_logged_in = 0 WHERE TIMESTAMPDIFF(MINUTE, last_activity_at, CURRENT_TIMESTAMP()) > 30;";
1474 while (
db.
res->next())
1476 if (
db.
res->getString(
"is_logged_in") ==
"1") {rc =
true;}
else {rc =
false;}
1496 const CgiEnvironment& env =
cgi.getEnvironment();
1497 const_cookie_iterator iter;
1500 for(iter = env.getCookieList().begin(); iter != env.getCookieList().end(); ++iter)
1501 {
if (iter->getName() ==
"iid") {rc =
set_investor_id(iter->getValue());}}
1504 debug_info = debug_info +
"investor_id (from cookie) = " + to_string(
investor_id) +
"<br/>";
1511 debug_info = debug_info +
"user is not logged in<br/>";
1526 s =
"UPDATE " +
oConfig.
tbl_prefix +
"_investors SET is_logged_in = 1, last_login_at = NOW() , last_activity_at = NOW() WHERE investor_id=" + std::to_string(
investor_id) +
";";
1540 s =
"UPDATE " +
oConfig.
tbl_prefix +
"_investors SET is_logged_in = 1, last_activity_at = NOW() WHERE investor_id=" + std::to_string(
investor_id) +
";";
1553 string goal_title =
"<h3 class=\"" + color_box +
"\">" + to_string(g) +
". " + oInvProbl->
goalZ[g].description +
" <span class=\"glyphicon glyphicon-triangle-bottom\"></span></h3>";
1554 cout <<
hh.
collapse_open(
"goalsAccordion", goal_title, g,
false,
true,
"soft-" + color_box);
1586 std::cout.precision(2);
1589 cout <<
"<li><b>description</b>:" << oInvProbl->
goalZ[g] <<
"</li>";
1591 if (oInvProbl->
goalZ[g].realization_monthNbr < 0)
1593 cout <<
"<li>This goal seems to be in the past ... please check</li>";
1598 cout <<
"<li><b>benchmark</b>:<br>";
1603 cout <<
"<li><b>savings plan</b>: ";
1609 cout <<
"<li><b>overview plot</b>";
1614 cout <<
"<li><b>remarks</b>: ";
1615 cout << oInvProbl->
goalZ[g].remarks;
1657 oInvestmentProbl.
solve();
1662 cout <<
"# error in investment_problem.solve(): " << __FILE__ <<
"(" << __FUNCTION__
1663 <<
") on line " << to_string(__LINE__) <<
"<br># ERR: " << e;
1672 cout <<
"<div class=\"panel-group\" id=\"goalsAccordion\">";
1750 cout <<
"<p>This page presents <strong>a simulation</strong>. A simulation is just <strong>one</strong> possible scenario (something that could happen). Press the button [Simulate Again] to see another simulation.</p><p>Last session You stated " << oSimulation.
get_nbr_goals() <<
" goals, below you see what might happen.</p>";
1751 cout <<
"<br>" << endl;
1763 parse_goal_box(&oSimulation, g, oSimulation.
goalZ[g].simulation_string,
"simulated evolution");
1794 hh.
footer(
"simulation",
"simulation");
1807 int g, simulation_length_mnths;
1808 string mnth_max, the_comment;
1819 cout <<
"<p>This page presents <strong>a simulation</strong> of what can possible happen in the future. In other words it is a simulation of how a dashboard to follow up on investments could look like in the future (given a certain market evolution). So, in an operational version of this software you would not have to put in a number of months to simulate, the system would rather drop you an emeail with this overview updated with today's market values.</p><p>Last session You stated " << oFollowUp.
get_nbr_goals() <<
" goals. Below you find more information on any recommended actions.</p>";
1833 cout <<
"<h2>Detailed Follow-Up per Goal</h2>";
1837 cout <<
"<div class=\"alert alert-info\">";
1838 cout <<
"<div class=\"";
1841 cout <<
"<h4>" << g <<
". " << oFollowUp.
goalZ[g].description <<
"</h4> ";
1845 cout <<
"<li><b>Description</b>:" << oFollowUp.
goalZ[g] <<
"</li>";
1856 cout <<
"<li><b>How it might looks like in "<< mnth_max <<
":</b>";
1861 mnth_max =
months2yms(simulation_length_mnths);
1863 if (
goal_type_i2s[oFollowUp.
goalZ[g].goal_type] ==
"rainy day savings") the_comment =
"Since this is your "buffer" investment it is not possible to say that this is a good of a bad situation now. The future will tell.";
1866 cout <<
"<li><span class=\"" <<
hh.
get_box_color_class(oFollowUp.
goalZ[g].color_followup) <<
"\">The new color of this goal is <b>" << oFollowUp.
goalZ[g].color_followup <<
"</b>. This means that after " << mnth_max <<
" and <b>if</b> you carefully followed the plan, this it <b>might</b> be that the dvice at that future moment would be: <b><i>"<< the_comment <<
"</i></b></p><p>Note that this is only <b>one</b> possible outcome, press [enter], [F5] or the refresh button to see another possible simulation (eventually change the simulation horizon).<br>Note that not only you might put in different saving amounts or follow a different benchmark, also reasonable expectations about return, volatility and correlations might change!</li>";
1885 float the_total = 0;
1888 for (i = 1; i <= benchmark.size(); i++) the_total += benchmark[i];
1889 for (i = 1; i <= benchmark.size(); i++) benchmark[i] = benchmark[i] / the_total;
1905 cout <<
"\n<script class=\"code\" type=\"text/javascript\">$(document).ready(function(){var data = [";
1908 cout <<
"['" << asset_list[i] <<
" : " << round(benchmark[i]*10000)/100 <<
"%'," << round(benchmark[i]*10000)/100 <<
"]";
1912 cout <<
"var plot"<<goal_number<<
" = jQuery.jqplot ('chart"<<goal_number<<
"', [data], ";
1915 cout <<
"seriesDefaults: {";
1917 cout <<
"renderer: jQuery.jqplot.PieRenderer,";
1918 cout <<
"rendererOptions: {";
1921 cout <<
"showDataLabels: true }},";
1922 cout <<
"legend: { show:true, location: 'e', showLabels:true}";
1924 cout <<
");});</script>";
1926 cout <<
"<div id=\"chart"<<goal_number<<
"\" style=\"height:" << to_string(
NBR_ASSET_CLASSES * 34) <<
"px; width:600px; tr height:1em;\"></div>";
1936 cout <<
"<h3>Easy Goal Definition Screen</h3>";
1937 cout <<
"<p>Here are some common goals that might help you to set your goals.</p>";
1939 cout <<
"\n<form method=\"post\" action=\"" +
oConfig.
soft_url +
"?a=ghs\" class=\"helpForm\">\n";
1941 cout <<
"<div class=\"goalHelpDiv\">";
1947 cout <<
"<p>Many people will consider their own retirement as the most important goal to save for.<br/>In order to plan for your retirement, you will need to do the following steps:";
1948 cout <<
"<ul><li>find out how much retirement income you will get from any sources outside this plan (minimal income, legal retirment, etc.)</li>";
1949 cout <<
"<li>find out how much monthly expenses you will have (housing, housing related costs, food, clothes, presents, etc.)</li>";
1950 cout <<
"<li>make the difference of the two above: that difference is the amount that you will need every month. Fill it in below.</li></ul></p>";
1951 cout <<
"<fieldset>\n";
1954 cout <<
"<label for=\"R_from_age\">age when you plan to retire</label><input type=\"number\" name=\"R_from_age\" autofocus=\"true\" placeholder=\"65\" value=\"\"> the age at which you start to need the additional income\n";
1955 cout <<
"</li>\n<li>";
1956 cout <<
"<label for=\"R_till_age\">age till when the income is needed</label><input type=\"number\" name=\"R_till_age\" autofocus=\"false\" placeholder=\"110\" value=\"110\"> 110 years old should be a safe limit, but feel free to provide your own.\n";
1957 cout <<
"</li>\n<li>";
1958 cout <<
"<label for=\"R_income\">monthly additional income desired</label><input type=\"number\" name=\"R_income\" autofocus=\"false\" placeholder=\"1000\" value=\"\">\n";
1961 cout <<
"</fieldset>";
1966 cout <<
hh.
collapse_open(
"goalHelpDiv",
"Rainy Day Savings", 2,
true,
false);
1969 cout <<
"<p>A second investment goal that might come to your attention is \"a saving for the rainy day\". It is an amount that you will always want to keep liquid and available in case something unforeseen happens.";
1970 cout <<
"unforeseen reasons why you would need money are per definition those that you did do not plan for (as separate goals). Examples are urgent repair on the house, legal assistance, repatriation, hospitalisation costs (not covered by any insurance or the amount that you might have to advance), etc.</p>";
1971 cout <<
"<p>Troubles to decide on the amount? Try on of the following rule of thumb: two monthly salaties plus two months rent (or equivalent rental potential if you live in your own place)</p>";
1972 cout <<
"<fieldset>\n";
1976 cout <<
"<label for=\"RDS_amount\">amount of the rainy day savings:</label><input type=\"number\" name=\"RDS_amount\" autofocus=\"true\" placeholder=\"5000\" value=\"\">\n";
1979 cout <<
"</fieldset>";
1984 cout <<
hh.
collapse_open(
"goalHelpDiv",
"Insurances", 3,
true,
false);
1987 cout <<
"<p>While it is probably easier to keep insurances out of this analysis (ie. deduce insurance payments that you plan to add from your saving capacity),";
1988 cout <<
" it is very important to consider if you would need any of the following insurances and make sure that you have them in place!</p>";
1990 cout <<
"<li>life insurance: provides a certain amount of money for your close ones in case you pass away, not only to cover cost related to that unfortunate moment, but also to make sure they can live the life you want them to live without your contribution.</li>";
1991 cout <<
"<li>hospitalisation insurance: pays (preferably as third payer) for the event of hospitalisation</li>";
1992 cout <<
"<li>income insurance: in case you lose your income due to loss of business or loss of ability to work, you might want to have some replacement income in place.</li>";
1993 cout <<
"<li>insurance on any important properties: use as a rule of thumb that any utilitaraian object that you can not easily by back should be insured (eg. if you loose your computer it might be no problem to replace it but if your house burns down you might not be able to recover from that: so you need an insurance on the house!</li>";
1994 cout <<
"<li>TPL for your and those people for whome you're legally responsible</li>";
1995 cout <<
"<li>Any relevant professional insurance (eg. you might be legally responsible for the advice that you give as consultant)</li>";
2001 cout <<
hh.
collapse_open(
"goalHelpDiv",
"Savings for (grand-) childeren", 4,
true,
false);
2004 cout <<
"<p>Many people will want to sed aside some money for their loved ones. Typical examples are kids or grand-kids. Most probably you will want to save for their studies or provide them with a certain amount \"to start their lives\"</p>";
2005 cout <<
"<fieldset>\n";
2007 cout <<
"<li><b>First Kid</b>\n";
2009 cout <<
"<li><label for=\"K1_desc\">description / name:</label><input type=\"text\" name=\"K1_desc\" placeholder=\"Amelia\" value=\"\"></li>\n";
2010 cout <<
"<li><label for=\"K1_amount\">amount:</label><input type=\"number\" name=\"K1_amount\" placeholder=\"10000\" value=\"\"></li>\n";
2011 cout <<
"<li><label for=\"K1_years\">due in</label><input type=\"number\" name=\"K1_years\" placeholder=\"15\" value=\"\"> years</li>\n";
2012 cout <<
"</ol></li>\n";
2013 cout <<
"<li><b>Second Kid</b>\n";
2015 cout <<
"<li><label for=\"K2_desc\">description / name:</label><input type=\"text\" name=\"K2_desc\" placeholder=\"Amelia\" value=\"\"></li>\n";
2016 cout <<
"<li><label for=\"K2_amount\">amount:</label><input type=\"number\" name=\"K2_amount\" placeholder=\"10000\" value=\"\"></li>\n";
2017 cout <<
"<li><label for=\"K2_years\">due in</label><input type=\"number\" name=\"K2_years\" placeholder=\"15\" value=\"\"> years</li>\n";
2018 cout <<
"</ol></li>\n";
2019 cout <<
"<li><b>Third Kid</b>\n";
2021 cout <<
"<li><label for=\"K3_desc\">description / name:</label><input type=\"text\" name=\"K3_desc\" placeholder=\"Amelia\" value=\"\"></li>\n";
2022 cout <<
"<li><label for=\"K3_amount\">amount:</label><input type=\"number\" name=\"K3_amount\" placeholder=\"10000\" value=\"\"></li>\n";
2023 cout <<
"<li><label for=\"K3_years\">due in</label><input type=\"number\" name=\"K3_years\" placeholder=\"15\" value=\"\"> years</li>\n";
2024 cout <<
"</ol></li>\n";
2026 cout <<
"</fieldset>";
2032 cout <<
hh.
collapse_open(
"goalHelpDiv",
"Foreseeable expenses", 5,
true,
false);
2035 cout <<
"Examples are:";
2036 cout <<
"<ul><li>repair to your dwelling house</li>";
2037 cout <<
"<li>a new car</li>";
2038 cout <<
"<li>etc.</li></ul>";
2039 cout <<
"<fieldset>\n";
2041 cout <<
"<li><b>First Expense</b>\n";
2043 cout <<
"<li><label for=\"FE1_desc\">description:</label><input type=\"text\" name=\"FE1_desc\" placeholder=\"Repair House\" value=\"\"></li>\n";
2044 cout <<
"<li><label for=\"FE1_amount\">amount:</label><input type=\"number\" name=\"FE1_amount\" placeholder=\"10000\" value=\"\"></li>\n";
2045 cout <<
"<li><label for=\"FE1_years\">due in</label><input type=\"number\" name=\"FE1_years\" placeholder=\"15\" value=\"\"> years</li>\n";
2046 cout <<
"</ol></li>\n";
2047 cout <<
"<li><b>Second Expense</b>\n";
2049 cout <<
"<li><label for=\"FE2_desc\">description:</label><input type=\"text\" name=\"FE2_desc\" placeholder=\"New Car\" value=\"\"></li>\n";
2050 cout <<
"<li><label for=\"FE2_amount\">amount:</label><input type=\"number\" name=\"FE2_amount\" placeholder=\"10000\" value=\"\"></li>\n";
2051 cout <<
"<li><label for=\"FE2_years\">due in</label><input type=\"number\" name=\"FE2_years\" placeholder=\"15\" value=\"\"> years</li>\n";
2052 cout <<
"</ol></li>\n";
2053 cout <<
"<li><b>Third Expense</b>\n";
2055 cout <<
"<li><label for=\"FE3_desc\">description:</label><input type=\"text\" name=\"FE3_desc\" placeholder=\"Maintainance Yacht\" value=\"\"></li>\n";
2056 cout <<
"<li><label for=\"FE3_amount\">amount:</label><input type=\"number\" name=\"FE3_amount\" placeholder=\"10000\" value=\"\"></li>\n";
2057 cout <<
"<li><label for=\"FE3_years\">due in</label><input type=\"number\" name=\"FE3_years\" placeholder=\"15\" value=\"\"> years</li>\n";
2058 cout <<
"</ol></li>\n";
2060 cout <<
"</fieldset>";
2065 cout <<
hh.
collapse_open(
"goalHelpDiv",
"Foreseeable expenses", 6,
true,
false);
2068 cout <<
"<p>Your personal life dream: art purchase, travel, yacht, a gift to a good cause, etc.</p>";
2069 cout <<
"<fieldset>\n";
2071 cout <<
"<li><b>First Life Dream</b>\n";
2073 cout <<
"<li><label for=\"LD1_desc\">description:</label><input type=\"text\" name=\"LD1_desc\" placeholder=\"Yacht\" value=\"\"></li>\n";
2074 cout <<
"<li><label for=\"LD1_amount\">amount:</label><input type=\"number\" name=\"LD1_amount\" placeholder=\"100000\" value=\"\"></li>\n";
2075 cout <<
"<li><label for=\"LD1_age\">age to realize this dream</label><input type=\"number\" name=\"LD1_age\" placeholder=\"55\" value=\"\"> years old</li>\n";
2076 cout <<
"</ol></li>\n";
2077 cout <<
"<li><b>Second Life Dream</b>\n";
2079 cout <<
"<li><label for=\"LD2_desc\">description:</label><input type=\"text\" name=\"LD2_desc\" placeholder=\"World Travel\" value=\"\"></li>\n";
2080 cout <<
"<li><label for=\"LD2_amount\">amount:</label><input type=\"number\" name=\"LD2_amount\" placeholder=\"100000\" value=\"\"></li>\n";
2081 cout <<
"<li><label for=\"LD2_age\">age to realize this dream</label><input type=\"number\" name=\"LD2_age\" placeholder=\"65\" value=\"\"> years old</li>\n";
2082 cout <<
"</ol></li>\n";
2083 cout <<
"<li><b>Third Life Dream</b>\n";
2085 cout <<
"<li><label for=\"LD3_desc\">description:</label><input type=\"text\" name=\"LD3_desc\" placeholder=\"Gift to Good Cause\" value=\"\"></li>\n";
2086 cout <<
"<li><label for=\"LD3_amount\">amount:</label><input type=\"number\" name=\"LD3_amount\" placeholder=\"100000\" value=\"\"></li>\n";
2087 cout <<
"<li><label for=\"LD3_age\">age to realize this dream</label><input type=\"number\" name=\"LD3_age\" placeholder=\"75\" value=\"\"> years old</li>\n";
2088 cout <<
"</ol></li>\n";
2090 cout <<
"</fieldset>";
2094 cout <<
"<button class=\"btn btn-primary\" type=\"submit\" value=\"Submit\">ADD ALL the goals that are filled out</button>\n ";
2095 cout <<
"<button class=\"btn btn-primary\" type=\"reset\" value=\"reset\">"<<
t_clear_form <<
"</button>\n ";
2096 cout <<
"<button class=\"btn btn-primary\" onclick=\"window.location.href='/" <<
oConfig.
soft_url <<
"a=gl'\">" <<
t_cancel <<
"</button>";
2097 cout <<
"<input type=\"hidden\" name=\"a\" value=\"ghs\" /> \n";
2098 cout <<
"</form>\n";
2124 string R_from_age =
cgi(
"R_from_age");
2125 string R_till_age =
cgi(
"R_till_age");
2126 string R_income =
cgi(
"R_income");
2127 if((R_from_age !=
"") && (R_till_age !=
"") && (R_income !=
""))
2129 float from_age = atof(R_from_age.c_str());
2130 float till_age = atof(R_till_age.c_str());
2131 if (from_age <=
age())
2133 from_age = this->
age(0);
2134 std_message =
std_message +
"<li>I changed the from_date of the retirement goal to today (one cannot plan for past income)</li>";
2136 if (from_age < till_age)
2141 debug_info = debug_info +
"<br>f_dateStr = " + f_dateStr +
", mNbr = " + to_string(
age2monthNbr(from_age))+
", age = " + to_string(from_age);
2142 debug_info = debug_info +
"<br>t_dateStr = " + t_dateStr +
", mNbr = " + to_string(
age2monthNbr(till_age))+
", age = " + to_string(till_age);
2158 error_message =
error_message +
"<li>Sorry, I failed to add the RETIREMENT goal (note that the from-date must be in the future but before the end date; provided: from_age=" + R_from_age +
", till_age=" + R_till_age +
")), please retry!</li>";
2163 string RDS_amount =
cgi(
"RDS_amount");
2165 if(RDS_amount !=
"")
2167 if (atof(RDS_amount.c_str()) > 0)
2197 for (k = 1; k <=3; k++)
2199 g_desc =
cgi(
"K" + to_string(k) +
"_desc");
2200 g_amount =
cgi(
"K" + to_string(k) +
"_amount");
2201 g_years =
cgi(
"K" + to_string(k) +
"_years");
2203 if (g_desc + g_amount + g_years !=
"")
2205 if (atof(g_years.c_str()) > 0)
2208 g_age_fl = this->
age(0) + atof(g_years.c_str());
2228 for (k = 1; k <=3; k++)
2230 g_desc =
cgi(
"FE" + to_string(k) +
"_desc");
2231 g_amount =
cgi(
"FE" + to_string(k) +
"_amount");
2232 g_years =
cgi(
"FE" + to_string(k) +
"_years");
2233 if (g_desc + g_amount + g_years !=
"")
2236 if (atof(g_years.c_str()) > 0)
2239 g_age_fl = this->
age(0) + atof(g_years.c_str());
2259 for (k = 1; k <=3; k++)
2261 g_desc =
cgi(
"LD" + to_string(k) +
"_desc");
2262 g_amount =
cgi(
"LD" + to_string(k) +
"_amount");
2263 g_age =
cgi(
"LD" + to_string(k) +
"_age");
2265 if (g_desc + g_amount + g_age !=
"")
2268 g_age_fl = atof(g_age.c_str());
2269 if (g_age_fl >
age(0))
2316 struct tm theDate =
get_tm(0);
2319 cout <<
"<button id=\"btnShowSP" << g <<
"\">Show</button>";
2320 cout <<
"<button id=\"btnHideSP" << g <<
"\">Hide</button>";
2321 cout <<
"<div id=\"savingsPlan" << g <<
"\">";
2323 cout <<
"<table border=\"1\" class=\"savingPlan\">";
2325 cout <<
"<tr><th>Date</th><th>Amount</th></tr>" << endl;
2326 for (i=0; i<= oInvProbl->
goalZ[g].realization_monthNbr;i++)
2328 if (oInvProbl->
goalZ[g].saving_plan[i] > 0)
2331 cout <<
"<td>" <<
tm2DateStr(theDate) <<
"</td>";
2333 cout <<
"<td>" <<
curr_format(oInvProbl->
goalZ[g].saving_plan[i], oInvProbl->
goalZ[g].currency) <<
"</td>";
2335 cout <<
"</tr>" << endl;
2337 if (theDate.tm_mon <= 10) theDate.tm_mon++;
2344 cout <<
"</table></div>";
2345 cout <<
"<button id=\"btnHide2SP" << g <<
"\">Hide Savings Plan</button>";
2360 std::map<int, float> portfolio_composition;
2361 float savings_for_goal;
2363 cout <<
"<div class=\"alert alert-info\">\n";
2364 cout <<
"<h2>Total Portfolio</h2>\n";
2365 cout <<
"<p>While all goals can be managed in separate portfolios, it might as well suit you to keep all your assets in one portfolio. If you choose to do so, it should look more or less as follows.<br>Below we show the content of your ideal portfolio on different short time horizons. This should allow you to decide on what benchmark you need for the next year.</p>";
2366 cout <<
"<p>On longer horizons, we recommended to re-run and update this tool in the future (eg. once per year) and adapt your portfolio accordingly.</p>\n";
2367 cout <<
"<p>Below we show your average composition on " + to_string(
oConfig.
total_portf_monthNbrs.size()) +
" different horizons so that you can choose to hold a portfolio equal to the average or make it evolve.</p>\n";
2374 savings_for_goal = 0;
2377 savings_for_goal += (oInvProbl->
goalZ[g].saving_plan[m]);
2382 portfolio_composition[ac] += oInvProbl->
goalZ[g].benchmark[ac] * savings_for_goal;
2386 cout <<
"<li>On a horizon of " << to_string(
oConfig.
total_portf_monthNbrs[mNbr-1]) <<
" months your portfolio should look approximately as follows:<br>";
2387 parse_bm(portfolio_composition, 1000 + mNbr);
2400 int nYrs = (int)floor(nbrMonths / 12);
2401 int nMnths = nbrMonths - nYrs * 12;
2402 cout <<
"<div class=\"alert alert-info\">";
2403 cout <<
"\n<form method=\"post\" action=\"" +
oConfig.
soft_url +
"\" id=\"simulation_duration\">\n";
2404 cout <<
"<fieldset>\n";
2408 cout <<
"<label for=\"nYears\" id=\"follow_up_nbrYrs\" align=\"left\">years</label>"
2409 <<
"<input type=\"number\" name=\"nYears\" autofocus=\"true\" required min=\"0\" max=\"" << (int)(
MAX_MNTHS_2_SIMULATE / 12) <<
"\" placeholder=\"1\" value=\"" << nYrs <<
"\">\n";
2410 cout <<
"</li>\n<li>";
2411 cout <<
"<label for=\"nMonths\" id=\"follow_up_nbrMonths\" >months</label><input type=\"number\" name=\"nMonths\" autofocus=\"false\" required min=\"0\" max=\"" <<
MAX_MNTHS_2_SIMULATE <<
"\" placeholder=\"0\" value=\"" << nMnths <<
"\">\n";
2412 cout <<
"</li>\n<li>";
2413 cout <<
"<button class=\"btn btn-primary\" type=\"submit\" value=\"Submit\" id=\"sim_dur\">Simulate Again</button>\n ";
2415 cout <<
"</li></ol>\n";
2416 cout <<
"</fieldset>";
2417 cout <<
"<input type=\"hidden\" name=\"a\" value=\"" << action <<
"\" /> \n";
2418 cout <<
"</form>\n";
2427 cout <<
"<div class=\"alert alert-info\">";
2430 cout <<
"<div id=\"chartMEvol\" style=\"height:350px; width:650px;\"></div>";
2431 cout <<
"<p>To see another simulation: " <<
"<button class=\"btn btn-primary\" type=\"submit\" value=\"Submit\" id=\"sim_dur\">Simulate Again</button>\n </p>";
const string t_Desirability
string round2str(float x, int nbr_digits=0)
bool set_password(const string &s)
void load_covar(int person, char person_type= 'i')
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 ...
bool is_valid_dateStr(string theDate)
unordered_map< string, unordered_map< string, string > > t_personalize
bool set_last_name(const string &s)
string button_to(string go_to, string description, char type_redir)
const string t_b_currency
const string t_Asset_Class
bool set_investor_id(const string &s)
std::map< int, string > get_assetList()
void personalize_ERvol_table()
string dateStr2Age(string the_date)
int get_nbrMonths2simulate()
returns the number of months to simulate as in "37"
void show_home_screen_form()
std::map< int, int > desirability
std::map< int, string > asset_class_names
this variable is to be filled out when needed
void bs_modal(string title, string content, string id="myModal", string b1_text="", string b1_url="")
unordered_map< string, string > t_feedback_post
void personalize_set_general()
string currency
the default currency for that customer
void reload_covar(int person, char what2do, char person_type= 'i')
bool set_max_shortfall(string shortfall)
unordered_map< string, string > t_feedback
void aside(const string &textLine)
bool set_currency(const std::string &s)
bool set_first_name(const string &s)
void personalize_set_ER()
bool set_description(const std::string &s)
void show_register_form_body()
unordered_map< int, string > t_plotlabels_evol
void update_last_activity_at()
bool set_description(string desc)
void personalize_screen()
void parse_form_open_personalize(string the_content)
const string t_Experience
bool set_goal_type(string g_type)
saves the benchmark and savings plan, !!! TODO
void header(int iid=0, bool addSavingsPlan=false, bool addPlots=false)
unordered_map< int, string > goal_type_i2s
std::map< int, int > knowledge
const string t_personalize1
void parse_simulation_insight(simulation *oSim)
#define MAX_MNTHS_2_SIMULATE
the maximum number of months that we allow to visualize a simulation
#define SIMULATE_TILL_DEFAULT
the standard age to stop the simulation
bool set_asset_id(const std::string &s)
void personalize_vol_table()
void show_edit_form(int iid)
void save_ER(int person=0, char person_type= 'i')
string add0(int x, int n=1)
bool set_amount(const std::string &s)
string collapse_open(string parent_id, string title, int nbr, bool add_triangle=true, bool is_open=true, string xtra_body_class="")
#define NBR_ASSET_CLASSES
the nunmber of asset classes (not dynamically updated!)
void parse_simulation_duration_form(int nbrMonths, string action="s")
string error_message
global message variables
void prepare_javaVars_colors(int g, int followup_mnth)
string dropDown_currency(string defaultCurr="EUR")
int age2monthNbr(float theAge)
bool set_user_name(const string &s)
const string tbl_prefix
tables start with "" + oConfig.tbl_prefix + "_" if the prefix is eg. "tbl" then we have "tbl_invesotr...
bool set_simulate_till_age(const string &s)
tm get_tm(int monthNbr=0)
global functions
void show_edit_form(int iid, bool showExisting=false)
void personalize_covar_table()
void personalize_ER_table()
string curr_format(float dv, string the_curr="")
void personalize_set_vol()
#define MIN_YEARS_TO_SIMULATE
the minimal number of years that can be simulated with this tool
string dropDown_assetClass(int defaultAC=0)
string tm2DateStr(tm tmDate)
unordered_map< string, string > t_regFrm
bool set_from_date(string f_date)
void set_max_exposure()
sets the max_exposure vector based on the experience, knowledge and desirability
void parse_bm(std::map< int, float > benchmark, int ref_number)
const string t_clear_form
bool set_currency(string curr)
std::map< int, int > experience
void solve()
allocates means (with a benchmark) to goals
void personalize_reload(string action)
bool set_currency(const string &s)
void parse_form_close_personalize(string the_content, bool show_reload=true)
bool set_priority(string imp)
check if exists, if not then add the default
void show_account_form_body()
bool set_curr(string the_curr)
std::map< int, column > tbl
string get_box_color_class(string the_color)
bool save_preferences()
sets the experience, knowledge and desirability vectors
void load_ER(int person=0, char person_type= 'i')
int get_from_db(string investorID, string password)
string parse_user_info(bool parse_wrapper=true)
bool set_scale(string scale_type, int ac, int val)
const bool merge_ER_vol
true to show ER and vol together in one table in the "Personalize" screen
const string t_disclaimer
void javaGraph(int g, string xtra_var="", string xtra_label="", int followup_mnth=0)
bool set_asset_class(const std::string &s)
void show_inventory_form()
std::map< int, float > max_exposure
the maximum exposure per asset class
void show_toolBar(string tab_name, string usrName="")
void parse_savings_plan(investment_problem *oInvProbl, int g)
void footer(string tab_name, string extraInfo="")
std::vector< int > total_portf_monthNbrs
the month numbers used to show the total portfolio composition
string collapse_close(string parent_id="", int nbr=0, bool add_triangle=true)
void list_assets(int iid)
unordered_map< string, string > t_errMsg
void dateStr2tm(string dStr, tm *target_tm)
bool set_investor_id_fromEnv()
void show_inventory_form_body()
std::map< int, std::map< int, float > > covar
bool set_realization_age(string real_age, float actual_age)
bool set_till_date(string t_date)
const string t_simulation_duration
void personalize_set_corr()
void show_goal_help_form_body()
const string t_info_bdate
const string assetClassColors
std::map< int, float > ER
void load_preferences()
sets the experience, knowledge and desirability vectors
void cout_box_color(string the_color)
void save_covar(int person, char person_type= 'i')
config oConfig
mysql connection mysql connector from dev.mysql.com
std::map< int, aGOAL > goalZ
map containing all goals
void parse_javaGraph(int g, string xtra_var="", string xtra_label="")
plots the chartOverview
void parse_goal_box(investment_problem *oInvProbl, int g, string s_var="", string s_desc="")
void show_total_portfolio(investment_problem *oInvProbl)
const string t_info_simtill
string mNbr2dateStr(int monthNbr=0)
const string t_show_extra_info
bool set_investor(const std::string &s)
bool set_frequency(string freq)
void personalize_pref_table()
void show_login_form_body()
void personalize_set_prefs()
unordered_map< string, string > t_aside
bool set_birth_date(const string &s)
void list(int iid, bool editable=true)
unordered_map< string, int > goal_type_s2i
Global lists.
bool set_amount(string amnt)
Needs goal_type to be set first.