Forex position sizing and Kelly Criterion

User Rating: / 5
Written by Forex Automaton   
Wednesday, 28 April 2010 16:44

I compare four different position sizing strategies to use in algorithmic trading with Danica forecasting system. Two of them incorporate Kelly Criterion information. It seems that the strategy I have been using so far has been a sub-optimal one; a way to proceed is discussed.

Of all the possible ways of using Danica's output, the so-called close-to-close strategy is currently the baseline. This strategy consists in submitting market orders as soon as possible after the release of the forecast, buying and selling forex pairs in the direction of the forecast day trend for close, provided that the predicted change for the daily high and low would be in the direction of that trend. That is, selling not unless lower low, lower high, lower close are expected; buying not unless higher low, higher high, higher close are expected. Each such market order would be accompanied by a protective stop but no profit target. The stop would be set on the previous day's low and high, depending on the direction of the trade. That is, if the order is a sell, previous day's high would serve as a stop.There is no profit target in this strategy.

Capital allocation fractions are calculated using an implementation of J.Kelly's finding. Knowing

  • total capital trading and its fraction dedicated to the particular forex pair (they are all equal),

  • the predicted price move strength for tomorrow and Kelly's recommended capital allocation based on past history of success for such predictions,

  • the leverage used (which is somewhat immaterial as long as the placement of the protective stop is determined by our strategy and not by broker's margin requirement)

you determine the position size.

Spread is taken into account in the Kelly algorithm in a simple way, by subtracting it when determining whether a given outcome is a profit or a loss.

What has been just described is really just a logical rather than quantitative outline. Quantitatively speaking, various position sizing algorithms or strategies are possible, and this article compares four different strategies labeled from A to D.

  • A: constant position size. You trade the same number of contracts/units per currency pair whenever there is a signal (L0 trigger).

  • B: position size is variable, but the potential loss, which is controlled by setting the protective stop, is the same no matter what currency pair you are trading. The larger is the distance between the previous day's extreme levels of the price quote which determine the stop loss in this strategy, the smaller your exposure gets.

  • C: Kelly position size. The position size is proportional to the Kelly capital allocation coefficient when it's positive, and is zero when it's negative or zero. Out of the four options, this one appears to be the best. The problem is that this, like option A, is not a complete solution since you still do not know how many contracts/units to trade -- the strategy only tells you that it has to be proportional to Kelly allocation. By itself, this is enough to fill the histogram, but not enough to trade.

  • D: stop-loss according to Kelly. The amount of money risked on a trade via potential stop-loss is given by the Kelly capital allocation coefficient when it's positive, and is zero when it's negative or zero. This option is most consistent with the intended meaning of Kelly Criterion, and is the one I currently use.

A quick model for comparing effects of different position sizes used here consists in histogramming the profit or loss at the end of a day, expressed in the units of price at close, where position size enters as a histogram weight. (Histogram weight of x makes one outcome count as x outcomes when it comes to calculating distribution's moments on the basis of the histogram).

relative profit distribution, logarithmic scale

Fig.1. Distribution of day-to-day profit or loss in relative units (price at close is taken as a unit). Four strategies labeled A through D are discussed in text. Histograms are normalized to the unit integral, and their essential statistics are listed in Table 1.

One striking feature in Fig.1 is the left-right asymmetry with a pile-up of events just to the left of zero for the strategies B and D. The common feature of these strategies is presence of stop-loss distance in the denominator of the expression for the capital allocation -- this is what it takes to keep the capital at risk independent of the distance between the price at which the deal is entered and the stop-loss. Most likely, it is this feature that redistributes the unwanted negative tail population towards zero, compressing the tail of negative outcomes and creating the characteristic pile-up just below zero.

Table 1. Performance statistics for the four model strategies presented in text and in Fig.1, taken from the histograms in Fig.1. Data covers the time span from August 2002 and up to present time; real-time use of the system began in January 2010.

Strategy Statistics
# trade signals end of day P/L, relative to price, 14 forex pairs
mean RMS mean/RMSmean × # signals
A 12,075 3.2×10-4 7.1×10-3 4.5×10-2 3.8
B 12,075 2.1×10-4 4.0×10-3 5.1×10-2 2.5
C 6,659 9.2×10-4 6.7×10-3 1.4×10-1 6.1
D 6,659 5.1×10-4 4.0×10-3 1.3×10-1 3.4

It is somewhat paradoxal that Strategy C, Kelly position size, gives so much better expected profit per unit, compared to Strategy D, the latter one being the literal implementation of Kelly's approach. Indeed, it is the capital at risk, not the position size, that figures in Kelly's parimutuel algebra.

On the other hand, it is somewhat unnatural that the distance to the previous day's price extreme has a say in determining the position size, as it does in Strategy D. It (the distance to the previous day's price extreme) has come to play this role because of our desire to use predictions for next day's low and high, which as we know have fairly high quality. Indeed, knowing that the price will most likely not go below yesterday's low (as is the case when a positive prediction for day's low is received), it is natural to take yesterday's low as a stop. On a flip side, following a day with very strong price movements, we have to make a choice between, on the one hand, limiting our market exposure just because the new range between the extremes is so large we can't tolerate the amount of capital at risk it implies, and on the other hand, accepting an increased risk with a generous protective stop.

Strategy D resolves this dilemma by limiting the exposure, which usually does not feel natural. The difference between an expected net profit of 9 pips per trade (C) and 5 pips (D -- both according to Table 1) is serious enough to rethink the options on the table. The solution to try will be to adopt Strategy C and drop the link between low-to-high range and stop loss, optimizing a fixed stop loss or the one linked to recent volatility, as has been done in the Brute Force Optimization effort last year. The three predictions (low, high and close) will retain their role in trade idea selection (along the lines of existing triggering ideas) but not in capital allocation.

Bookmark with:    Digg    reddit    Facebook    StumbleUpon    Newsvine
Last Updated ( Sunday, 21 November 2010 16:36 )