Limit Orders WL6 snaggs
Author: EJoub
Creation Date: 7/2/2012 10:16 AM
profile picture

EJoub

#1
Can someone please tell me if the following Limit orders present particular problems on WL6.

Strategy, buy on lowest and sell on highest.

Back testing on one symbol, buy and sell with limit orders, and fixed position size and one buy or sell per day... and Monte Carlo there after.

Back testing on a 10 symbols portfolio, each with equal position size. So in this case all 10 will have capital if a buy comes along on the same day. Also a maximum of one buy or sell per symbol per day. Thus no competition between buy signals per day.

It's testing ok but there may be unknown saggs.

Guidance will be welcome. Thanks.

profile picture

Cone

#2
Precision can be a problem when comparing two floating point numbers for equality, i.e., the limit price and the high or low of the day. I've even seen a case in C# in which two "identical" fp numbers resulting from two different sets of calculations failed a test for equality.

To minimize the side effect of essentially an equality test for fp numbers, use the Backtest option "Turn off limit/stop order rounding entirely", or, add/subtract a minuscule number, epsilon, to your limit price such that it is always within the precise boundary of the high/low of a bar.
profile picture

EJoub

#3
QUOTE:
To minimize the side effect of essentially an equality test for fp numbers, use the Backtest option "Turn off limit/stop order rounding entirely", or, add/subtract a minuscule number, epsilon, to your limit price such that it is always within the precise boundary of the high/low of a bar.

You said "or" so I activated "Turn off limit/stop order rounding entirely" The Annualized Profit is now 18% higher than before. Is that possible? Backtest on 4.5 years of data and plenty trades during period. Ok, I have commissions included. I can check other parameters/indicators but which single one would indicate that this is correct way to go.
profile picture

Cone

#4
Compare the number of trades before and after using that setting. It's likely you were missing trades before due to Wealth-Lab's rounding to the "tick" price, which is the decimal setting for stocks (v6.2 and up).

See User Guide: Preferences > Advanced Settings > Pricing Decimal Places. If the value is 2, then Wealth-Lab will execute trades using a 0.01 "tick" value.

However, especially for buy limit systems, you shouldn't expect to be executed at the precise low of a bar. For liquid securities there could be thousands of shares bidding at that price and not be executed. It's a good idea to test using Preferences > Slippage & Round Lots > Activate Slippage for Limit Orders to see the effect.
profile picture

EJoub

#5
Cone, thank you. Without you guys supporting many of us would be in trouble.

QUOTE:
Compare the number of trades before and after using that setting. It's likely you were missing trades before due to Wealth-Lab's rounding to the "tick" price, which is the decimal setting for stocks (v6.2 and up).
That is spot on...more trades now, a wopping 8.5% more.

You are referring to market depth, that will be visible if I trade so I can adjust accordingly if possible.

I'll work the rest and report findings. Best.
profile picture

EJoub

#6
With slippage of 0.1% my Annualized profit drops by half, at slippage of 0.5% it's down to a quarter of the original value. Learning the hard way, but learning.
profile picture

EJoub

#7
Hi Cone

Can you give me an idea of what a sensible slippage % would be. My trading platform staff
have theories but no %.
profile picture

Cone

#8
It depends on the market, instrument, and trading system. In my trading experience, slippage for EOD market orders at the opening of the stock market session is a "wash" - negative and positive slippages approximately equal each other. (I look at it each day, but that's just my gut feel. Someday I'll compile the data to analyze it.) For a limit system, any trade, even a penny past your limit trigger price practically assures a realistic fill. For intraday trading, you can probably estimate market/stop order slippage by doubling the average spread.

Trading electronic futures with market or stop orders is a different story altogether. For less liquid markets, you can easily take 25 ticks of slippage (guarenteed negative here!) on trades. Even liquid markets like oil and currencies can move at lightning speed at times, but good luck if trading those without stops.
profile picture

EJoub

#9
Hi Cone, Thanks for your comprehensive reply.

QUOTE:
It depends on the market, instrument, and trading system.
I realised this testing Dipbuying and short term Trend following on about 140 symbols. I could at least see the effect
of slippage and commissions if the system traded often or not. Thus more variables to consider.

I agree with you on Slippage for EOD.

No intraday unless for damage control.

QUOTE:
Trading electronic futures with market or stop orders is a different story altogether. For less liquid markets, you can easily take 25 ticks of slippage (guarenteed negative here!) on trades
Thanks for this as I wasn't aware of this. I'm planning to trade CFD's...very close to futures.

QUOTE:
good luck if trading those without stops.
I'm not testing on those, but thanks for the warning. Rather small losses than shooting for big profits.



This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).