Kelly position sizing with a fixed stop-loss; dangers of tight stop-loss

User Rating: / 0
Written by Forex Automaton   
Thursday, 13 May 2010 15:44

The main conclusion of the previous article was that a strategy with a position size distributed proportionally to the Kelly Criterion was found to be more attractive than the strategy were potential stop-loss would be distributed according to Kelly. A way to implement such a better strategy was understood to consist in fixing the stop-loss distance while having the position size proportional to Kelly allocation. For that, one would need to optimize the stop-loss distance. Here comes the promised development, improving the histogramming technique used to judge the "attractiveness" of a strategy, and elaborating on the choice of the stop-loss.

I use the following notation:

  • M: number of base currency units bought or sold

  • m: margin

  • L: leverage

  • C: trading capital; dC is its increment as a result of a trade. Profit comes as a positive dC, loss as a negative dC

  • p: current price quote; dp is its change during the time step under study (day in this article)

  • A: amount of capital at risk on a trade

  • a: stop-loss placement parameter as a fraction of price quote

  • k: Kelly capital allocation as a fraction of C; k is less than 1, and is non-negative.

In this notation, the following relationships hold:

M = mL (1)

showing how the margin and the leverage determine the number of units one can trade. Price variations change C:

dC = dp×M (2)

(the difference between long and short trades is ignored for the sake of simplicity in the equations, but of course not in the numerical analysis). The amount at risk is set, on the one hand, by the Kelly Criterion

A = kC, (3)

while on the other hand it is determined by the placement of the protective stop

A = apM = apmL (4)

The two equations above allow one to determine M for each trade on the basis of a and k

M = kC/(ap) (5)

In contrast to M, a and k are fixed by special procedures (in the course of trading system optimization) and do not vary from trade to trade. These special procedures form subjects of research articles found on this site; this article is about optimizing a. Capital allocation fractions are calculated using an implementation of J.Kelly's finding, another special procedure.

Different strategies can be compared by looking at distributions of the relative capital change per trade for the strategies in question:

dC/C = dp/p × k/a (6)

Equation 6 is obtained by substitution of the expression for M from Eq.5 into Eq.2. The fact that leverage L does not enter Eq.6 at all may come as a somewhat counterintuitive revelation. In the approximation used here (ignoring capital cost) leverage does not directly affect profitability of trading. However there are a few details here. The first detail is that leverage is assumed to be such that the margin has no say in determining the stop loss placement. The second detail is that the smaller a gets, the larger is the need to increase leverage in order to satisfy Eq.3 and 4. High leverage and small a go hand in hand. One is tempted to say "small risk" instead of "small a", but that would be misleading -- it's not a but A -- or in accordance with Eq.3, read k -- who sets the risk. We are about to see whether making a small is a good idea.

relative trading capital change distribution, logarithmic scale 1.1 relative trading capital change distribution, linear scale, no tails 1.2

Fig.1. Distribution of day-to-day profit or loss relative to the trading capital. Different sets of symbols denote different settings of the stop-loss parameter a as defined and used in the text. Panel 1.1 uses logarithmic scale while panel 1.2 shows the central part of the distribution without tails on the linear scale. Spread is taken into account in these simulations.

Fig.1 was obtained by taking the current version of Danica model (day scale) and going through the historical data starting in August 2002. In the simulation, the system becomes able to make trading decisions in April 2006 upon completion of the initial training phase. Decisions to trade are made only when all three components of the day candlestick (high, low and close) are predicted to change in the same direction.

Kelly algorithm is applied to determine capital allocation continually. This does not violate causality since every step of the way, only "past" data (in the context of that simulated point in time) are available to the Kelly analysis. The benefit of hindsight does nevertheless enter through the choice of the Fred parameter of the prediction engine. This single adjustable parameter is the same for the 14 exchange rates tracked by the system.

As Fig.1 demonstrates, tight stop-loss results in more losses, the rest of strategy being exactly the same. Tighter stop-loss results in longer tails and a broader distribution of dC/C. This is made possible by higher leverage which is implied (refer to Eq.4).

The purpose of Fig.1 is mainly to show the complex shape of the distribution which can not be captured by just reporting the first and second moments. As to the moments themselves, Fig.2 gives the complete picture for a much richer set of stop-loss parameters.

Mean relative capital increase per trade vs stop-loss as a fraction of price 2.1 RMS of relative capital increase per trade vs stop-loss as a fraction of price 2.2 Simulated growth of $1 after 10,000 system trades 2.3

Fig.2. Effect of stop-loss placement on the trading system performance. 2.1: mean relative capital capital increase per trade, 2.2: RMS of the relative capital capital increase per trade, 2.3: simulated growth of $1 after 10,000 trades (results vary strongly between simulations).

In Fig.2.1, stop-loss parameters below 0.2% are seen to result in a rapid degradation of performance even for the mean of the dC/C. The mean relative capital increase per trade peaks at the stop-loss parameter around 0.3% while the RMS of the dC/C distribution (Fig.2.2) falls monotonically with stop-loss parameter. The ratio of mean to RMS (not shown in the figures but not difficult to infer) does not change much after stop-loss passes the 0.3% mark.

A good way of seeing the effect of the various distribution shapes on the bottom line is Monte Carlo. One generates random numbers distributed according to a given histogram, such as shown in Fig.1, which is taken to represent the differential probability density of dC/C with trading decisions made according to the system signals. If the initial capital is C0, then the capital after n trades is

Cn = C0(1+r1)(1+r2)...(1+rn) (7)

in a particular instance of a simulated history with {ri} being a set of n random numbers distributed according to the particular histogram like the ones shown in Fig.1.

Fig. 2.3 shows Cn for n=10,000 and assuming C0 was 1. The results vary strongly from simulation to simulation, however one feature remains constant: stop-loss parameters below 0.6% on day scale typically result in a total loss of the principal. Of course this naive simulation totally ignores the effect trading makes on the market, which even in forex on the day scale will likely become significant once the trading capital reaches the orders of 109 ($1 Billion) and higher. Not to mention numbers like 1019 which should be regarded as sheer academic abstraction in this context.

Bookmark with:    Digg    reddit    Facebook    StumbleUpon    Newsvine
Last Updated ( Tuesday, 07 December 2010 14:46 )