Bob problem At t=0, 500 + 20 t=1,...15 +20 16,...,45 -40 - units thousands Bob: 15yrs accum, 30 yrs decum case (MV optimal):stock: cap wt; bond: 10yr : 2019 data Stock_index: Real_CapWT_CRSP_April_2019.dat Bond_index: Real_10yr_bond_April_2019.dat - updated data to end of 2018 - CRSP index, 10yr T-bills - MC_controls.dat - control file { .... several lines of header information, which you can ignore } n_rebal: 46 "number of rebalancing times" forward_time: 4.5000000000e+01 Cash_flow: -4.0000000000e+01 "time , cash flow at this time" " note, this file outputs controls at t=45, 44, ... etc" " you will need to reverse this for MC simulation" better_than_mean_var: 1 special_pt_b: 1.0602944052e+03 " If W_tot >= special_pt_b, then we can hit the target by investing (special_pt_b amount) entirely in the bond " nx: 8192 "nx = number of lines in the data for each timestamp" W_plus B_plus "W_plus - wealth after injection of cash "B_plus - amount in bonds after injection of cash " - this means that S_plus = W_plus - B_plus " i.e. S_plus = amount in stocks { nx lines of this data } "next time stamp forward_time: 4.4000000000e+01 Cash_flow: -4.0000000000e+01 better_than_mean_var: 1 special_pt_b: 1.0777843214e+03 nx: 8192 W_plus B_plus " etc" --------------------------------------------------- So, to use this, you would probably read this into a matlab array, then reverse the order so that you have time in increasing direction. Then, given a rebalancing time: - find the correct timestamp - inject the correct amount of cash - given a total wealth, interpolate bond amount from table -NOTE: max W value in table = special_pt_b - special_pt_b amount in bonds - invest (W_tot - special_pt_b) in bonds or in stocks - your choice