Jim Dean
 Elite
   Posts: 1059
Joined: 10/11/2012
Location: L'ville, GA
User Profile |
Slippage becomes very important as the position size becomes a significant fraction of the daily volume, and it cannot reasonably be modelled as some simple fixed percent per share. Since historical Bid-Ask spreads are not available, it must be estimated from other data ... OHLCV.
Simple Slippage estimation/modelling algorithm:
Presumptions:
1. Slippage is a function of position size vs symbol liquidity ... the larger the ratio of those two, the greater the slippage.
2. Slippage is related to the recent volatility of the symbol ... bigger True Range values as a percent of price mean greater slippage.
3. Slippage related to position size (#1) can be best applied interpreted relative to the True Range of the symbol, rather than as a pct of its C
Implementation:
a. User-input a "min-liquidity reference" slippage-percent-of-ATR for very LOW size/liquidity ratios, and the index-ratio matching that percent ... for example, if position size is < AvgV/100000, then slippage might be 0.01% of the daily ATR
b. Also provide a "max-liquidity reference" slippage-percent-of-ATR for HIGH size/liquidity ratios, and the index-ratio matching that percent ... for example, if position size is > AvgV/10, then slippage might be 100% of the daily ATR
c. Since this is not a linear function, also provide a "typical-liquidity reference" slippage-pct-of-ATR for MEDIAN situations, and the index-ratio matching that percent ... for example, if position size is = AvgV/1000, then slippage might be 10% of the daily ATR
THE MATH ... simple three-point linear interpolation:
Find the size vs AvgV RATIO for Entry or Exit bar (diff for each)
If that RATIO is < AvgV/1000, then interpolate between the min and typical slippage ... if not, then interpolate between the typical and max slippage. (Be sure to cap the min and max percentages.)
Apply calculated slippage percent to the "ideal" entry or exit price and fold in that loss to the PL calculations.
SUMMARY:
This is easy to understand, and therefore easy for the user to input the six calibration-inputs described above. It also takes the "logic" of "how and why things slip" about as far as you can, using OHLCV, scaling the slippage bigger or smaller on a rational, user-controlled basis.
TAKING IT FURTHER:
If historical bid-ask info is available, studies can be done to correlate this approach and the Slip% it calc's to the "true" slip that the Bid-Ask might imply. That historical study's results can be used to predefine the defaults for the six inputs mentioned above. Of course this can be added at any time ... even without it, common-sense and user-control makes the outlined method both practical and realistic.
[Edited by Jim Dean on 10/15/2012 3:37 PM]
|
Jim Dean
 Elite
   Posts: 1059
Joined: 10/11/2012
Location: L'ville, GA
User Profile |
One further thing you COULD do to make the simulations a bit more realistic ... take the calc's described earlier and apply a "slop" factor to them using a random-number generator. That is, whatever the slippage was calculated to be, allow the random-number generator to "wiggle" it a little from trade to trade, with the wiggle bounded by an additional user input.
I have implemented this entire thing, plus a lot more besides, into a spreadsheet and the "randomized wiggle" seems to lend much more "reality" to the model. But I'll admit that this extra thing is not critical. If you ever get MonteCarlo analysis implemented (which would be wonderful), then this would go hand in hand with it.
|