### Changes to the model

• changed "cash out" from 50 bps to 75 bps. The sell on the convex (maximum) turn is still in place. The code checks for the cash out first and then checks for the convex turn.
• changed the number of minimums per day that go into the parameter calculation from 2 to three. So for five days this changes the number of values from ten to fifteen. As noted previously, the buy signal parameter is calculated by taking N values from each day and sorting these values. The parameter is the median value in this set.

Calculated parameters from dates: Jul 23, 2008, Jul 24, 2008, Jul 25, 2008, Jul 28, 2008, Jul 29, 2008, with three values per day.

 GOOG -0.45 GS -0.22 CME 0.32 FCX -0.12 OIH -0.19 RIG -0.17 AMGN -0.04 BIIB -0.04 CMI -0.07 ERTS -0.03 ICE -0.18 CAT -0.04 BBBY -0.03 BRCM -0.04 GENZ -0.06 AMZN -0.12

These parameters resulted in much more trading, but unfortunately, didn't result in profits, at least on the paper trading system.

The trading trace is shown below. The trading model leaves the stock in the market for 16 minutes. If the stock has not gone up 25 bps, then stock is sold. A longer time might be a good choice. This sell is there to free up capital, so that other stocks can trade. The assumption is that capital is the scarce resource. That may or may not be true.

ERTS: BUYING with a market order at 2008-07-30 10:15:06 108
ERTS: Fill price : 42.82 at 2008-07-30 10:15:12 866
ERTS: For ERTS MAD = 0.05999999999999517, MAD * 6.0 = 0.359999999999971 at 2008-07-30 10:15:12 866
ERTS: Issuing stop order at price 42.46 at 2008-07-30 10:15:12 866
error: 66 | 202 | Order Canceled - reason:
ERTS: Hit in-market time limit Fill price = 42.95 at 2008-07-30 10:31:20 637

CMI: BUYING with a market order at 2008-07-30 10:16:38 215
CMI: Fill price : 73.91 at 2008-07-30 10:16:40 217
CMI: For CMI MAD = 0.11500000000000199, MAD * 6.0 = 0.6900000000000119 at 2008-07-30 10:16:40 217
CMI: Issuing stop order at price 73.22 at 2008-07-30 10:16:40 217
error: 68 | 202 | Order Canceled - reason:
CMI: Hit cashout at 74.46 at 2008-07-30 10:24:47 988

CMI: BUYING with a market order at 2008-07-30 10:39:08 972
CMI: Fill price : 72.95 at 2008-07-30 10:39:14 474
CMI: For CMI MAD = 0.15500000000000114, MAD * 6.0 = 0.9300000000000068 at 2008-07-30 10:39:14 474
CMI: Issuing stop order at price 72.02 at 2008-07-30 10:39:14 474
error: 72 | 202 | Order Canceled - reason:
CMI: Hit cashout at 73.42 at 2008-07-30 10:42:25 953

CMI: BUYING with a market order at 2008-07-30 10:52:42 261
CMI: Fill price : 72.6 at 2008-07-30 10:52:45 263
CMI: For CMI MAD = 0.04999999999999716, MAD * 6.0 = 0.29999999999998295 at 2008-07-30 10:52:45 264
CMI: Issuing stop order at price 72.3 at 2008-07-30 10:52:45 264
CMI: Stop order hit at 72.28 at 2008-07-30 10:53:07 798

ERTS: BUYING with a market order at 2008-07-30 11:01:36 168
ERTS: Fill price : 42.7 at 2008-07-30 11:01:38 920
ERTS: For ERTS MAD = 0.03999999999999915, MAD * 6.0 = 0.23999999999999488 at 2008-07-30 11:01:38 920
ERTS: Issuing stop order at price 42.46 at 2008-07-30 11:01:38 920
error: 77 | 202 | Order Canceled - reason:
ERTS: Hit cashout at 43.06 at 2008-07-30 11:07:34 778

CAT: BUYING with a market order at 2008-07-30 11:01:44 674
CAT: Fill price : 70.92 at 2008-07-30 11:01:48 681
CAT: For CAT MAD = 0.05999999999998806, MAD * 6.0 = 0.3599999999999284 at 2008-07-30 11:01:48 681
CAT: Issuing stop order at price 70.56 at 2008-07-30 11:01:48 681
error: 79 | 202 | Order Canceled - reason:
CAT: Hit in-market time limit Fill price = 71.22 at 2008-07-30 11:18:14 146

AMGN: BUYING with a market order at 2008-07-30 11:03:37 534
AMGN: Fill price : 62.14 at 2008-07-30 11:03:37 887
AMGN: For AMGN MAD = 0.030000000000001137, MAD * 6.0 = 0.18000000000000682 at 2008-07-30 11:03:37 888
AMGN: Issuing stop order at price 61.96 at 2008-07-30 11:03:37 888
error: 81 | 202 | Order Canceled - reason:
AMGN: Hit in-market time limit Fill price = 62.13 at 2008-07-30 11:19:42 477

