找回密码
 欢迎注册
楼主: jmwzdb

[原创] 算一个股票收益问题

[复制链接]
发表于 2024-2-21 10:11:07 | 显示全部楼层
假设买入股票必须当天卖出。
股票单价假设四舍五入后保持到小数点后第四位(参考现实中股票实际价格),每次买入实际费用四舍五入到小数点后两位。
由于价格在一直变化,每天买卖的股票需要不同,而且可能需要买入多只股票才能获得最大收益,计算机通过贪心法分析出较优结果如下
  1. Start of Day 1 with money 10000.000000
  2.         Buy 221 shares of stock(45) with unit price 45.0000, total cost 9967.10, value 10067.19 at day end(unit price 45.652900)
  3.         Buy 1 share of stock(32) with unit price 32.0000, total cost 32.10, value 32.40 at day end(unit price 32.502300)
  4.         Left money 0.80
  5. Start of Day 2 with money 10100.390000
  6.         Buy 220 shares of stock(45) with unit price 45.6529, total cost 10065.64, value 10167.34 at day end(unit price 46.315200)
  7.         Buy 1 share of stock(34) with unit price 34.5278, total cost 34.63, value 34.96 at day end(unit price 35.063800)
  8.         Left money 0.12
  9. Start of Day 3 with money 10202.420000
  10.         Buy 219 shares of stock(45) with unit price 46.3152, total cost 10164.93, value 10268.27 at day end(unit price 46.987100)
  11.         Buy 1 share of stock(36) with unit price 37.1134, total cost 37.21, value 37.58 at day end(unit price 37.683000)
  12.         Left money 0.28
  13. Start of Day 4 with money 10306.130000
  14.         Buy 218 shares of stock(45) with unit price 46.9871, total cost 10264.99, value 10370.00 at day end(unit price 47.668800)
  15.         Buy 1 share of stock(39) with unit price 40.7904, total cost 40.89, value 41.31 at day end(unit price 41.405300)
  16.         Left money 0.25
  17. Start of Day 5 with money 10411.560000
  18.         Buy 222 shares of stock(44) with unit price 46.6272, total cost 10373.44, value 10480.22 at day end(unit price 47.308200)
  19.         Buy 1 share of stock(35) with unit price 37.2115, total cost 37.31, value 37.69 at day end(unit price 37.785900)
  20.         Left money 0.81
  21. Start of Day 6 with money 10518.720000
  22.         Buy 226 shares of stock(43) with unit price 46.2548, total cost 10476.18, value 10584.66 at day end(unit price 46.934800)
  23.         Buy 1 share of stock(39) with unit price 42.0295, total cost 42.13, value 42.56 at day end(unit price 42.663000)
  24.         Left money 0.41
  25. Start of Day 7 with money 10627.630000
  26.         Buy 220 shares of stock(44) with unit price 47.9991, total cost 10581.80, value 10692.02 at day end(unit price 48.700100)
  27.         Buy 1 share of stock(41) with unit price 44.8018, total cost 44.90, value 45.37 at day end(unit price 45.468800)
  28.         Left money 0.93
  29. Start of Day 8 with money 10738.320000
  30.         Buy 225 shares of stock(43) with unit price 47.6247, total cost 10738.06, value 10850.58 at day end(unit price 48.324800)
  31.         Left money 0.26
  32. Start of Day 9 with money 10850.840000
  33.         Buy 224 shares of stock(43) with unit price 48.3248, total cost 10847.16, value 10961.48 at day end(unit price 49.035200)
  34.         Left money 3.68
  35. Start of Day 10 with money 10965.160000
  36.         Buy 223 shares of stock(43) with unit price 49.0352, total cost 10957.15, value 11073.31 at day end(unit price 49.756100)
  37.         Left money 8.01
  38. Start of Day 11 with money 11081.320000
  39.         Buy 227 shares of stock(42) with unit price 48.6444, total cost 11064.98, value 11182.95 at day end(unit price 49.364100)
  40.         Buy 1 share of stock(13) with unit price 15.4205, total cost 15.52, value 15.59 at day end(unit price 15.686100)
  41.         Left money 0.82
  42. Start of Day 12 with money 11199.360000
  43.         Buy 231 shares of stock(41) with unit price 48.2378, total cost 11166.03, value 11285.76 at day end(unit price 48.956100)
  44.         Buy 1 share of stock(27) with unit price 32.1933, total cost 32.29, value 32.61 at day end(unit price 32.712300)
  45.         Left money 1.04
  46. Start of Day 13 with money 11319.410000
  47.         Buy 225 shares of stock(42) with unit price 50.0944, total cost 11293.74, value 11415.51 at day end(unit price 50.835600)
  48.         Buy 1 share of stock(20) with unit price 24.3935, total cost 24.49, value 24.70 at day end(unit price 24.800500)
  49.         Left money 1.18
  50. Start of Day 14 with money 11441.390000
  51.         Buy 229 shares of stock(41) with unit price 49.6850, total cost 11400.77, value 11524.36 at day end(unit price 50.424700)
  52.         Buy 1 share of stock(33) with unit price 40.3619, total cost 40.46, value 40.89 at day end(unit price 40.992000)
  53.         Left money 0.16
  54. Start of Day 15 with money 11565.410000
  55.         Buy 228 shares of stock(41) with unit price 50.4247, total cost 11519.63, value 11645.21 at day end(unit price 51.175500)
  56.         Buy 1 share of stock(36) with unit price 44.5555, total cost 44.66, value 45.14 at day end(unit price 45.239300)
  57.         Left money 1.12
  58. Start of Day 16 with money 11691.470000
  59.         Buy 233 shares of stock(40) with unit price 49.9961, total cost 11672.39, value 11800.31 at day end(unit price 50.745100)
  60.         Buy 1 share of stock(14) with unit price 18.0669, total cost 18.17, value 18.28 at day end(unit price 18.376600)
  61.         Left money 0.91
  62. Start of Day 17 with money 11819.500000
  63.         Buy 232 shares of stock(40) with unit price 50.7451, total cost 11796.06, value 11926.05 at day end(unit price 51.505400)
  64.         Buy 1 share of stock(17) with unit price 22.2347, total cost 22.33, value 22.51 at day end(unit price 22.610900)
  65.         Left money 1.11
  66. Start of Day 18 with money 11949.670000
  67.         Buy 237 shares of stock(39) with unit price 50.2954, total cost 11943.71, value 12076.00 at day end(unit price 51.053600)
  68.         Left money 5.96
  69. Start of Day 19 with money 12081.960000
  70.         Buy 230 shares of stock(40) with unit price 52.2770, total cost 12046.71, value 12180.87 at day end(unit price 53.060300)
  71.         Buy 1 share of stock(26) with unit price 34.7240, total cost 34.82, value 35.19 at day end(unit price 35.286700)
  72.         Left money 0.43
  73. Start of Day 20 with money 12216.490000
  74.         Buy 235 shares of stock(39) with unit price 51.8232, total cost 12201.95, value 12338.53 at day end(unit price 52.604400)
  75.         Buy 1 share of stock(10) with unit price 13.8896, total cost 13.99, value 14.03 at day end(unit price 14.131900)
  76.         Left money 0.55
  77. Start of Day 21 with money 12353.110000
  78.         Buy 234 shares of stock(39) with unit price 52.6044, total cost 12332.83, value 12471.59 at day end(unit price 53.397400)
  79.         Buy 1 share of stock(14) with unit price 19.6698, total cost 19.77, value 19.91 at day end(unit price 20.007100)
  80.         Left money 0.51
  81. Start of Day 22 with money 12492.010000
  82.         Buy 239 shares of stock(38) with unit price 52.1267, total cost 12482.18, value 12623.33 at day end(unit price 52.917300)
  83.         Left money 9.83
  84. Start of Day 23 with money 12633.160000
  85.         Buy 238 shares of stock(38) with unit price 52.9173, total cost 12618.12, value 12761.51 at day end(unit price 53.719800)
  86.         Buy 1 share of stock(10) with unit price 14.6292, total cost 14.73, value 14.78 at day end(unit price 14.884300)
  87.         Left money 0.31
  88. Start of Day 24 with money 12776.600000
  89.         Buy 237 shares of stock(38) with unit price 53.7198, total cost 12755.29, value 12900.98 at day end(unit price 54.534500)
  90.         Buy 1 share of stock(14) with unit price 20.6991, total cost 20.80, value 20.95 at day end(unit price 21.054000)
  91.         Left money 0.51
  92. Start of Day 25 with money 12922.440000
  93.         Buy 236 shares of stock(38) with unit price 54.5345, total cost 12893.74, value 13041.74 at day end(unit price 55.361600)
  94.         Buy 1 share of stock(19) with unit price 28.3167, total cost 28.42, value 28.69 at day end(unit price 28.791400)
  95.         Left money 0.28
  96. Start of Day 26 with money 13070.710000
  97.         Buy 241 shares of stock(37) with unit price 54.0252, total cost 13044.17, value 13194.61 at day end(unit price 54.849400)
  98.         Buy 1 share of stock(17) with unit price 25.8588, total cost 25.96, value 26.20 at day end(unit price 26.296400)
  99.         Left money 0.58
  100. Start of Day 27 with money 13221.390000
  101.         Buy 240 shares of stock(37) with unit price 54.8494, total cost 13187.86, value 13340.69 at day end(unit price 55.686200)
  102.         Buy 1 share of stock(21) with unit price 32.2259, total cost 32.33, value 32.66 at day end(unit price 32.761100)
  103.         Left money 1.20
  104. Start of Day 28 with money 13374.550000
  105.         Buy 239 shares of stock(37) with unit price 55.6862, total cost 13332.90, value 13488.16 at day end(unit price 56.535800)
  106.         Buy 1 share of stock(26) with unit price 40.1290, total cost 40.23, value 40.68 at day end(unit price 40.779200)
  107.         Left money 1.42
  108. Start of Day 29 with money 13530.260000
  109.         Buy 238 shares of stock(37) with unit price 56.5358, total cost 13479.32, value 13637.00 at day end(unit price 57.398300)
  110.         Buy 1 share of stock(32) with unit price 49.4948, total cost 49.59, value 50.17 at day end(unit price 50.271800)
  111.         Left money 1.35
  112. Start of Day 30 with money 13688.520000
  113.         Buy 244 shares of stock(36) with unit price 55.9905, total cost 13686.08, value 13846.95 at day end(unit price 56.849800)
  114.         Left money 2.44
  115. Start of Day 31 with money 13849.390000
  116.         Buy 243 shares of stock(36) with unit price 56.8498, total cost 13838.80, value 14002.19 at day end(unit price 57.722200)
  117.         Left money 10.59
  118. Start of Day 32 with money 14012.780000
  119.         Buy 248 shares of stock(35) with unit price 56.2716, total cost 13980.16, value 14145.97 at day end(unit price 57.140200)
  120.         Buy 1 share of stock(19) with unit price 31.8115, total cost 31.91, value 32.24 at day end(unit price 32.344800)
  121.         Left money 0.71
  122. Start of Day 33 with money 14178.920000
  123.         Buy 247 shares of stock(35) with unit price 57.1402, total cost 14138.33, value 14306.78 at day end(unit price 58.022200)
  124.         Buy 1 share of stock(24) with unit price 40.3490, total cost 40.45, value 40.91 at day end(unit price 41.009400)
  125.         Left money 0.14
  126. Start of Day 34 with money 14347.830000
  127.         Buy 246 shares of stock(35) with unit price 58.0222, total cost 14298.06, value 14469.18 at day end(unit price 58.917800)
  128.         Buy 1 share of stock(29) with unit price 48.8927, total cost 48.99, value 49.57 at day end(unit price 49.672700)
  129.         Left money 0.78
  130. Start of Day 35 with money 14519.530000
  131.         Buy 246 shares of stock(35) with unit price 58.9178, total cost 14518.38, value 14692.89 at day end(unit price 59.827200)
  132.         Left money 1.15
  133. Start of Day 36 with money 14694.040000
  134.         Buy 245 shares of stock(35) with unit price 59.8272, total cost 14682.16, value 14859.42 at day end(unit price 60.750700)
  135.         Left money 11.88
  136. Start of Day 37 with money 14871.300000
  137.         Buy 250 shares of stock(34) with unit price 59.2000, total cost 14825.00, value 15004.75 at day end(unit price 60.119000)
  138.         Buy 1 share of stock(25) with unit price 44.7212, total cost 44.82, value 45.35 at day end(unit price 45.449600)
  139.         Left money 1.48
  140. Start of Day 38 with money 15051.580000
  141.         Buy 249 shares of stock(34) with unit price 60.1190, total cost 14994.53, value 15177.10 at day end(unit price 61.052200)
  142.         Buy 1 share of stock(32) with unit price 56.9431, total cost 57.04, value 57.74 at day end(unit price 57.837000)
  143.         Left money 0.01
  144. Start of Day 39 with money 15234.850000
  145.         Buy 249 shares of stock(34) with unit price 61.0522, total cost 15226.90, value 15413.10 at day end(unit price 62.000000)
  146.         Left money 7.95
  147. Start of Day 40 with money 15421.050000
  148.         Buy 254 shares of stock(33) with unit price 60.3791, total cost 15361.69, value 15550.31 at day end(unit price 61.321700)
  149.         Buy 1 share of stock(32) with unit price 58.7449, total cost 58.84, value 59.57 at day end(unit price 59.667100)
  150.         Left money 0.52
  151. Start of Day 41 with money 15610.400000
  152.         Buy 254 shares of stock(33) with unit price 61.3217, total cost 15601.11, value 15793.47 at day end(unit price 62.279000)
  153.         Left money 9.29
  154. Start of Day 42 with money 15802.760000
  155.         Buy 253 shares of stock(33) with unit price 62.2790, total cost 15781.89, value 15977.28 at day end(unit price 63.251300)
  156.         Buy 1 share of stock(10) with unit price 20.3193, total cost 20.42, value 20.57 at day end(unit price 20.673800)
  157.         Left money 0.45
  158. Start of Day 43 with money 15998.300000
  159.         Buy 252 shares of stock(33) with unit price 63.2513, total cost 15964.53, value 16162.95 at day end(unit price 64.238700)
  160.         Buy 1 share of stock(16) with unit price 32.4729, total cost 32.57, value 32.92 at day end(unit price 33.024800)
  161.         Left money 1.20
  162. Start of Day 44 with money 16197.070000
  163.         Buy 258 shares of stock(32) with unit price 62.5214, total cost 16156.32, value 16357.95 at day end(unit price 63.502900)
  164.         Buy 1 share of stock(19) with unit price 38.8355, total cost 38.94, value 39.39 at day end(unit price 39.486500)
  165.         Left money 1.81
  166. Start of Day 45 with money 16399.150000
  167.         Buy 257 shares of stock(32) with unit price 63.5029, total cost 16345.95, value 16550.75 at day end(unit price 64.499800)
  168.         Buy 1 share of stock(26) with unit price 52.7392, total cost 52.84, value 53.49 at day end(unit price 53.593800)
  169.         Left money 0.36
  170. Start of Day 46 with money 16604.600000
  171.         Buy 257 shares of stock(32) with unit price 64.4998, total cost 16602.15, value 16810.96 at day end(unit price 65.512300)
  172.         Left money 2.45
  173. Start of Day 47 with money 16813.410000
  174.         Buy 263 shares of stock(31) with unit price 63.7129, total cost 16782.79, value 16994.69 at day end(unit price 64.718600)
  175.         Buy 1 share of stock(13) with unit price 28.5141, total cost 28.61, value 28.91 at day end(unit price 29.005200)
  176.         Left money 2.01
  177. Start of Day 48 with money 17025.610000
  178.         Buy 255 shares of stock(32) with unit price 66.5407, total cost 16993.38, value 17208.75 at day end(unit price 67.585300)
  179.         Buy 1 share of stock(14) with unit price 31.1286, total cost 31.23, value 31.56 at day end(unit price 31.662300)
  180.         Left money 1.00
  181. Start of Day 49 with money 17241.310000
  182.         Buy 261 shares of stock(31) with unit price 65.7401, total cost 17184.27, value 17402.91 at day end(unit price 66.777800)
  183.         Buy 1 share of stock(26) with unit price 56.2416, total cost 56.34, value 57.05 at day end(unit price 57.152900)
  184.         Left money 0.70
  185. Start of Day 50 with money 17460.660000
  186.         Buy 261 shares of stock(31) with unit price 66.7778, total cost 17455.11, value 17678.00 at day end(unit price 67.831800)
  187.         Left money 5.55
  188. Start of Day 51 with money 17683.550000
  189.         Buy 260 shares of stock(31) with unit price 67.8318, total cost 17662.27, value 17888.65 at day end(unit price 68.902500)
  190.         Buy 1 share of stock(8) with unit price 19.1285, total cost 19.23, value 19.36 at day end(unit price 19.464900)
  191.         Left money 2.05
  192. Start of Day 52 with money 17910.060000
  193.         Buy 267 shares of stock(30) with unit price 66.9662, total cost 17906.68, value 18137.02 at day end(unit price 68.028900)
  194.         Left money 3.38
  195. Start of Day 53 with money 18140.400000
  196.         Buy 266 shares of stock(30) with unit price 68.0289, total cost 18122.29, value 18356.26 at day end(unit price 69.108500)
  197.         Buy 1 share of stock(7) with unit price 17.3949, total cost 17.49, value 17.60 at day end(unit price 17.702100)
  198.         Left money 0.62
  199. Start of Day 54 with money 18374.480000
  200.         Buy 265 shares of stock(30) with unit price 69.1085, total cost 18340.25, value 18577.88 at day end(unit price 70.205200)
  201.         Buy 1 share of stock(13) with unit price 32.1343, total cost 32.23, value 32.59 at day end(unit price 32.687700)
  202.         Left money 2.00
  203. Start of Day 55 with money 18612.470000
  204.         Buy 264 shares of stock(30) with unit price 70.2052, total cost 18560.57, value 18801.90 at day end(unit price 71.319300)
  205.         Buy 1 share of stock(21) with unit price 51.1089, total cost 51.21, value 51.86 at day end(unit price 51.957700)
  206.         Left money 0.69
  207. Start of Day 56 with money 18854.450000
  208.         Buy 271 shares of stock(29) with unit price 69.2587, total cost 18796.21, value 19041.46 at day end(unit price 70.363700)
  209.         Buy 1 share of stock(23) with unit price 56.4172, total cost 56.52, value 57.25 at day end(unit price 57.345100)
  210.         Left money 1.72
  211. Start of Day 57 with money 19100.430000
  212.         Buy 271 shares of stock(29) with unit price 70.3637, total cost 19095.66, value 19345.69 at day end(unit price 71.486300)
  213.         Left money 4.77
  214. Start of Day 58 with money 19350.460000
  215.         Buy 270 shares of stock(29) with unit price 71.4863, total cost 19328.30, value 19582.24 at day end(unit price 72.626800)
  216.         Buy 1 share of stock(8) with unit price 21.6114, total cost 21.71, value 21.89 at day end(unit price 21.991500)
  217.         Left money 0.45
  218. Start of Day 59 with money 19604.580000
  219.         Buy 269 shares of stock(29) with unit price 72.6268, total cost 19563.51, value 19821.40 at day end(unit price 73.785500)
  220.         Buy 1 share of stock(15) with unit price 40.0384, total cost 40.14, value 40.62 at day end(unit price 40.721900)
  221.         Left money 0.93
  222. Start of Day 60 with money 19862.950000
  223.         Buy 277 shares of stock(28) with unit price 71.5894, total cost 19857.96, value 20120.62 at day end(unit price 72.737600)
  224.         Left money 4.99
  225. Start of Day 61 with money 20125.610000
  226.         Buy 276 shares of stock(28) with unit price 72.7376, total cost 20103.18, value 20369.93 at day end(unit price 73.904100)
  227.         Buy 1 share of stock(7) with unit price 20.0098, total cost 20.11, value 20.26 at day end(unit price 20.363100)
  228.         Left money 2.32
  229. Start of Day 62 with money 20392.510000
  230.         Buy 275 shares of stock(28) with unit price 73.9041, total cost 20351.13, value 20622.09 at day end(unit price 75.089400)
  231.         Buy 1 share of stock(14) with unit price 39.4939, total cost 39.59, value 40.07 at day end(unit price 40.171100)
  232.         Left money 1.79
  233. Start of Day 63 with money 20663.950000
  234.         Buy 274 shares of stock(28) with unit price 75.0894, total cost 20601.90, value 20877.07 at day end(unit price 76.293700)
  235.         Buy 1 share of stock(22) with unit price 60.7886, total cost 60.89, value 61.69 at day end(unit price 61.793300)
  236.         Left money 1.16
  237. Start of Day 64 with money 20939.920000
  238.         Buy 282 shares of stock(27) with unit price 73.9498, total cost 20882.04, value 21161.84 at day end(unit price 75.142000)
  239.         Buy 1 share of stock(20) with unit price 56.7293, total cost 56.83, value 57.58 at day end(unit price 57.675900)
  240.         Left money 1.05
  241. Start of Day 65 with money 21220.470000
  242.         Buy 282 shares of stock(27) with unit price 75.1420, total cost 21218.24, value 21503.46 at day end(unit price 76.353400)
  243.         Left money 2.23
  244. Start of Day 66 with money 21505.690000
  245.         Buy 281 shares of stock(27) with unit price 76.3534, total cost 21483.41, value 21773.09 at day end(unit price 77.584300)
  246.         Buy 1 share of stock(7) with unit price 21.8401, total cost 21.94, value 22.13 at day end(unit price 22.225700)
  247.         Left money 0.34
  248. Start of Day 67 with money 21795.560000
  249.         Buy 280 shares of stock(27) with unit price 77.5843, total cost 21751.60, value 22045.83 at day end(unit price 78.835100)
  250.         Buy 1 share of stock(14) with unit price 42.9980, total cost 43.10, value 43.64 at day end(unit price 43.735300)
  251.         Left money 0.86
  252. Start of Day 68 with money 22090.330000
  253.         Buy 279 shares of stock(27) with unit price 78.8351, total cost 22022.89, value 22321.67 at day end(unit price 80.106000)
  254.         Buy 1 share of stock(22) with unit price 65.9810, total cost 66.08, value 66.97 at day end(unit price 67.071600)
  255.         Left money 1.36
  256. Start of Day 69 with money 22390.000000
  257.         Buy 288 shares of stock(26) with unit price 77.5668, total cost 22368.04, value 22672.43 at day end(unit price 78.823700)
  258.         Buy 1 share of stock(6) with unit price 19.8235, total cost 19.92, value 20.07 at day end(unit price 20.174900)
  259.         Left money 2.04
  260. Start of Day 70 with money 22694.540000
  261.         Buy 287 shares of stock(26) with unit price 78.8237, total cost 22651.10, value 22960.26 at day end(unit price 80.100900)
  262.         Buy 1 share of stock(13) with unit price 42.2297, total cost 42.33, value 42.86 at day end(unit price 42.957000)
  263.         Left money 1.11
  264. Start of Day 71 with money 23004.230000
  265.         Buy 286 shares of stock(26) with unit price 80.1009, total cost 22937.46, value 23251.49 at day end(unit price 81.398900)
  266.         Buy 1 share of stock(21) with unit price 66.5195, total cost 66.62, value 67.52 at day end(unit price 67.624200)
  267.         Left money 0.15
  268. Start of Day 72 with money 23319.160000
  269.         Buy 286 shares of stock(26) with unit price 81.3989, total cost 23308.69, value 23628.72 at day end(unit price 82.717900)
  270.         Left money 10.47
  271. Start of Day 73 with money 23639.190000
  272.         Buy 295 shares of stock(25) with unit price 79.9996, total cost 23629.38, value 23954.74 at day end(unit price 81.302500)
  273.         Left money 9.81
  274. Start of Day 74 with money 23964.550000
  275.         Buy 294 shares of stock(25) with unit price 81.3025, total cost 23932.33, value 24262.82 at day end(unit price 82.626600)
  276.         Buy 1 share of stock(9) with unit price 31.9695, total cost 32.07, value 32.43 at day end(unit price 32.529500)
  277.         Left money 0.15
  278. Start of Day 75 with money 24295.400000
  279.         Buy 293 shares of stock(25) with unit price 82.6266, total cost 24238.89, value 24574.55 at day end(unit price 83.972200)
  280.         Buy 1 share of stock(16) with unit price 55.6840, total cost 55.78, value 56.53 at day end(unit price 56.630400)
  281.         Left money 0.73
  282. Start of Day 76 with money 24631.810000
  283.         Buy 292 shares of stock(25) with unit price 83.9722, total cost 24549.08, value 24890.02 at day end(unit price 85.339800)
  284.         Buy 1 share of stock(24) with unit price 81.0985, total cost 81.20, value 82.33 at day end(unit price 82.425800)
  285.         Left money 1.53
  286. Start of Day 77 with money 24973.880000
  287.         Buy 292 shares of stock(25) with unit price 85.3398, total cost 24948.42, value 25295.84 at day end(unit price 86.729600)
  288.         Buy 1 share of stock(6) with unit price 22.8161, total cost 22.92, value 23.12 at day end(unit price 23.220600)
  289.         Left money 2.54
  290. Start of Day 78 with money 25321.500000
  291.         Buy 291 shares of stock(25) with unit price 86.7296, total cost 25267.41, value 25620.25 at day end(unit price 88.142100)
  292.         Buy 1 share of stock(14) with unit price 51.8404, total cost 51.94, value 52.63 at day end(unit price 52.729300)
  293.         Left money 2.15
  294. Start of Day 79 with money 25675.030000
  295.         Buy 301 shares of stock(24) with unit price 85.1461, total cost 25659.08, value 26018.35 at day end(unit price 86.539700)
  296.         Buy 1 share of stock(3) with unit price 12.0084, total cost 12.11, value 12.12 at day end(unit price 12.223900)
  297.         Left money 3.84
  298. Start of Day 80 with money 26034.310000
  299.         Buy 300 shares of stock(24) with unit price 86.5397, total cost 25991.91, value 26356.83 at day end(unit price 87.956100)
  300.         Buy 1 share of stock(10) with unit price 39.2003, total cost 39.30, value 39.78 at day end(unit price 39.884000)
  301.         Left money 3.10
  302. Start of Day 81 with money 26399.710000
  303.         Buy 299 shares of stock(24) with unit price 87.9561, total cost 26328.77, value 26699.41 at day end(unit price 89.395700)
  304.         Buy 1 share of stock(18) with unit price 68.4783, total cost 68.58, value 69.53 at day end(unit price 69.631600)
  305.         Left money 2.36
  306. Start of Day 82 with money 26771.300000
  307.         Buy 299 shares of stock(24) with unit price 89.3957, total cost 26759.21, value 27136.91 at day end(unit price 90.858900)
  308.         Left money 12.09
  309. Start of Day 83 with money 27149.000000
  310.         Buy 298 shares of stock(24) with unit price 90.8589, total cost 27105.75, value 27489.31 at day end(unit price 92.346000)
  311.         Buy 1 share of stock(10) with unit price 41.2876, total cost 41.39, value 41.91 at day end(unit price 42.007700)
  312.         Left money 1.86
  313. Start of Day 84 with money 27533.080000
  314.         Buy 308 shares of stock(23) with unit price 89.0831, total cost 27468.39, value 27858.11 at day end(unit price 90.548400)
  315.         Buy 1 share of stock(15) with unit price 61.1313, total cost 61.23, value 62.07 at day end(unit price 62.174900)
  316.         Left money 3.46
  317. Start of Day 85 with money 27923.640000
  318.         Buy 308 shares of stock(23) with unit price 90.5484, total cost 27919.71, value 28316.81 at day end(unit price 92.037700)
  319.         Left money 3.93
  320. Start of Day 86 with money 28320.740000
  321.         Buy 307 shares of stock(23) with unit price 92.0377, total cost 28286.27, value 28689.64 at day end(unit price 93.551600)
  322.         Buy 1 share of stock(7) with unit price 30.9957, total cost 31.10, value 31.44 at day end(unit price 31.543100)
  323.         Left money 3.37
  324. Start of Day 87 with money 28724.450000
  325.         Buy 306 shares of stock(23) with unit price 93.5516, total cost 28657.39, value 29067.03 at day end(unit price 95.090300)
  326.         Buy 1 share of stock(15) with unit price 64.3158, total cost 64.42, value 65.31 at day end(unit price 65.413800)
  327.         Left money 2.64
  328. Start of Day 88 with money 29134.980000
  329.         Buy 306 shares of stock(23) with unit price 95.0903, total cost 29128.23, value 29545.62 at day end(unit price 96.654300)
  330.         Left money 6.75
  331. Start of Day 89 with money 29552.370000
  332.         Buy 317 shares of stock(22) with unit price 93.0948, total cost 29542.75, value 29967.12 at day end(unit price 94.633500)
  333.         Left money 9.62
  334. Start of Day 90 with money 29976.740000
  335.         Buy 316 shares of stock(22) with unit price 94.6335, total cost 29935.79, value 30366.84 at day end(unit price 96.197600)
  336.         Buy 1 share of stock(8) with unit price 37.7556, total cost 37.86, value 38.32 at day end(unit price 38.419600)
  337.         Left money 3.09
  338. Start of Day 91 with money 30408.250000
  339.         Buy 315 shares of stock(22) with unit price 96.1976, total cost 30333.74, value 30771.56 at day end(unit price 97.787500)
  340.         Buy 1 share of stock(16) with unit price 72.9181, total cost 73.02, value 74.06 at day end(unit price 74.157400)
  341.         Left money 1.49
  342. Start of Day 92 with money 30847.110000
  343.         Buy 315 shares of stock(22) with unit price 97.7875, total cost 30834.56, value 31280.70 at day end(unit price 99.403800)
  344.         Left money 12.55
  345. Start of Day 93 with money 31293.250000
  346.         Buy 314 shares of stock(22) with unit price 99.4038, total cost 31244.19, value 31697.26 at day end(unit price 101.046700)
  347.         Buy 1 share of stock(9) with unit price 44.4647, total cost 44.56, value 45.14 at day end(unit price 45.243500)
  348.         Left money 4.50
  349. Start of Day 94 with money 31746.900000
  350.         Buy 326 shares of stock(21) with unit price 97.1570, total cost 31705.78, value 32166.62 at day end(unit price 98.770600)
  351.         Buy 1 share of stock(8) with unit price 40.4826, total cost 40.58, value 41.09 at day end(unit price 41.194600)
  352.         Left money 0.54
  353. Start of Day 95 with money 32208.250000
  354.         Buy 325 shares of stock(21) with unit price 98.7706, total cost 32132.95, value 32601.04 at day end(unit price 100.410900)
  355.         Buy 1 share of stock(15) with unit price 73.6427, total cost 73.74, value 74.80 at day end(unit price 74.899900)
  356.         Left money 1.56
  357. Start of Day 96 with money 32677.400000
  358.         Buy 325 shares of stock(21) with unit price 100.4109, total cost 32666.04, value 33143.01 at day end(unit price 102.078500)
  359.         Left money 11.36
  360. Start of Day 97 with money 33154.370000
  361.         Buy 324 shares of stock(21) with unit price 102.0785, total cost 33105.83, value 33590.28 at day end(unit price 103.773700)
  362.         Buy 1 share of stock(9) with unit price 47.6628, total cost 47.76, value 48.40 at day end(unit price 48.497600)
  363.         Left money 0.78
  364. Start of Day 98 with money 33639.460000
  365.         Buy 323 shares of stock(21) with unit price 103.7737, total cost 33551.21, value 34043.26 at day end(unit price 105.497100)
  366.         Buy 1 share of stock(17) with unit price 86.5427, total cost 86.64, value 87.91 at day end(unit price 88.006900)
  367.         Left money 1.61
  368. Start of Day 99 with money 34132.780000
  369.         Buy 323 shares of stock(21) with unit price 105.4971, total cost 34107.86, value 34609.19 at day end(unit price 107.249200)
  370.         Buy 1 share of stock(4) with unit price 22.6967, total cost 22.80, value 23.00 at day end(unit price 23.102300)
  371.         Left money 2.12
  372. Start of Day 100 with money 34634.310000
  373.         Buy 336 shares of stock(20) with unit price 102.9290, total cost 34617.74, value 35127.62 at day end(unit price 104.646500)
  374.         Buy 1 share of stock(2) with unit price 11.7083, total cost 11.81, value 11.82 at day end(unit price 11.919200)
  375.         Left money 4.76
  376. Final money 35144.20
