Assume there are 2 identical child strategies with same transaction weight (the lower, the better), just differ in entry price as a limit order. Max Open per Symbol of the MetaStrategy is set to 1.
Strategy #1: limit at $3.50
Strategy #2: limit at $2.30
Assume the Low of the EntryBar is $2.10, the Backtester prioritize the position of Strategy #2 (better Transaction Weight) and skipps the trade of Strategy #1, but technically, it's not possible that the limit of Strategy #2 is filled, while the order of Strategy #1 doesnt. In this case the Backtester should set the prio to Strategy #1 because of the much higher fill price. Right now, the Backtester kind of peeks into the future.
Strategy #1: limit at $3.50
Strategy #2: limit at $2.30
Assume the Low of the EntryBar is $2.10, the Backtester prioritize the position of Strategy #2 (better Transaction Weight) and skipps the trade of Strategy #1, but technically, it's not possible that the limit of Strategy #2 is filled, while the order of Strategy #1 doesnt. In this case the Backtester should set the prio to Strategy #1 because of the much higher fill price. Right now, the Backtester kind of peeks into the future.
Rename
First thing, you should not use Transaction weight for limit orders unless you want to filter their signaling.
The backtester isn't peeking to get this result. You prioritized a limit order at $2.30 over transmitting the signal for $3.50, presumably by assigning the inverse or negating the limit price and assigning it to the signal's Transaction.Weight. There's no peeking required to know that 2.30 is less than 3.50.
If there's something I didn't understand correctly about the settings, tell me what it is.
The backtester isn't peeking to get this result. You prioritized a limit order at $2.30 over transmitting the signal for $3.50, presumably by assigning the inverse or negating the limit price and assigning it to the signal's Transaction.Weight. There's no peeking required to know that 2.30 is less than 3.50.
If there's something I didn't understand correctly about the settings, tell me what it is.
QUOTE:
First thing, you should not use Transaction weight for limit orders unless you want to filter their signaling.
Yes, it's used to filter the entry signals and to generate more "consistent" backtests.
QUOTE:
You prioritized a limit order at $2.30 over transmitting the signal for $3.50, presumably by assigning the inverse or negating the limit price and assigning it to the signal's Transaction.Weight. There's no peeking required to know that 2.30 is less than 3.50.
Assume there are these to signals for the same symbol at $2.30 and $3.50 for the next trading day. Let's say the Open is at $4.50 and the price continues lower. On the way to $2.10, which will be the Daily Low, the price reaches $3.50 and the first order will be filled, because at this time, it's unkown if the price will continue lower. At the first fill, the Backtest Max Open per Symbol condition is hit, so now, no more trades on the symbol are allowed. Next, the price reaches the second order at $2.30, the order should be rejected, due to Max Open per Symbol is already reached. While backtesting this szenerio, the Backtester just compares the Transaction.Weight for these two orders, and doesnt take into account, which order would be executed correctly in terms of time. So the Backtester would trade the order at $2.30 and skip the order at $3.50, but logically this would not be possible while Live Trading. If the Daily would be $3.10, the Backtester would only trade the order at $3.50, because the order at $2.30 wouldn’t be filled.
Hey zillon,
Like Cone said, we don't recommend using Weight for limit orders, for reasons like this. One could also argue that your MetaStrategy is issuing two signals for the same symbol, and in real trading you would see these two signals and possibly know you would only have enough capital to fill one of them. Since you set the Weight for one of the signals higher, the backtester will prioritize that signal. I can totally see the other side of the coin and how you might think this is a bug, but it's actually working as designed.
Like Cone said, we don't recommend using Weight for limit orders, for reasons like this. One could also argue that your MetaStrategy is issuing two signals for the same symbol, and in real trading you would see these two signals and possibly know you would only have enough capital to fill one of them. Since you set the Weight for one of the signals higher, the backtester will prioritize that signal. I can totally see the other side of the coin and how you might think this is a bug, but it's actually working as designed.
QUOTE:
One could also argue that your MetaStrategy is issuing two signals for the same symbol, and in real trading you would see these two signals and possibly know you would only have enough capital to fill one of them.
I'm manually prioritize the order with the highest entry limit for that reason and ignore all remaining orders, which unfortunately doesn't match the backtest then.
The only solution would be the possibility to filter out signals by the MetaStrategy itself.
Your Response
Post
Edit Post
Login is required