GOOG: BUYING with a market order at 2008-07-30 11:04:57 134
GOOG: Fill price : 480.71 at 2008-07-30 11:05:21 903
GOOG: For GOOG MAD = 0.6299999999999955, MAD * 6.0 = 3.7799999999999727 at 2008-07-30 11:05:21 903
GOOG: Issuing stop order at price 476.93 at 2008-07-30 11:05:21 903
error: 83 | 202 | Order Canceled - reason:
GOOG: Hit in-market time limit Fill price = 480.94 at 2008-07-30 11:22:36 448

BBBY: BUYING with a market order at 2008-07-30 11:27:37 028
BBBY: Fill price : 28.13 at 2008-07-30 11:27:40 532
BBBY: For BBBY MAD = 0.019999999999999574, MAD * 6.0 = 0.11999999999999744 at 2008-07-30 11:27:40 532
BBBY: Issuing stop order at price 28.01 at 2008-07-30 11:27:40 532
BBBY: Stop order hit at 28.0 at 2008-07-30 11:34:02 432

OIH: BUYING with a market order at 2008-07-30 11:34:03 431
OIH: Fill price : 194.83 at 2008-07-30 11:34:05 937
OIH: For OIH MAD = 0.20999999999997954, MAD * 6.0 = 1.2599999999998772 at 2008-07-30 11:34:05 937
OIH: Issuing stop order at price 193.57 at 2008-07-30 11:34:05 937
OIH: Stop order hit at 193.55 at 2008-07-30 11:47:23 222

RIG: BUYING with a market order at 2008-07-30 11:35:46 807
RIG: Fill price : 136.66 at 2008-07-30 11:35:57 061
RIG: For RIG MAD = 0.06500000000002615, MAD * 6.0 = 0.3900000000001569 at 2008-07-30 11:35:57 061
RIG: Issuing stop order at price 136.27 at 2008-07-30 11:35:57 061
RIG: Stop order hit at 136.24 at 2008-07-30 11:47:30 231

CMI: BUYING with a market order at 2008-07-30 12:04:08 757
CMI: Fill price : 72.44 at 2008-07-30 12:04:10 007
CMI: For CMI MAD = 0.060000000000002274, MAD * 6.0 = 0.36000000000001364 at 2008-07-30 12:04:10 007
CMI: Issuing stop order at price 72.08 at 2008-07-30 12:04:10 008
error: 95 | 202 | Order Canceled - reason:
CMI: Hit cashout at 72.97 at 2008-07-30 12:18:39 829

BIIB: BUYING with a market order at 2008-07-30 12:32:47 949
BIIB: Fill price : 70.89 at 2008-07-30 12:32:48 208
BIIB: For BIIB MAD = 0.04000000000000625, MAD * 6.0 = 0.24000000000003752 at 2008-07-30 12:32:48 208
BIIB: Issuing stop order at price 70.65 at 2008-07-30 12:32:48 208
BIIB: Stop order hit at 70.63 at 2008-07-30 12:41:08 586

ERTS: BUYING with a market order at 2008-07-30 12:35:30 371
ERTS: Fill price : 43.32 at 2008-07-30 12:35:31 870
ERTS: For ERTS MAD = 0.015000000000000568, MAD * 6.0 = 0.09000000000000341 at 2008-07-30 12:35:31 870
ERTS: Issuing stop order at price 43.23 at 2008-07-30 12:35:31 870
ERTS: Stop order hit at 43.23 at 2008-07-30 12:37:39 507

AMZN: BUYING with a market order at 2008-07-30 12:50:04 304
AMZN: Fill price : 77.55 at 2008-07-30 12:50:07 557
AMZN: For AMZN MAD = 0.029999999999986926, MAD * 6.0 = 0.17999999999992156 at 2008-07-30 12:50:07 557
AMZN: Issuing stop order at price 77.37 at 2008-07-30 12:50:07 557
AMZN: Stop order hit at 77.33 at 2008-07-30 13:04:29 344

AMGN: BUYING with a market order at 2008-07-30 12:55:47 869
AMGN: Fill price : 62.09 at 2008-07-30 12:56:18 139
AMGN: For AMGN MAD = 0.01999999999999602, MAD * 6.0 = 0.11999999999997613 at 2008-07-30 12:56:18 140
AMGN: Issuing stop order at price 61.97 at 2008-07-30 12:56:18 140
AMGN: Stop order hit at 61.96 at 2008-07-30 13:04:08 074

