joma8
- ago
Is there a way to simulate a spread? Alternative: Backtesting on Bid and Ask prices.
1
1,086
Solved
14 Replies

Reply

Bookmark

Sort
Cone8
 ( 6.17% )
- ago
#1
If the idea is to penalize your trading, you can use Preferences > Backtest > Commissions for that.
1
Best Answer
- ago
#2
Hi All!

I have the following questions concerning spread:

- are Bid/Ask prices taken in building block strategies
- can the Slippage talken to simulate the Spread
- or are you taking the spread into account and - if specified - adding the slippage
0
- ago
#3
Thanks!
ka
0
- ago
#4
Hi,

For all practical purposes, bid/ask prices are not taken into account by any strategies.
0
Glitch8
 ( 12.53% )
- ago
#5
We would first need a source of historic, long term, bid/ask prices. If anyone knows of such a source we could consider building some way to inject that into our backtesting.
0
- ago
#6
I think it’s even more complicated than that: I believe that the bid/ask alone would not be enough; and we should also have the volume of orders places at each bid/ask price.

For example, we might have a stock trading at 12.1/12.4. But then it’s completely different if I am trying to buy 10 stocks than if I am trying to buy 1000 stocks. The more I try to buy, the more likely it is that there is not enough available at the cheapest ask and the rest would get filled higher.

This can get very complex, really fast!

Another more extreme example (that actually happened to me a couple of weeks ago while following your great Knife Juggler system from Wealth-Signals):
- orders are placed at a limit;
- the minimum of the day was slightly lower than the limit price;
- therefore, any backtest would consider that there was an entry position (Buy);
- However, because the volume behind that ask was so low, my order didn’t get filled at all (not even partially).


Trying to solve the slippage with bid/ask historical data is quite a can of worms, I think…
2
Cone8
 ( 6.17% )
- ago
#7
I think we noticed that KJ trade in WealthSignals. I don't remember the symbol, but the trade was filtered by Wealth-Data, right? i.e., the low of the daily bar is actually higher than where that trade executed.

Apart from that, bid/ask does not represent real trading at all for stocks, and further, market makers are not required to accept your offer on all ECNs.

Bid/Ask for Forex, okay. Is that what we're talking about?
0
- ago
#8
Hi Cone,

I am not sure anymore - I would need to check in more detail the executed signals vs the orders.

I might be wrong, but I seem to remember that the minimum of the day was actually lower than the order’s limit price (at IB at least). A possible explanation is that there was a sell order from someone, with a very limited quantity, placed just a tiny bit lower than the next set of orders. Then, someone else who was first with a buy would “clean” that quantity and my order didn’t have the opportunity to fill. I guess this is a rare occurrence, but I believe it is more than theoretically possible. Hence the point I was trying to make about the futility (in my opinion; and I am open minded enough to change if provided with good arguments) of trying to incorporate the historical bid/asks (if they’re were to even exist somewhere) in the real spread calculations. Now, if we are referring to Forex, then it starts making much more sense.
0
Glitch8
 ( 12.53% )
- ago
#9
For example, there was a recent order for SIRI, the position that closed previous to the currently open one. I didn't even get the fill in my personal brokerage account because it opened just below that limit price and then shot up. This can be simulated in WL7 with Limit Order Slippage. But, I should say, on the other side of the coin, there have been cases where I did get a trade in my brokerage account that the WealthSignals system actually missed!
0
Cone8
 ( 6.17% )
- ago
#10
QUOTE:
I seem to remember that the minimum of the day was actually lower than the order’s limit price (at IB at least).
Yes, definitely. Any other EOD data will include all full-lot trades. Wealth-Data, however, filters outliers like that one.

@Glitch (and this is off-topic, sorry Eugene)
Currently, the "only way" (maybe there's another) you'll get a trade in a brokerage account that doesn't fill In WealthSignals is if an odd-lot trade fills above/below the high/low of the day. Since charts only use full-lot trades, $500+ stocks like AMZNs, GOOGLs, and TSLAs, provide a good chance of getting odd-lots filled beyond the high/low of the day.
0
- ago
#11
Thanks for all your exellent comments.

I just tested the slippage parameter "Adjust Entry/Exit Prices" in the preferences.
The Exit Price Slippage could be verified.
The Entry price seems to be unchanched?
Are you taking the slippage into account at the Entryprice?

Thank you!
br
ka
0
- ago
#12
.....I could also not verify a change at Entry Prices when you set the Parameter "Limit Orders" in the Slippage Preferences Menu?

Thank you!
br
ka
0
- ago
#13
You can learn more about these options by striking F1 key. It's explained in the Help.
0
Glitch8
 ( 12.53% )
- ago
#14
Nope, it does not change the entry price. Instead it simulates what would happen in the real world.
0

Reply

Bookmark

Sort