复制代码


如果继续限定每天只允许购买一只股票,那么最终结果会略差,
  1. Start of Day 1 with money 10000.000000
  2.         Buy 232 shares of stock(43) with unit price 43.0000, total cost 9999.20, value 10099.45 at day end(unit price 43.632100)
  3. Start of Day 2 with money 10100.250000
  4.         Buy 207 shares of stock(48) with unit price 48.6822, total cost 10097.92, value 10199.74 at day end(unit price 49.374100)
  5. Start of Day 3 with money 10202.070000
  6.         Buy 215 shares of stock(46) with unit price 47.3353, total cost 10198.59, value 10302.24 at day end(unit price 48.017400)
  7. Start of Day 4 with money 10305.720000
  8.         Buy 214 shares of stock(46) with unit price 48.0174, total cost 10297.12, value 10402.41 at day end(unit price 48.709400)
  9. Start of Day 5 with money 10411.010000
  10.         Buy 233 shares of stock(42) with unit price 44.5413, total cost 10401.42, value 10508.37 at day end(unit price 45.200300)
  11. Start of Day 6 with money 10517.960000
  12.         Buy 217 shares of stock(45) with unit price 48.3604, total cost 10515.91, value 10624.75 at day end(unit price 49.062000)
  13. Start of Day 7 with money 10626.800000
  14.         Buy 231 shares of stock(42) with unit price 45.8690, total cost 10618.84, value 10729.40 at day end(unit price 46.547600)
  15. Start of Day 8 with money 10737.360000
  16.         Buy 220 shares of stock(44) with unit price 48.7001, total cost 10736.02, value 10848.51 at day end(unit price 49.411400)
  17. Start of Day 9 with money 10849.850000
  18.         Buy 224 shares of stock(43) with unit price 48.3248, total cost 10847.16, value 10961.48 at day end(unit price 49.035200)
  19. Start of Day 10 with money 10964.170000
  20.         Buy 223 shares of stock(43) with unit price 49.0352, total cost 10957.15, value 11073.31 at day end(unit price 49.756100)
  21. Start of Day 11 with money 11080.330000
  22.         Buy 222 shares of stock(43) with unit price 49.7561, total cost 11068.05, value 11186.03 at day end(unit price 50.487500)
  23. Start of Day 12 with money 11198.310000
  24.         Buy 237 shares of stock(40) with unit price 47.1088, total cost 11188.49, value 11308.36 at day end(unit price 47.814600)
  25. Start of Day 13 with money 11318.180000
  26.         Buy 236 shares of stock(40) with unit price 47.8146, total cost 11307.85, value 11429.72 at day end(unit price 48.531000)
  27. Start of Day 14 with money 11440.050000
  28.         Buy 235 shares of stock(40) with unit price 48.5310, total cost 11428.29, value 11552.15 at day end(unit price 49.258100)
  29. Start of Day 15 with money 11563.910000
  30.         Buy 234 shares of stock(40) with unit price 49.2581, total cost 11549.80, value 11675.69 at day end(unit price 49.996100)
  31. Start of Day 16 with money 11689.800000
  32.         Buy 218 shares of stock(43) with unit price 53.5223, total cost 11689.66, value 11817.58 at day end(unit price 54.309100)
  33. Start of Day 17 with money 11817.720000
  34.         Buy 238 shares of stock(39) with unit price 49.5485, total cost 11816.34, value 11946.51 at day end(unit price 50.295400)
  35. Start of Day 18 with money 11947.890000
  36.         Buy 237 shares of stock(39) with unit price 50.2954, total cost 11943.71, value 12076.00 at day end(unit price 51.053600)
  37. Start of Day 19 with money 12080.180000
  38.         Buy 236 shares of stock(39) with unit price 51.0536, total cost 12072.25, value 12206.68 at day end(unit price 51.823200)
  39. Start of Day 20 with money 12214.610000
  40.         Buy 241 shares of stock(38) with unit price 50.5809, total cost 12214.10, value 12350.77 at day end(unit price 51.348000)
  41. Start of Day 21 with money 12351.280000
  42.         Buy 240 shares of stock(38) with unit price 51.3480, total cost 12347.52, value 12486.41 at day end(unit price 52.126700)
  43. Start of Day 22 with money 12490.170000
  44.         Buy 239 shares of stock(38) with unit price 52.1267, total cost 12482.18, value 12623.33 at day end(unit price 52.917300)
  45. Start of Day 23 with money 12631.320000
  46.         Buy 244 shares of stock(37) with unit price 51.6260, total cost 12621.14, value 12764.54 at day end(unit price 52.413700)
  47. Start of Day 24 with money 12774.720000
  48.         Buy 243 shares of stock(37) with unit price 52.4137, total cost 12760.83, value 12906.53 at day end(unit price 53.213300)
  49. Start of Day 25 with money 12920.420000
  50.         Buy 242 shares of stock(37) with unit price 53.2133, total cost 12901.82, value 13049.90 at day end(unit price 54.025200)
  51. Start of Day 26 with money 13068.500000
  52.         Buy 230 shares of stock(39) with unit price 56.6906, total cost 13061.84, value 13212.40 at day end(unit price 57.545200)
  53. Start of Day 27 with money 13219.060000
  54.         Buy 253 shares of stock(35) with unit price 52.1228, total cost 13212.37, value 13365.33 at day end(unit price 52.927400)
  55. Start of Day 28 with money 13372.020000
  56.         Buy 252 shares of stock(35) with unit price 52.9274, total cost 13362.90, value 13518.36 at day end(unit price 53.744300)
  57. Start of Day 29 with money 13527.480000
  58.         Buy 233 shares of stock(38) with unit price 57.9188, total cost 13518.38, value 13676.45 at day end(unit price 58.797200)
  59. Start of Day 30 with money 13685.550000
  60.         Buy 238 shares of stock(37) with unit price 57.3983, total cost 13684.60, value 13845.41 at day end(unit price 58.274000)
  61. Start of Day 31 with money 13846.360000
  62.         Buy 243 shares of stock(36) with unit price 56.8498, total cost 13838.80, value 14002.19 at day end(unit price 57.722200)
  63. Start of Day 32 with money 14009.750000
  64.         Buy 255 shares of stock(34) with unit price 54.8114, total cost 14002.41, value 14168.39 at day end(unit price 55.662300)
  65. Start of Day 33 with money 14175.730000
  66.         Buy 254 shares of stock(34) with unit price 55.6623, total cost 14163.62, value 14332.31 at day end(unit price 56.526400)
  67. Start of Day 34 with money 14344.420000
  68.         Buy 253 shares of stock(34) with unit price 56.5264, total cost 14326.48, value 14497.89 at day end(unit price 57.403900)
  69. Start of Day 35 with money 14515.830000
  70.         Buy 234 shares of stock(37) with unit price 61.9125, total cost 14510.93, value 14685.14 at day end(unit price 62.857000)
  71. Start of Day 36 with money 14690.040000
  72.         Buy 245 shares of stock(35) with unit price 59.8272, total cost 14682.16, value 14859.42 at day end(unit price 60.750700)
  73. Start of Day 37 with money 14867.300000
  74.         Buy 244 shares of stock(35) with unit price 60.7507, total cost 14847.57, value 15027.57 at day end(unit price 61.688400)
  75. Start of Day 38 with money 15047.300000
  76.         Buy 243 shares of stock(35) with unit price 61.6884, total cost 15014.58, value 15197.34 at day end(unit price 62.640500)
  77. Start of Day 39 with money 15230.060000
  78.         Buy 249 shares of stock(34) with unit price 61.0522, total cost 15226.90, value 15413.10 at day end(unit price 62.000000)
  79. Start of Day 40 with money 15416.260000
  80.         Buy 248 shares of stock(34) with unit price 62.0000, total cost 15400.80, value 15589.90 at day end(unit price 62.962500)
  81. Start of Day 41 with money 15605.360000
  82.         Buy 254 shares of stock(33) with unit price 61.3217, total cost 15601.11, value 15793.47 at day end(unit price 62.279000)
  83. Start of Day 42 with money 15797.720000
  84.         Buy 253 shares of stock(33) with unit price 62.2790, total cost 15781.89, value 15977.28 at day end(unit price 63.251300)
  85. Start of Day 43 with money 15993.110000
  86.         Buy 259 shares of stock(32) with unit price 61.5551, total cost 15968.67, value 16167.14 at day end(unit price 62.521400)
  87. Start of Day 44 with money 16191.580000
  88.         Buy 245 shares of stock(34) with unit price 65.9404, total cost 16179.90, value 16381.70 at day end(unit price 66.964100)
  89. Start of Day 45 with money 16393.380000
  90.         Buy 265 shares of stock(31) with unit price 61.7483, total cost 16389.80, value 16595.07 at day end(unit price 62.722900)
  91. Start of Day 46 with money 16598.650000
  92.         Buy 250 shares of stock(33) with unit price 66.2601, total cost 16590.02, value 16798.63 at day end(unit price 67.294500)
  93. Start of Day 47 with money 16807.260000
  94.         Buy 256 shares of stock(32) with unit price 65.5123, total cost 16796.75, value 17008.82 at day end(unit price 66.540700)
  95. Start of Day 48 with money 17019.330000
  96.         Buy 270 shares of stock(30) with unit price 62.8787, total cost 17004.25, value 17219.68 at day end(unit price 63.876600)
  97. Start of Day 49 with money 17234.760000
  98.         Buy 269 shares of stock(30) with unit price 63.8766, total cost 17209.71, value 17428.59 at day end(unit price 64.890300)
  99. Start of Day 50 with money 17453.640000
  100.         Buy 247 shares of stock(33) with unit price 70.4956, total cost 17437.11, value 17659.54 at day end(unit price 71.596100)
  101. Start of Day 51 with money 17676.070000
  102.         Buy 260 shares of stock(31) with unit price 67.8318, total cost 17662.27, value 17888.65 at day end(unit price 68.902500)
  103. Start of Day 52 with money 17902.450000
  104.         Buy 259 shares of stock(31) with unit price 68.9025, total cost 17871.65, value 18101.51 at day end(unit price 69.990000)
  105. Start of Day 53 with money 18132.310000
  106.         Buy 266 shares of stock(30) with unit price 68.0289, total cost 18122.29, value 18356.26 at day end(unit price 69.108500)
  107. Start of Day 54 with money 18366.280000
  108.         Buy 251 shares of stock(32) with unit price 73.0592, total cost 18362.96, value 18600.63 at day end(unit price 74.206100)
  109. Start of Day 55 with money 18603.950000
  110.         Buy 257 shares of stock(31) with unit price 72.2169, total cost 18585.44, value 18827.00 at day end(unit price 73.356800)
  111. Start of Day 56 with money 18845.510000
  112.         Buy 280 shares of stock(28) with unit price 67.1751, total cost 18837.03, value 19082.70 at day end(unit price 68.252500)
  113. Start of Day 57 with money 19091.180000
  114.         Buy 263 shares of stock(30) with unit price 72.4511, total cost 19080.94, value 19330.74 at day end(unit price 73.600900)
  115. Start of Day 58 with money 19340.980000
  116.         Buy 270 shares of stock(29) with unit price 71.4863, total cost 19328.30, value 19582.24 at day end(unit price 72.626800)
  117. Start of Day 59 with money 19594.920000
  118.         Buy 269 shares of stock(29) with unit price 72.6268, total cost 19563.51, value 19821.40 at day end(unit price 73.785500)
  119. Start of Day 60 with money 19852.810000
  120.         Buy 261 shares of stock(30) with unit price 75.9555, total cost 19850.49, value 20112.87 at day end(unit price 77.160800)
  121. Start of Day 61 with money 20115.190000
  122.         Buy 276 shares of stock(28) with unit price 72.7376, total cost 20103.18, value 20369.93 at day end(unit price 73.904100)
  123. Start of Day 62 with money 20381.940000
  124.         Buy 284 shares of stock(27) with unit price 71.6219, total cost 20369.02, value 20640.15 at day end(unit price 72.776600)
  125. Start of Day 63 with money 20653.070000
  126.         Buy 259 shares of stock(30) with unit price 79.6293, total cost 20649.89, value 20925.36 at day end(unit price 80.892900)
  127. Start of Day 64 with money 20928.540000
  128.         Buy 302 shares of stock(25) with unit price 69.1742, total cost 20920.81, value 21200.64 at day end(unit price 70.300800)
  129. Start of Day 65 with money 21208.370000
  130.         Buy 273 shares of stock(28) with unit price 77.5173, total cost 21189.52, value 21474.32 at day end(unit price 78.760500)
  131. Start of Day 66 with money 21493.170000
  132.         Buy 281 shares of stock(27) with unit price 76.3534, total cost 21483.41, value 21773.09 at day end(unit price 77.584300)
  133. Start of Day 67 with money 21782.850000
  134.         Buy 280 shares of stock(27) with unit price 77.5843, total cost 21751.60, value 22045.83 at day end(unit price 78.835100)
  135. Start of Day 68 with money 22077.080000
  136.         Buy 271 shares of stock(28) with unit price 81.3072, total cost 22061.35, value 22360.54 at day end(unit price 82.611200)
  137. Start of Day 69 with money 22376.270000
  138.         Buy 288 shares of stock(26) with unit price 77.5668, total cost 22368.04, value 22672.43 at day end(unit price 78.823700)
  139. Start of Day 70 with money 22680.660000
  140.         Buy 297 shares of stock(25) with unit price 76.2149, total cost 22665.53, value 22974.79 at day end(unit price 77.456200)
  141. Start of Day 71 with money 22989.920000
  142.         Buy 307 shares of stock(24) with unit price 74.7755, total cost 22986.78, value 23301.12 at day end(unit price 75.999400)
  143. Start of Day 72 with money 23304.260000
  144.         Buy 306 shares of stock(24) with unit price 75.9994, total cost 23286.42, value 23605.85 at day end(unit price 77.243300)
  145. Start of Day 73 with money 23623.690000
  146.         Buy 285 shares of stock(26) with unit price 82.7179, total cost 23603.10, value 23928.09 at day end(unit price 84.058200)
  147. Start of Day 74 with money 23948.680000
  148.         Buy 294 shares of stock(25) with unit price 81.3025, total cost 23932.33, value 24262.82 at day end(unit price 82.626600)
  149. Start of Day 75 with money 24279.170000
  150.         Buy 275 shares of stock(27) with unit price 88.1737, total cost 24275.27, value 24611.15 at day end(unit price 89.595100)
  151. Start of Day 76 with money 24615.050000
  152.         Buy 303 shares of stock(24) with unit price 81.0985, total cost 24603.15, value 24944.72 at day end(unit price 82.425800)
  153. Start of Day 77 with money 24956.620000
  154.         Buy 292 shares of stock(25) with unit price 85.3398, total cost 24948.42, value 25295.84 at day end(unit price 86.729600)
  155. Start of Day 78 with money 25304.040000
  156.         Buy 291 shares of stock(25) with unit price 86.7296, total cost 25267.41, value 25620.25 at day end(unit price 88.142100)
  157. Start of Day 79 with money 25656.880000
  158.         Buy 312 shares of stock(23) with unit price 82.1050, total cost 25647.96, value 26006.92 at day end(unit price 83.455500)
  159. Start of Day 80 with money 26015.840000
  160.         Buy 290 shares of stock(25) with unit price 89.5776, total cost 26006.50, value 26371.59 at day end(unit price 91.036500)
  161. Start of Day 81 with money 26380.930000
  162.         Buy 280 shares of stock(26) with unit price 94.0690, total cost 26367.32, value 26738.12 at day end(unit price 95.593300)
  163. Start of Day 82 with money 26751.730000
  164.         Buy 335 shares of stock(21) with unit price 79.7324, total cost 26743.85, value 27120.46 at day end(unit price 81.056600)
  165. Start of Day 83 with money 27128.340000
  166.         Buy 309 shares of stock(23) with unit price 87.6416, total cost 27112.15, value 27495.78 at day end(unit price 89.083100)
  167. Start of Day 84 with money 27511.970000
  168.         Buy 308 shares of stock(23) with unit price 89.0831, total cost 27468.39, value 27858.11 at day end(unit price 90.548400)
  169. Start of Day 85 with money 27901.690000
  170.         Buy 287 shares of stock(25) with unit price 97.1134, total cost 27900.25, value 28296.77 at day end(unit price 98.695000)
  171. Start of Day 86 with money 28298.210000
  172.         Buy 307 shares of stock(23) with unit price 92.0377, total cost 28286.27, value 28689.64 at day end(unit price 93.551600)
  173. Start of Day 87 with money 28701.580000
  174.         Buy 318 shares of stock(22) with unit price 90.0921, total cost 28681.09, value 29091.02 at day end(unit price 91.581200)
  175. Start of Day 88 with money 29111.510000
  176.         Buy 295 shares of stock(24) with unit price 98.5419, total cost 29099.36, value 29516.14 at day end(unit price 100.154700)
  177. Start of Day 89 with money 29528.290000
  178.         Buy 305 shares of stock(23) with unit price 96.6543, total cost 29510.06, value 29933.95 at day end(unit price 98.244100)
  179. Start of Day 90 with money 29952.180000
  180.         Buy 316 shares of stock(22) with unit price 94.6335, total cost 29935.79, value 30366.84 at day end(unit price 96.197600)
  181. Start of Day 91 with money 30383.230000
  182.         Buy 328 shares of stock(21) with unit price 92.4729, total cost 30363.91, value 30802.02 at day end(unit price 94.008600)
  183. Start of Day 92 with money 30821.340000
  184.         Buy 303 shares of stock(23) with unit price 101.5025, total cost 30785.56, value 31230.82 at day end(unit price 103.172000)
  185. Start of Day 93 with money 31266.600000
  186.         Buy 314 shares of stock(22) with unit price 99.4038, total cost 31244.19, value 31697.26 at day end(unit price 101.046700)
  187. Start of Day 94 with money 31719.670000
  188.         Buy 326 shares of stock(21) with unit price 97.1570, total cost 31705.78, value 32166.62 at day end(unit price 98.770600)
  189. Start of Day 95 with money 32180.510000
  190.         Buy 339 shares of stock(20) with unit price 94.7552, total cost 32155.91, value 32624.11 at day end(unit price 96.336300)
  191. Start of Day 96 with money 32648.710000
  192.         Buy 301 shares of stock(23) with unit price 108.3471, total cost 32642.58, value 33118.79 at day end(unit price 110.129200)
  193. Start of Day 97 with money 33124.920000
  194.         Buy 324 shares of stock(21) with unit price 102.0785, total cost 33105.83, value 33590.28 at day end(unit price 103.773700)
  195. Start of Day 98 with money 33609.370000
  196.         Buy 337 shares of stock(20) with unit price 99.5781, total cost 33591.52, value 34084.08 at day end(unit price 101.239700)
  197. Start of Day 99 with money 34101.930000
  198.         Buy 336 shares of stock(20) with unit price 101.2397, total cost 34050.14, value 34550.54 at day end(unit price 102.929000)
  199. Start of Day 100 with money 34602.330000
  200.         Buy 310 shares of stock(22) with unit price 111.4906, total cost 34593.09, value 35102.32 at day end(unit price 113.333300)
  201. Final money 35111.56
复制代码

当然如果买入股票可以持续持有,那么手续费应该可以忽略,购买1元的股票即可。
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
您需要登录后才可以回帖 登录 | 欢迎注册

本版积分规则

小黑屋|手机版|数学研发网 ( 苏ICP备07505100号 )

GMT+8, 2024-4-28 10:56 , Processed in 0.052622 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表