CAT: BUYING with a market order at 2008-07-30 12:56:07 381
CAT: Fill price : 70.87 at 2008-07-30 12:56:10 885
CAT: For CAT MAD = 0.060000000000002274, MAD * 6.0 = 0.36000000000001364 at 2008-07-30 12:56:10 885
CAT: Issuing stop order at price 70.51 at 2008-07-30 12:56:10 885
error: 105 | 202 | Order Canceled - reason:
CAT: Hit in-market time limit Fill price = 70.86 at 2008-07-30 13:12:23 921

CMI: BUYING with a market order at 2008-07-30 12:57:55 719
CMI: Fill price : 71.03 at 2008-07-30 12:58:03 228
CMI: For CMI MAD = 0.09499999999999886, MAD * 6.0 = 0.5699999999999932 at 2008-07-30 12:58:03 228
CMI: Issuing stop order at price 70.46 at 2008-07-30 12:58:03 228
CMI: Stop order hit at 70.38 at 2008-07-30 13:05:49 192

BRCM: BUYING with a market order at 2008-07-30 13:03:23 760
BRCM: Fill price : 23.7 at 2008-07-30 13:04:00 563
BRCM: For BRCM MAD = 0.030000000000001137, MAD * 6.0 = 0.18000000000000682 at 2008-07-30 13:04:00 563
BRCM: Issuing stop order at price 23.52 at 2008-07-30 13:04:00 563
error: 110 | 202 | Order Canceled - reason:
BRCM: Hit in-market time limit Fill price = 23.67 at 2008-07-30 13:20:08 744

ICE: BUYING with a market order at 2008-07-30 13:15:00 343
ICE: Fill price : 101.52 at 2008-07-30 13:15:12 856
ICE: For ICE MAD = 0.2599999999999909, MAD * 6.0 = 1.5599999999999454 at 2008-07-30 13:15:12 857
ICE: Issuing stop order at price 99.96 at 2008-07-30 13:15:12 857
error: 113 | 202 | Order Canceled - reason:
ICE: Hit cashout at 102.42 at 2008-07-30 13:24:51 636

CME: BUYING with a market order at 2008-07-30 13:19:24 846
CME: Fill price : 368.36 at 2008-07-30 13:19:46 373
CME: For CME MAD = 0.8450000000000273, MAD * 6.0 = 5.070000000000164 at 2008-07-30 13:19:46 373
CME: Issuing stop order at price 363.29 at 2008-07-30 13:19:46 373
error: 115 | 202 | Order Canceled - reason:
CME: Hit in-market time limit Fill price = 367.41 at 2008-07-30 13:37:05 131

GENZ: BUYING with a market order at 2008-07-30 13:47:05 437
GENZ: Fill price : 75.36 at 2008-07-30 13:47:06 189
GENZ: For GENZ MAD = 0.04000000000000625, MAD * 6.0 = 0.24000000000003752 at 2008-07-30 13:47:06 189
GENZ: Issuing stop order at price 75.12 at 2008-07-30 13:47:06 189
GENZ: Stop order hit at 75.05 at 2008-07-30 13:51:19 639

CMI: BUYING with a market order at 2008-07-30 14:27:39 355
CMI: Fill price : 70.76 at 2008-07-30 14:27:49 008
CMI: For CMI MAD = 0.045000000000001705, MAD * 6.0 = 0.27000000000001023 at 2008-07-30 14:27:49 008
CMI: Issuing stop order at price 70.49 at 2008-07-30 14:27:49 008
error: 122 | 202 | Order Canceled - reason:
CMI: Hit in-market time limit Fill price = 70.54 at 2008-07-30 14:44:04 281

AMGN: BUYING with a market order at 2008-07-30 14:27:57 265
AMGN: Fill price : 61.67 at 2008-07-30 14:27:58 371
AMGN: For AMGN MAD = 0.10999999999999943, MAD * 6.0 = 0.6599999999999966 at 2008-07-30 14:27:58 371
AMGN: Issuing stop order at price 61.01 at 2008-07-30 14:27:58 371
error: 124 | 202 | Order Canceled - reason:
AMGN: Hit cashout at 62.17 at 2008-07-30 14:33:26 607

ERTS: BUYING with a market order at 2008-07-30 15:33:51 097
ERTS: Fill price : 43.84 at 2008-07-30 15:33:51 849
ERTS: For ERTS MAD = 0.030000000000001137, MAD * 6.0 = 0.18000000000000682 at 2008-07-30 15:33:51 850
ERTS: Issuing stop order at price 43.66 at 2008-07-30 15:33:51 850
error: 128 | 202 | Order Canceled - reason:
ERTS: Hit in-market time limit Fill price = 43.99 at 2008-07-30 15:50:04 151