2001, I had to over-sample <strong>with</strong> each period overlapping <strong>the</strong> previous and followingsamplesby21daysoftrading.3.4 The Benchmark StrategyTo get a comparative measure of <strong>the</strong> performance of a trading agent or a subagent <strong>on</strong>a specific sample, I have compared it to <strong>the</strong> performance of a benchmark strategy <strong>on</strong><strong>the</strong> same sample. This benchmark strategy, which is called <strong>the</strong> ‘Buy and Hold’strategy, divides <strong>the</strong> same amount of m<strong>on</strong>ey as <strong>the</strong> trading agent is allotted at <strong>the</strong>beginning of a run into as many equally sized shares as <strong>the</strong>re are stocks in <strong>the</strong> sample.Using <strong>the</strong>se equal amounts of m<strong>on</strong>ey, stocks of <strong>the</strong> sample are each bought in <strong>the</strong>same proporti<strong>on</strong>s. Then <strong>the</strong>se stocks are held <strong>on</strong> to until <strong>the</strong> end of <strong>the</strong> period of <strong>the</strong>sample in questi<strong>on</strong>. The total value of <strong>the</strong>se stocks is <strong>the</strong>n taken as a benchmark ofperformance for that particular sample.Fur<strong>the</strong>rmore, by dividing <strong>the</strong> final sum, achieved by a trading agent <strong>on</strong> aparticular sample, <strong>with</strong> that of <strong>the</strong> ‘Buy and Hold’ strategy <strong>on</strong> <strong>the</strong> same sample, Icould compare <strong>the</strong> agent’s performance <strong>on</strong> different samples. It would have beendifficult o<strong>the</strong>rwise, as every sample c<strong>on</strong>tains different stocks, and has <strong>the</strong>refore alsodiffering overall rises or falls of stock value.4 Algorithms, Results, and Associated C<strong>on</strong>clusi<strong>on</strong>s4.1 The Subagent AlgorithmThe subagent I have sketched in secti<strong>on</strong> 3.1 uses <strong>the</strong> three most recent stock quotes ofeach stock of <strong>the</strong> chosen sample of <strong>the</strong> stock market for its calculati<strong>on</strong>s. If t is a timevariableand if f(t) denotes <strong>the</strong> most recent quote of a specific equity line, f(t-1) <strong>the</strong><strong>on</strong>e before that, and f(t-2) <strong>the</strong> first quote in this series of c<strong>on</strong>secutive quotes, <strong>the</strong>functi<strong>on</strong> I have used is <strong>the</strong> following:F (t) = ( f(t) + f(t-2) – 2*f(t-1) ) / ( f(t) + f(t-2) ) (1)The time elapsed between two quotes is 1, of whatever unit it may be, in my testsamples 1 day. The numerator of <strong>the</strong> functi<strong>on</strong> can be seen as an incremental form of<strong>the</strong> sec<strong>on</strong>d derivative of <strong>the</strong> graph of a stock’s price over time. I chose this c<strong>on</strong>structas I thought it plausible that stockbrokers and traders would react to changes of <strong>the</strong>speed <strong>with</strong> which share prices went up or down. I divided this rough form of a sec<strong>on</strong>dderivative by (f(t) + f(t-2)) to compensate for <strong>the</strong> varying absolute values of <strong>the</strong>different stocks. In this way a stock <strong>with</strong> an absolute value of 10 crowns (SEK), forexample, and <strong>with</strong> <strong>the</strong> same value for its numerator as a stock <strong>with</strong> an absolute valueof 100 crowns (SEK) would result in a greater absolute value using functi<strong>on</strong> (1)above. It seemed wise, as this would make it possible to direct <strong>the</strong> subagent’s effortstowards <strong>the</strong> cheaper shares, while each share would give possibly <strong>the</strong> same absolutereturn rate as <strong>the</strong> more expensive shares. In essence <strong>the</strong> denominator is <strong>the</strong> meanvalue of f(t) and f(t-2). There are also o<strong>the</strong>r alternatives to get <strong>the</strong> mean price of astock, but as <strong>the</strong> distributi<strong>on</strong> of functi<strong>on</strong> values over a sample spanning <strong>on</strong>e year wasGaussian, as will be shown in Chapter 4, I settled <strong>with</strong> <strong>the</strong> form <strong>the</strong> functi<strong>on</strong> had.At <strong>the</strong> beginning of each run <strong>the</strong> subagent was given a set amount of m<strong>on</strong>ey.Then, at <strong>the</strong> first checkpoint in time (<strong>the</strong> third day in my tests as I used timeincrements of <strong>on</strong>e day), it checked all <strong>the</strong> stocks in a given sample (in my samples 8or 10 stocks) for <strong>the</strong> stock <strong>with</strong> <strong>the</strong> highest value of functi<strong>on</strong> (1). If that value7
exceeded a threshold value, set before <strong>the</strong> start of <strong>the</strong> run, it would buy that particularshare using all <strong>the</strong> m<strong>on</strong>ey allotted. O<strong>the</strong>rwise <strong>the</strong> algorithm c<strong>on</strong>tinued to <strong>the</strong> nextcheckpoint in time (<strong>the</strong> following day), <strong>with</strong> its new set of stock quotes pertaining tothat particular time. When a share had been thus purchased, <strong>the</strong> agent held <strong>on</strong> to thatshare until <strong>the</strong> share’s functi<strong>on</strong> value fell below ano<strong>the</strong>r threshold value, also set inadvance. After having sold <strong>the</strong> share, <strong>the</strong> procedure was repeated until <strong>the</strong> end of <strong>the</strong>period of <strong>the</strong> sample in questi<strong>on</strong>.4.2 Results and C<strong>on</strong>clusi<strong>on</strong>s Pertaining to <strong>the</strong> SubagentTo begin <strong>with</strong>, I tested <strong>the</strong> subagent for a large set of parameter values of <strong>the</strong>threshold of purchase and <strong>the</strong> threshold of sale of functi<strong>on</strong> (1). To get an idea of <strong>the</strong>range of values of this functi<strong>on</strong>, I collected all <strong>the</strong> functi<strong>on</strong> values of Sample 2 (seeappendix) during <strong>on</strong>e year. In Chart 1 <strong>the</strong> number of occurrences of values <strong>with</strong>inc<strong>on</strong>secutive intervals is plotted against <strong>the</strong> mid-value of <strong>the</strong> interval in questi<strong>on</strong>.Chart 1. Frequency of values of functi<strong>on</strong> (1) in equally spaced intervals.Sample 2, 28 Feb 00 - 23 Feb 01.1000100101-0.1-0.1Number of occurrences.-0.1-0.1-0.1-0.1-0.1-0.1-0.1-0.1-0-0-0-0-000.010.020.030.040.050.060.070.080.10.110.120.130.140.15Intervals of values of functi<strong>on</strong> (1).I have used a logarithmic scale; and, as can be seen, <strong>the</strong> distributi<strong>on</strong> is close to aGaussian distributi<strong>on</strong> tending towards a fat-tailed distributi<strong>on</strong> (a distributi<strong>on</strong> <strong>with</strong>large or infinite valued standard deviati<strong>on</strong>). If this would be generally <strong>the</strong> case, it8
- Page 1 and 2: Improved P
- Page 3 and 4: mathematical sign that all is not a
- Page 5 and 6: If the model corresponds well with
- Page 7: this purpose I designed a subagent
- Page 11 and 12: Chart 2, 26 Feb 99 - 25 Feb 00, sam
- Page 13 and 14: Chart 4, Average of 28 samples, 26
- Page 15 and 16: Table 4. The choice of subagent.The
- Page 17 and 18: separately (compare with results of
- Page 19 and 20: interesting to see how much time th
- Page 21 and 22: As I have already indicated in a pr
- Page 23 and 24: [Blume and Easley, 1990] L. Blume,
- Page 25 and 26: B, SHB-ATEL2-B,VOLV-B,WM-B, STE-R,A