I have a fun one that has a couple of issues. That I would love some feedback on.
I have a single strategy that can go both long and short trading futures.
One of the expectations is that if you're long and a short is initiated, that would create a flat position by closing out the long position.
So, assuming im doing nothing wrong on my end....
1) I would expect that the backtest represent that the LE was closed and flat. If it still shows both trades, and I am ok with the theory that they should both show. If they do both show, in this example, the P&L should be subtracted from eachother rather than additive.
2) I see that the SM monitor is reflective of the loss being additive and not including the trade direction in the calc. So this does throw off the P&L.
3) Looking at tradestation with this trade active right now, I have a LE position and not the expected flat position.
Thoughts on either my expectations or the strategy behavior?
Eric
I have a single strategy that can go both long and short trading futures.
One of the expectations is that if you're long and a short is initiated, that would create a flat position by closing out the long position.
So, assuming im doing nothing wrong on my end....
1) I would expect that the backtest represent that the LE was closed and flat. If it still shows both trades, and I am ok with the theory that they should both show. If they do both show, in this example, the P&L should be subtracted from eachother rather than additive.
2) I see that the SM monitor is reflective of the loss being additive and not including the trade direction in the calc. So this does throw off the P&L.
3) Looking at tradestation with this trade active right now, I have a LE position and not the expected flat position.
Thoughts on either my expectations or the strategy behavior?
Eric
Rename
In WealthLab, if you buy you get a long position. If you short, you get a short position. The "cancelling" you described may work in TS, but not in WL backtests. Likewise, you must Sell a long position and Cover a short position.
On TS equities work exactly like you describe.
Futures are a bit of an anomaly as I outlined.
ok, that said - using TS as my reference, looking at the backtest above with equities, options, or futures you can't have both an LE and an SE position at the same time. So i'm not sure how that backtest is possible. Or am I missing something? It def supports single strategy/symbol/single direction philosophy.
Futures are a bit of an anomaly as I outlined.
ok, that said - using TS as my reference, looking at the backtest above with equities, options, or futures you can't have both an LE and an SE position at the same time. So i'm not sure how that backtest is possible. Or am I missing something? It def supports single strategy/symbol/single direction philosophy.
In the WL8 backtester you CAN have multiple open long and short positions simultaneously. You’d need to manage this in your strategy by ensuring to exit any open long while going short and vice versa.
got it, im used to that style of logic!
Thanks!!
Thanks!!
Is that something I can accomplish in blocks?
You had a good start. You only have to add, for example, the same condition (using the OR divider or a Multi-Condition) to Cover as you would for Buy. Then you will Cover a Short Position and Buy a new Long Position. It will be 2 transactions instead of one, but that's the framework we use.
The thing about strategies like this using blocks is that when you have multiple entries and exits, you have to think of it as 2 separate strategies - because they are. Even though you select "Single Position", you can have 1 position for each entry block at the same time.
By the way, live trading is different story and synchronization is important. A BUY will cover a short (at TS and IB) and a SHORT will sell a long. That's how the broker works.
The thing about strategies like this using blocks is that when you have multiple entries and exits, you have to think of it as 2 separate strategies - because they are. Even though you select "Single Position", you can have 1 position for each entry block at the same time.
By the way, live trading is different story and synchronization is important. A BUY will cover a short (at TS and IB) and a SHORT will sell a long. That's how the broker works.
Thanks, I think i can move this forward!
Your Response
Post
Edit Post
Login is required