Virtual U.org
Get Personal Training on VU Today
    
Top shadow
 
 register/help
User Name:

Password:

Oinve_st.cpp Source File
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

Oinve_st.cpp

Go to the documentation of this file.
00001 //Filename    : OStat.cpp
00002 //Description : Investment Class Definition
00003 //Owner       : Fred
00004 
00005 // ES library header file
00006 #include <OMATH.H>
00007 
00008 // CU header file
00009 #include <OINFO.H>
00010 #include <OPSCHOOL.H>
00011 #include <OFINANCE.H>
00012 #include <ODEVELOP.H>
00013 #include <OCHANCE.H>
00014 
00015 #include "OINVEST.H"
00016 
00017 //----------- Define constants -------------//
00018 // no smoothing                   (=>lam = 0)
00019 // 3-year smoothing               (=>lam = 0.45)
00020 // 5-year smoothing               (=>lam = 0.60)
00021 
00022 //## chea 241199 12.2.2 b)
00023 //static float endowment_lambda[INPUT_OPTION_COUNT] = { 0, 0.45f, 0.60f };
00024 static float endowment_lambda[INPUT_OPTION_COUNT] = { 0, 0.398f, 0.541f };
00025 
00026 static float tmp_max = 1;
00027 
00028 //----------- Begin of function Investment::init_data --------//
00030 void Investment::init_data() {
00031     // assume called: memset(this, 0, sizeof(Investment));
00032 
00033     //----------------------------//
00034     // data from excel sheet: response_func:investments
00035 
00036     //LC 50%    0.060   0.220
00037     //SC 20%    0.095   0.260
00038     //BD 30%    0.025   0.180
00039 
00040   /*
00041     ASSET_TYPE_COUNT = 3,
00042 
00043     AS_LC_STOCK=0,              // large-cap
00044     AS_SC_STOCK,                // small-cap
00045     AS_BONDS,
00046 
00047     int allocation_percent;             // 33%
00048     float       return_mean;
00049     float       return_deviation;
00050   */
00051 
00052     asset_array[AS_LC_STOCK].allocation_percent = 50;
00053     asset_array[AS_SC_STOCK].allocation_percent = 20;
00054     asset_array[AS_BONDS].allocation_percent = 30;
00055 
00056     asset_array[AS_LC_STOCK].return_mean = 0.06f;
00057     asset_array[AS_SC_STOCK].return_mean = 0.095f;
00058     asset_array[AS_BONDS].return_mean = 0.025f;
00059 
00060     asset_array[AS_LC_STOCK].return_deviation = 0.22f;
00061     asset_array[AS_SC_STOCK].return_deviation = 0.26f;
00062     asset_array[AS_BONDS].return_deviation = 0.18f;
00063 
00064     //-----------------------------------------//
00065 
00066     int i, j;
00067 
00068     for (i=0; i < ASSET_TYPE_COUNT; i++)
00069         for (j=0; j < ASSET_TYPE_COUNT; j++) {
00070             // should use a matrix of multipliers!!??
00071             float multiplier;
00072 
00073             if ( i == j)
00074                 multiplier = 1;
00075             else if ( ( i == AS_SC_STOCK && j == AS_LC_STOCK )  || ( j == AS_SC_STOCK && i == AS_LC_STOCK ) )
00076                 multiplier = 0.9f;
00077             else if ( ( i == AS_SC_STOCK && j == AS_BONDS ) || ( j == AS_SC_STOCK && i == AS_BONDS ) )
00078                 multiplier = 0.3f;
00079             else if ( ( i == AS_LC_STOCK && j == AS_BONDS ) || ( j == AS_LC_STOCK && i == AS_BONDS ) )
00080                 multiplier = 0.4f;
00081 
00082             asset_covariance_array[i][j] = multiplier * asset_array[j].return_deviation * asset_array[i].return_deviation;
00083         }
00084 
00085     s_n_p_history[THIS_MONTH] = 100;
00086     endowment_performance_history[THIS_MONTH] = 100;
00087 
00088     //s_n_p_history[THIS_MONTH] = 0;
00089     //endowment_performance_history[THIS_MONTH] = 0;
00090 
00091     //----------------------------//
00092 
00093     degree_smoothing_for_endowment_payout = 0;
00094     //  smoothed_endowment_value = finance.last_year.asset_array[AC_ENDOWMENT];  // inited in finance.init_data()
00095 
00096   //----------------------------//
00097 
00098     endowment_ratio = float(100*development_office.last_year.endowment / finance.last_year.asset_array[AC_ENDOWMENT]);
00099 
00100     endowment_change_year_to_date = 0;              // 990527
00101 
00102   //----------------------------//
00103 
00104   // expected_real_return.init(FA_HISTORY_YEAR, 0);
00105 
00106     float realReturn = 0;
00107 
00108     for (i=0; i < ASSET_TYPE_COUNT; i++)
00109         realReturn += asset_array[i].allocation_percent * ( asset_array[i].return_mean );
00110 
00111     expected_real_return.init(FA_HISTORY_YEAR, realReturn / 12.0f );
00112 
00113     update_history(UPDATE_MONTH);
00114 
00115                                                   // min & max bug chea
00116     tmp_max = max(1.0f, max(s_n_p_history[THIS_MONTH], endowment_performance_history[THIS_MONTH]));
00117     s_n_p_history[THIS_MONTH] /= tmp_max;
00118     endowment_performance_history[THIS_MONTH] /= tmp_max;
00119 
00120     int m = THIS_MONTH;
00121     s_n_p_history[m-1] = s_n_p_history[m-2] = s_n_p_history[THIS_MONTH];
00122     endowment_performance_history[m-1] = endowment_performance_history[m-2] = endowment_performance_history[THIS_MONTH];
00123 
00124   //----------------------------//
00125 
00126   //update_history(UPDATE_YEAR);                // equilibrium_payout_rate calced here
00127     calc_equilibrium_payout_rate();
00128 
00129     //----------------------------//
00130 
00131     err_when(! finance.last_year.asset_array[AC_ENDOWMENT]);
00132 }
00133 
00134 //------------- End of function Investment::init_data --------//
00135 
00136 //----------- Begin of function Investment::calc_endowment_growth ------//
00141 void Investment::calc_endowment_growth() {
00142     int i,j;
00143 
00144     // nominal return // 33%
00145     float monthlyEndowmentGrowthRate = finance.inflation_rate_hist.get_cur();
00146     float realReturn = 0;
00147 
00148     for (i=0; i < ASSET_TYPE_COUNT; i++)
00149         realReturn += asset_array[i].allocation_percent * ( asset_array[i].return_mean );
00150 
00151     monthlyEndowmentGrowthRate += realReturn / 12.0f / 100.0f;
00152 
00153     //----------------------------//
00154     expected_real_return.shift_hist();
00155     expected_real_return.set_cur(realReturn / 12.0f);
00156     expected_real_annual_return_rate = expected_real_return.get_sum();
00157 
00158     //----------------------------//
00159     endowment_growthrate_deviation = 0;             // annual   // 0.99 -> 99%
00160     for (i=0; i < ASSET_TYPE_COUNT; i++)
00161         for (j=0; j < ASSET_TYPE_COUNT; j++)
00162             endowment_growthrate_deviation += (asset_array[i].allocation_percent / 100.0f) * (asset_array[j].allocation_percent / 100.0f) * asset_covariance_array[i][j];
00163 
00164     endowment_growthrate_deviation = (float) sqrt(endowment_growthrate_deviation);
00165 
00166     // check mean = 5.7%, sd = 18.6%
00167 
00168     /* //## old idea
00169        float lamda = 0.5f;                              // value from email req25.txtf
00170        float sd = 0.000084545f;         // for calc inflation_rate_hist in ofin_day.cpp
00171        float endowmentGrowthrateDeviationMonthly = 0;   // 0.99 (99%)
00172        endowmentGrowthrateDeviationMonthly = float( sqrt(endowment_growthrate_deviation - 12 * sd * sd / (1-lamda)) / sqrt(12) );
00173 
00174        float chance = 0;
00175        float endRand = math.get_random_snd(monthlyEndowmentGrowthRate/100.0f, endowmentGrowthrateDeviationMonthly*0.01f);
00176        float oldEndowment = (float) finance.this_year.asset_array[AC_ENDOWMENT];
00177        // 990525 finance.this_year.asset_array[AC_ENDOWMENT] = oldEndowment * ( 1 + endRand + chance );
00178        endowment_change_year_to_date += oldEndowment * ( endRand + chance );
00179 
00180        endowment_performance_history[THIS_MONTH] = float( (1+endRand) * endowment_performance_history[THIS_MONTH-1]);
00181 
00182        // endowment_performance_history[THIS_MONTH] /= tmp_max;
00183     */
00184     //## chea 231199 11.1.1
00185     float endowmentGrowthrateDeviationMonthly = 0;  // 0.99 (99%)
00186     endowmentGrowthrateDeviationMonthly = math.get_random_snd(monthlyEndowmentGrowthRate, endowment_growthrate_deviation/12);
00187 
00188     //chose up or down //## chea 031299 Bill only want it to go up
00189     int dir = m.random(2) ? 1:0 ;
00190     if(dir == 1)
00191         endowmentGrowthrateDeviationMonthly = -(endowmentGrowthrateDeviationMonthly);
00192 
00193     // add chance card here
00194 
00195     float endRand = math.get_random_snd(monthlyEndowmentGrowthRate, endowmentGrowthrateDeviationMonthly);
00196 
00197     //------ chance card handling ----------//
00198 
00199     if(chance_event.stock_dir == -1) {
00200         endRand = -float(100+m.random(400)) / 1000.f;
00201         chance_event.stock_dir = 0;
00202     }
00203     else if(chance_event.stock_dir == 1) {
00204         endRand = float(100+m.random(400)) / 1000.f;
00205         chance_event.stock_dir = 0;
00206     }
00207 
00208     //-------------------------------------//
00209 
00210     float oldEndowment = (float) finance.this_year.asset_array[AC_ENDOWMENT];
00211 
00212     endowment_change_year_to_date += oldEndowment * endRand;
00213     endowment_performance_history[THIS_MONTH] = float( (1+endRand) * endowment_performance_history[THIS_MONTH-1]);
00214 
00215     /*
00216       //------------------------------//
00217       // calc S&P 500
00218 
00219       float sapRand = math.get_random_snd(
00220       finance.inflation_rate_hist.get_cur() / 100.0f + asset_array[AS_LC_STOCK].return_mean - expected_real_return.get_cur() / 100.0f,
00221       //990507 asset_array[AS_LC_STOCK].return_deviation - endowmentGrowthrateDeviationMonthly);
00222       asset_array[AS_LC_STOCK].return_deviation / 12 - endowmentGrowthrateDeviationMonthly);
00223 
00224       //        s_n_p_history[THIS_MONTH] = float(( 1.0 + endRand + sapRand ) * s_n_p_history[THIS_MONTH-1]);
00225       // chwg0604
00226       double ir=0.6*sapRand+0.4*asset_array[AS_BONDS].return_mean;
00227       s_n_p_history[THIS_MONTH] = s_n_p_history[THIS_MONTH-1]*(float)(1.0f+(ir));
00228 
00229       // s_n_p_history[THIS_MONTH] /= tmp_max;
00230     */
00231 }
00232 
00233 //----------- End of function Investment::calc_endowment_growth ------//
00234 
00235 //----------- Begin of function Investment::update_history_sub ------//
00238 void Investment::update_history_sub() {
00239 
00240     /*
00241 
00242       refer to email req25b.txt
00243 
00244       >---------
00245       >And, will there be any special projection method used for the
00246       >two outyear projections?  Or just apply the related-algorithm
00247       >immediately after the player makes changes on interface?
00248 
00249       just apply the new payout rate, new smoothing-rule lambda-value, and
00250       current expected annual endowment total return (based on the current
00251       monthly endowment growthrate, which in turn depends on the asset
00252       allocations from overview-1 and the monthly inflation rate) to the existing
00253       formulas.
00254 
00255       i now remember the other item i talked with trevor about, which may have
00256       led tot he confusion about how may lines to include on the graph. what i'd
00257       like to do is project three values for each of the two outyears (next and
00258       second next), as follows:
00259 
00260       based on expected total return plus one standard deviation (annual)
00261       based on expected total return:
00262       based on expected total return minus one standard deviation (annual)
00263 
00264       the three lines will start at the same value (in the current year), then
00265       diverge with the first one being at the top and the last one at the bottom.
00266       note that the standard deviation depends on the current asset allocation.
00267 
00268     */
00269 
00270     //------- P_THIS_YEAR ----------//  //##chea 191099------- should be P_LAST_YEAR ----------//
00271 
00272     //  endowment_spending_history[PROJECTED_VALUE][P_THIS_YEAR] = (int)finance.projected_revenue_array[AC_ENDOWMENT_SPENDING].this_year.total;
00273     //  endowment_spending_history[PROJECTED_MAX_VALUE][P_THIS_YEAR] = (int)finance.projected_revenue_array[AC_ENDOWMENT_SPENDING].this_year.total;
00274     //  endowment_spending_history[PROJECTED_MIN_VALUE][P_THIS_YEAR] = (int)finance.projected_revenue_array[AC_ENDOWMENT_SPENDING].this_year.total;
00275 
00276     //## chea 191099
00277     //  endowment_spending_history[PROJECTED_VALUE][P_THIS_YEAR] = (int)finance.revenue_array[AC_ENDOWMENT_SPENDING].total;
00278     //  endowment_spending_history[PROJECTED_MAX_VALUE][P_THIS_YEAR] = (int)(int)finance.revenue_array[AC_ENDOWMENT_SPENDING].total;
00279     //  endowment_spending_history[PROJECTED_MIN_VALUE][P_THIS_YEAR] = (int)(int)finance.revenue_array[AC_ENDOWMENT_SPENDING].total;
00280     endowment_spending_history[PROJECTED_VALUE][P_THIS_YEAR] = (int)finance.projected_revenue_array[AC_ENDOWMENT_SPENDING].this_year.total;
00281     endowment_spending_history[PROJECTED_MAX_VALUE][P_THIS_YEAR] = (int)finance.projected_revenue_array[AC_ENDOWMENT_SPENDING].this_year.total;
00282     endowment_spending_history[PROJECTED_MIN_VALUE][P_THIS_YEAR] = (int)finance.projected_revenue_array[AC_ENDOWMENT_SPENDING].this_year.total;
00283 
00284     //------- init data ----------//
00285 
00286     const float annualReturnRate = expected_real_annual_return_rate;
00287     const float annualReturnDeviation = endowment_growthrate_deviation;
00288     const float payoutRate = float(finance.revenue_policy_array[PL_ENDOWMENT_SPENDING_RATE].result_value) / 100;
00289 #if(GAME_VERSION>=200)
00290     float curEndowmentValue = (float) finance.this_year.asset_array[AC_ENDOWMENT]+(float) finance.this_year.asset_array[AC_QUASI];
00291 #else
00292     float curEndowmentValue = (float) finance.this_year.asset_array[AC_ENDOWMENT];
00293 #endif
00294 
00295     //------- P_NEXT_YEAR ----------//  //##chea 191099------- should be P_THIS_YEAR ----------//
00296     float   lam = endowment_lambda[degree_smoothing_for_endowment_payout];
00297 #if(GAME_VERSION>=200)
00298     lam = 1.0f - lam;
00299 #endif
00300     err_when(degree_smoothing_for_endowment_payout>INPUT_HIGH);
00301 
00302     curEndowmentValue *= (1+annualReturnRate/100.0f);
00303     float smoothedEndowmentValue = math.latency_func(lam, curEndowmentValue, smoothed_endowment_value);
00304 
00305     endowment_spending_history[PROJECTED_VALUE][P_NEXT_YEAR] = int( smoothedEndowmentValue * payoutRate);
00306     endowment_spending_history[PROJECTED_MAX_VALUE][P_NEXT_YEAR] = int( math.latency_func(lam, curEndowmentValue * (1+annualReturnDeviation), smoothed_endowment_value) * payoutRate );
00307     endowment_spending_history[PROJECTED_MIN_VALUE][P_NEXT_YEAR] = int( math.latency_func(lam, curEndowmentValue * (1-annualReturnDeviation), smoothed_endowment_value) * payoutRate );
00308 
00309     //## chea 191099 to update endowment_spending
00310     int temp1 = int( smoothedEndowmentValue * payoutRate);
00311     int temp2 = (int)finance.revenue_array[AC_ENDOWMENT_SPENDING].total;
00312 
00313     //## chea 241199 make the 3rd row the same 12.2.2 d)
00314     //  finance.projected_revenue_array[AC_ENDOWMENT_SPENDING].this_year.total = temp1;
00315     //  finance.projected_revenue_array[AC_ENDOWMENT_SPENDING].change_last_year.total = finance.calc_change(temp1 , temp2);
00316 
00317     //------- P_2ND_NEXT_YEAR ----------//  //##chea 191099------- should be P_NEXT_YEAR ----------//
00318     curEndowmentValue *= (1+annualReturnRate/100.0f);
00319     smoothedEndowmentValue = math.latency_func(lam, curEndowmentValue, smoothed_endowment_value);
00320 
00321     endowment_spending_history[PROJECTED_VALUE][P_2ND_NEXT_YEAR] = int( smoothedEndowmentValue * payoutRate);
00322     endowment_spending_history[PROJECTED_MAX_VALUE][P_2ND_NEXT_YEAR] = int( math.latency_func(lam, curEndowmentValue * (1+annualReturnDeviation), smoothed_endowment_value) * payoutRate );
00323     endowment_spending_history[PROJECTED_MIN_VALUE][P_2ND_NEXT_YEAR] = int( math.latency_func(lam, curEndowmentValue * (1-annualReturnDeviation), smoothed_endowment_value) * payoutRate );
00324 
00325     //## chea 191099 to update endowment_spending
00326 
00327     int temp3 = int( smoothedEndowmentValue * payoutRate);
00328     int temp4 = (int)finance.projected_revenue_array[AC_ENDOWMENT_SPENDING].this_year.total;
00329     finance.projected_revenue_array[AC_ENDOWMENT_SPENDING].next_year.total = temp3;
00330     finance.projected_revenue_array[AC_ENDOWMENT_SPENDING].change_next_year.total = finance.calc_change(temp3 , temp4);
00331 
00332 }
00333 
00334 //------------- End of function Investment::update_history_sub ------//
00335 
00336 //----------- Begin of function Investment::next_day ------//
00339 void Investment::next_day() {
00340     // start of a month
00341     if(info.game_day == 29 && info.game_month == 8) {
00342         int asdfasdfasd=7;
00343     }
00344 
00345     if ( info.game_day == 1 ) {
00346         // start of a year
00347         if ( info.game_month == finance.fiscal_year_start_month )
00348             update_history(UPDATE_YEAR);
00349 
00350         update_history(UPDATE_MONTH);
00351     }
00352 
00353     // start of a trimester
00354     if ( info.game_day == player_school.trimester_array[player_school.cur_trimester].start_day
00355          && info.game_month == player_school.trimester_array[player_school.cur_trimester].start_month ) {
00356         update_history(UPDATE_TRIMESTER);
00357     }
00358 }
00359 
00360 //------------- End of function Investment::next_day ------//
00361 
00362 //----------- Begin of function Athletics::update_history ------//
00367 void Investment::update_history(char updateFlag) {
00368     //  float input;
00369     int i;
00370 
00371     switch (updateFlag) {
00372     case UPDATE_MONTH:
00373         shift_history(s_n_p_history, HISTORY_MONTH_COUNT);
00374         shift_history(endowment_performance_history, HISTORY_MONTH_COUNT);
00375         calc_endowment_growth();
00376         update_history_sub();
00377         break;
00378 
00379     case UPDATE_TRIMESTER:
00380         break;
00381 
00382     case UPDATE_YEAR:
00383         for (i=0; i<PROJECTION_TYPE_COUNT; i++) {
00384             shift_history(endowment_spending_history[i], P_HISTORY_YEAR_COUNT);
00385         }
00386 
00387         calc_equilibrium_payout_rate();
00388         endowment_change_year_to_date = 0;          // 990527
00389         break;
00390 
00391     case UPDATE_ALL:
00392         //              update_history(UPDATE_MONTH);
00393         //              update_history(UPDATE_TRIMESTER);
00394         //              update_history(UPDATE_YEAR);
00395         //              break;
00396 
00397     default:
00398         err_here();
00399         break;
00400     }
00401 }
00402 
00403 //------------- End of function Athletics::update_history ------//
00404 
00405 //----------- Begin of function Investment::deinit --------//
00409 void Investment::calc_equilibrium_payout_rate() {
00410     float road, r, i, g, E, B, I;                   // 99%
00411 
00412     // assume called just after stage1 resource allocation, by opsch_pi.cpp for game score calculation
00413 
00414     // road: This is the "expected real annual return" described in Section 2.1 of the same document.
00415 
00416     road = (float) expected_real_annual_return_rate;
00417     r = float(Finance::calc_change(finance.projected_total_expense.this_year.total, finance.total_expense.total)
00418               - finance.inflation_rate);
00419 
00420     float thisRev = float(finance.projected_total_revenue.this_year.total - finance.projected_revenue_array[AC_ENDOWMENT_SPENDING].this_year.total);
00421     float lastRev = float(finance.total_revenue.total - finance.revenue_array[AC_ENDOWMENT_SPENDING].total);
00422 
00423     i = float(Finance::calc_change(thisRev, lastRev) - finance.inflation_rate);
00424     g = endowment_ratio = math.latency_func(0.6f, endowment_ratio,
00425                                             float(100*development_office.this_year.endowment / finance.this_year.asset_array[AC_ENDOWMENT]));
00426     E = float(finance.this_year.asset_array[AC_ENDOWMENT]);
00427     B = float(finance.projected_total_expense.this_year.total);
00428     I = thisRev;
00429 
00430     // solution of quadratic equation
00431 
00432     // min & max bug chea
00433     equilibrium_payout_rate = (float) sqrt(max(0.0f, math.safe_pow(road+g, 2) - 4 * (r*B-i*I) /E));
00434     // min & max bug chea
00435     equilibrium_payout_rate = (float) min(100.0f, max(0.04f, 0.5f * (road+g + equilibrium_payout_rate)));
00436 
00437     // return equilibrium_payout_rate;
00438 }
00439 
00440 //------------- End of function Investment::deinit --------//
00441 
00442 //----------- Begin of function Investment::calc_smoothed_endowment_value --------//
00446 void Investment::calc_smoothed_endowment_value() {
00447 
00448     /*
00449       Finally, having gotten into this area again, I'd like to suggest one more
00450       change while you're working on the Overview 2 screen and related
00451       procedures.
00452 
00453       **First, I'd like to define a new variable:
00454 
00455       smoothedEndowmentMV[t] =
00456       (1-lam)endowmentMarketValue[t]+lam*smoothedEndowmentMV[t-1]
00457       smoothedEndowmentMV[0] = endowmentMarketValue[0]
00458 
00459       **The new variable should be used in place of "endowmentMarketValue[t]"
00460       wherever it's multiplied by the payout rate: that would be in recourse
00461       allocation Stage I and in the projections discussed above. The original
00462       "endowmentMarketValue" should continue to be used in all financial
00463       statements.
00464 
00465       **The value of lambda should determined by Player input on the Overview 2
00466       screen via the following (new) 3-way radio button:
00467 
00468       float             lam = endowment_lambda[degree_smoothing_for_endowment_payout];
00469 
00470       err_when(degree_smoothing_for_endowment_payout>INPUT_HIGH);
00471 
00472       smoothed_endowment_value = math.latency_func(lam,
00473       float(finance.this_year.asset_array[AC_ENDOWMENT]), smoothed_endowment_value);
00474 
00475     */
00476 
00477     //## 241199 new idea from Bill
00478     //b)
00479     float   lam = endowment_lambda[degree_smoothing_for_endowment_payout];
00480     //a)
00481 #if(GAME_VERSION>=200)
00482     smoothed_endowment_value = (float)((1.0f-lam) * finance.this_year.asset_array[AC_ENDOWMENT] + lam * smoothed_endowment_value);
00483     smoothed_quasi_endowment_value = (float)((1.0f-lam) * finance.this_year.asset_array[AC_QUASI] + lam * smoothed_quasi_endowment_value);
00484 #else
00485     smoothed_endowment_value = (float)(lam * finance.this_year.asset_array[AC_ENDOWMENT] + (1-lam) * smoothed_endowment_value);
00486 #endif
00487     //  smoothed_endowment_value = math.latency_func(lam,
00488     //          float(finance.this_year.asset_array[AC_ENDOWMENT]), smoothed_endowment_value);
00489 
00490 }
00491 
00492 //----------- End of function Investment::calc_smoothed_endowment_value --------//
00493 
00494 // ##### Begin MArco ##### //
00495 #if(GAME_VERSION>=200)
00496 //----------- Begin of function Investment::save_initial_data --------//
00497 void Investment::save_initial_data() {
00498     //  for (int i = 0; i < ASSET_TYPE_COUNT; i++)
00499     //          initial_asset_array[i] = asset_array[i];
00500     initial_asset_array0_allocation_percent = asset_array[0].allocation_percent;
00501     initial_asset_array1_allocation_percent = asset_array[1].allocation_percent;
00502     initial_asset_array2_allocation_percent = asset_array[2].allocation_percent;
00503     initial_endowment_performance = endowment_performance_history[THIS_MONTH];
00504 }
00505 
00506 //----------- End of function Investment::save_initial_data --------//
00507 #endif
00508 // ##### End MArco ##### //

Generated on Fri Aug 23 01:38:00 2002 for VirtualU by doxygen1.2.17