I've been struggling to get my strategies to run smoothly in Strategy Manager. The exit signals always seem to have issues, and despite reaching out to support, the responses haven't been very helpful. Plus, the reply time is slower compared to posting in the forum here.
Here is one case to illustrate the frustration I'm facing. Among a few strategies, I have two of them trading Nasdaq100 stocks. The two strategies are "RSI2 MR on NDX100" (S1) and "Deterministic Knife Juggler v1" (S2). Here is the (relevant) timeline:
2/6: S2 generated a signal of CDW (in backtest it entered a position, but I started to run it after that date so there's no CDW position on my broker).
2/11: S2 bought 17 shares of MAR (still open)
2/12: S2 bought 46 shares of PLTR (still open)
2/13: S1 bought 3 shares of AXON and 24 shares of MRVL
After 2/13 market close, I needed to generate signals for 2/14. When I ran S2 with trading options (1. Block exit order.. 2. use broker account value for position sizing, 3. Use Live position), it generated exit signals to exit AXON and MRVL positions, which were NOT entered by S2 but S1.
Then I run it without using live position (still keep 1. Block exit order.. 2. use broker account value for position sizing), then:
a. it generated exit orders for CDW, which was not a live position on my broker because that signal was before I traded it. This might not be a problem since when I place the order it supposed to fail due to the block exit order option.
b. It generated exit orders for PLTR and MAR, which were indeed entered by S2. However the position size is not correct: it's 13 for MAR and 37 for PLTR, while the correct size should be 17 and 46.
c. A NFT position of FTNT.
What's wrong here? Did I not using the correct trading preferences? How can one get the correct exit signals that matches the entry strategy and entry quantity? My goal was to auto trade a few strategies but with these issues no one can actually do that. How does ppl here do it?
IB filled orders:

Run strategy S2 with live position after 2/13 market close:

Run strategy S2 without live position after 2/13 market close:
Here is one case to illustrate the frustration I'm facing. Among a few strategies, I have two of them trading Nasdaq100 stocks. The two strategies are "RSI2 MR on NDX100" (S1) and "Deterministic Knife Juggler v1" (S2). Here is the (relevant) timeline:
2/6: S2 generated a signal of CDW (in backtest it entered a position, but I started to run it after that date so there's no CDW position on my broker).
2/11: S2 bought 17 shares of MAR (still open)
2/12: S2 bought 46 shares of PLTR (still open)
2/13: S1 bought 3 shares of AXON and 24 shares of MRVL
After 2/13 market close, I needed to generate signals for 2/14. When I ran S2 with trading options (1. Block exit order.. 2. use broker account value for position sizing, 3. Use Live position), it generated exit signals to exit AXON and MRVL positions, which were NOT entered by S2 but S1.
Then I run it without using live position (still keep 1. Block exit order.. 2. use broker account value for position sizing), then:
a. it generated exit orders for CDW, which was not a live position on my broker because that signal was before I traded it. This might not be a problem since when I place the order it supposed to fail due to the block exit order option.
b. It generated exit orders for PLTR and MAR, which were indeed entered by S2. However the position size is not correct: it's 13 for MAR and 37 for PLTR, while the correct size should be 17 and 46.
c. A NFT position of FTNT.
What's wrong here? Did I not using the correct trading preferences? How can one get the correct exit signals that matches the entry strategy and entry quantity? My goal was to auto trade a few strategies but with these issues no one can actually do that. How does ppl here do it?
IB filled orders:
Run strategy S2 with live position after 2/13 market close:
Run strategy S2 without live position after 2/13 market close:
Rename
You shouldn't use Live Positions when trading the same symbols with multiple strategies. A "live position" will be injected into any strategy using the symbol. Isn't this clear?
Sizing will also be a problem when trading the same symbols in multiple strategies because:
1. You can't use "Always set Exit Order Qty.. " Why? because if more than one strategy has a position open, just one of them can exit all the shares (if that's okay, then use this option).
2. Use Fixed Dollar Sizes. Adjust as required periodically as account equity changes significantly.
- Or just don't trade the same group of symbols. Guys, there are 100,000 instruments out there, and most them are highly correlated.
As for the sizes changing, I don't know. You didn't specify the sizing rule or preferences for that, and, it's a bit confusing anyway because you're changing variables for different runs.
Sizing will also be a problem when trading the same symbols in multiple strategies because:
1. You can't use "Always set Exit Order Qty.. " Why? because if more than one strategy has a position open, just one of them can exit all the shares (if that's okay, then use this option).
2. Use Fixed Dollar Sizes. Adjust as required periodically as account equity changes significantly.
- Or just don't trade the same group of symbols. Guys, there are 100,000 instruments out there, and most them are highly correlated.
As for the sizes changing, I don't know. You didn't specify the sizing rule or preferences for that, and, it's a bit confusing anyway because you're changing variables for different runs.
@cone What do you mean that I changed variables between runs? I did not change anything for different runs on different days for the same strategy. Unchecking the live click option was the only change I made to show the exit sizing issue I’m facing.
As for position sizing for the strategies, both are % of equity. One uses 1% and another uses 2%. That was never changed after the strategies were setup in SM.
As for position sizing for the strategies, both are % of equity. One uses 1% and another uses 2%. That was never changed after the strategies were setup in SM.
Right, you changed Live Positions. That has a profound effect in the S. Monitor (and Streaming Strategy windows).
1% and 2% of what? Backtest equity? Broker account equity? You didn't tell us all of your Trading preferences.
1% and 2% of what? Backtest equity? Broker account equity? You didn't tell us all of your Trading preferences.
Broker equity(use broker equity for position sizing option). I mentioned that in the first post. I’ll post a graph later.
Here are the points to understand:
1. WealthLab always does backtests. The backtest has an equity curve that will almost never match your acccount.
2. Sizing with broker account equity will change the Signal size to reflect the percentage of your account. This doesn't change the position size in the backtest. It only changes the Signal size to send with the order to your broker.
3. Since backtest Position sizes won't match those in your account, you must need a Portfolio Sync option to adjust the exit size
4. The Broker position are all the shares from any strategy (or non-strategy). There's no way for brokers to tell us which shares came from a strategy.
Bottom line:
You can't use % of equity to trade the same instrument with more than 1 strategy in the same account - unless you don't mind one strategy exiting all the shares.
(This information is in the User Guide for these preferences.)
1. WealthLab always does backtests. The backtest has an equity curve that will almost never match your acccount.
2. Sizing with broker account equity will change the Signal size to reflect the percentage of your account. This doesn't change the position size in the backtest. It only changes the Signal size to send with the order to your broker.
3. Since backtest Position sizes won't match those in your account, you must need a Portfolio Sync option to adjust the exit size
4. The Broker position are all the shares from any strategy (or non-strategy). There's no way for brokers to tell us which shares came from a strategy.
Bottom line:
You can't use % of equity to trade the same instrument with more than 1 strategy in the same account - unless you don't mind one strategy exiting all the shares.
(This information is in the User Guide for these preferences.)
@Cone thanks for the reply. I'm wondering how do you (and others on the forum that use WL) solve this in your personal trading.
1. Do you trade on different non overlapping universe for each of your strategy?
2. Use different accounts for strategies with overlapping tickers?
3. Use fixed amount for strategies and do adjustment?
I have to disagree with this since a lot of people trade the same universe with different strategies. For example on Nasdaq100 one might have MR and LTTF strategies at the same time. I'm sure @Glitch trades different strategies on Nasdaq100 according to his videos.
1. Do you trade on different non overlapping universe for each of your strategy?
2. Use different accounts for strategies with overlapping tickers?
3. Use fixed amount for strategies and do adjustment?
QUOTE:
- Or just don't trade the same group of symbols. Guys, there are 100,000 instruments out there, and most them are highly correlated.
I have to disagree with this since a lot of people trade the same universe with different strategies. For example on Nasdaq100 one might have MR and LTTF strategies at the same time. I'm sure @Glitch trades different strategies on Nasdaq100 according to his videos.
Here is my trading preference
For trading the same instrument in the same account with multiple strategies you need to:
1. Turn off Use Live Positions
2. You can leave "Use Broker Account Value..." selected, but you cannot use % of Equity-based sizers for this trading.
3. The easiest way is to just use Fixed Dollar Sizing.
If your account value is $100,000 and you want 5% sizes, just use $5,000 fixed dollar sizing. Adjust the size periodically. If you adjust the size "higher", "Reduce size of Exit Orders to match.. " will help to match the broker size for existing positions.
For sure you need to leave "Always set Exit Order Quantity..." UNCHECKED.
1. Turn off Use Live Positions
2. You can leave "Use Broker Account Value..." selected, but you cannot use % of Equity-based sizers for this trading.
3. The easiest way is to just use Fixed Dollar Sizing.
If your account value is $100,000 and you want 5% sizes, just use $5,000 fixed dollar sizing. Adjust the size periodically. If you adjust the size "higher", "Reduce size of Exit Orders to match.. " will help to match the broker size for existing positions.
For sure you need to leave "Always set Exit Order Quantity..." UNCHECKED.
That's right, we talk about in the next Strategy Trading video episode 3, I should get that out today.
QUOTE:
4. The Broker position are all the shares from any strategy (or non-strategy). There's no way for brokers to tell us which shares came from a strategy.
I'm thinking whether this is possible from a technical point of view.
The problem here is that there's usually one position per ticker in a broker account, and it's just a snapshot of the # of shares at a point in time. So WL doesn't not know the number of shared hold by have a given strategy.
However, for position exit, does one have to use positions? By using information from brokers on orders -> executions, one knows how many shares are bought/shorted from an entry order of a strategy, what if instead of using live position, which does not have information about strategies, one uses the information from orders -> executions to infer the exit size?
@Cone I don't understand why exit size calculation depends on position sizer. Shouldn't position sizer only be used for entry size calculation in both backtesting and live trading?
QUOTE:Yes. Remember I said all trading is generated by a backtest? Backtests trade Positions. A Position has a Quantity, a.k.a, "size" or "shares/contracts".
However, for position exit, does one have to use positions?
QUOTE:No, we're not going to guess.
one uses the information from orders -> executions to infer the exit size?
QUOTE:It depends on the backtest Position. The Position was created by a sizer. I hope I driven this idea home that the Backtester drives the trading.
I don't understand why exit size calculation depends on position sizer.
All the "Position Sync" happens after the backtest using the signals and the broker info, which you can see in the Accounts Tool (Ctrl+T).
QUOTE:
one uses the information from orders -> executions to infer the exit size?
No, we're not going to guess.
To me, the current "Using Live Position" trading preference option is guessing, and get the exit size from execution information is actually more reliable in almost all cases.
From documentation on using Live Position:
The preference works by interrupting the backtester's execution on the last bar of data being processed. WealthLab then removes any theoretical open positions that the backtester has generated. It queries the associated broker and account, and injects the live position returned by the broker. It then executes the strategy logic on the remaining bar of data, allowing the strategy to issue exit orders for a live position.
With this option, WL injects data from brokers, while still runs in the backtest mode (your point of backtesting drives trading). What I meant is that instead of injecting broker provided # of shares, infer the exit positions from order executions from this strategy. I guess this requires WL has a order history saved for each strategy.
The broker always returns only ONE position, no matter how many different positions your various strategies placed in WL. Live Positions is simply not compatible with a trading style that uses multiple strategies.
QUOTE:
The broker always returns only ONE position, no matter how many different positions your various strategies placed in WL. Live Positions is simply not compatible with a trading style that uses multiple strategies.
@Glitch: yes I understand that there's only one position per ticker and it's a consolidation of all executions from all orders. That's why I asked whether it's possible to not directly using the broker reported # of shares per ticker (aka position) for strategy exit sizing but instead using broker reported executions (e.g from order status updates or execution reports). This will definitely require some work to collect and keep track of orders/executions so WL is aware of fills for all entry signals. If this is doable as a trading preference then it would eliminate a few pain points for trading overlapping universe in one account discussed in this thread.
The first thing I want to confirm is that do you think this is reasonable and doable with WL? If not why? If it is, I'll raise a feature request.
Ah OK you're proposing an enhancement, of course anything is possible. It's just a question of development effort and prioritization. You should submit a new #FeatureRequest for this idea and vote for it.
Great. Created a feature request here https://wealth-lab.com/Discussion/Support-trading-option-to-exit-position-based-on-executed-order-size-12192
QUOTE:Unless I missed something, there was no discussion of these options, so as far as I understand only first option "Block exit orders" has to be checked, right?
That's right, we talk about in the next Strategy Trading video episode 3, I should get that out today.
I was referring to the concept of using a fixed position size, and periodically adjusting it based on the size of the equity. What concept were you hoping to hear more about?
QUOTE:I just wanted to know which Portfolio Sync options you have enabled with your MetaStrategy.
What concept were you hoping to hear more about?
I only use the first two:
- Block Exit Orders when Position not Found
- Reduce size of Exit Orders to match Position Quantity
- Block Exit Orders when Position not Found
- Reduce size of Exit Orders to match Position Quantity
Your Response
Post
Edit Post
Login is required