Multi-Positions in Combination Strategy
Author: falcon82
Creation Date: 6/19/2013 9:09 AM
profile picture

falcon82

#1
Hello,

last time I tried the feature Combination Strategy in Wealth-Lab. It is a very nice tool. I have just one question according to this tool:

Example: I have two strategies and both strategies run separately first and get then combined with the Combination Strategy Tool, right? So it can happen that when the first strategy trades the symbol AA (with the highest priority) and the second strategy trades the symbol AA (with the highest priority) too that I have a double (sized) position in AA with the combination of these two strategies.

Is there a way to avoid this kind of behavior when I combine two strategies, so that I have always just one position in a symbol over all strategies (maybe with a special strategy code)? e.g. that when the first strategy select the symbol AA (highest priority) and the second strategy select the symbol AA too that the second strategy select the symbol with the second highest priority instead.

Thanks for your help!
profile picture

Eugene

#2
Hi,

You can approach it with PosSizer. The Position Options PosSizer lets you limit the number of long/short positions a system can hold at a time. Priority Adjustment and Graded equity percentage give a finer control, but using a different approach.

P.S. Note! You ought to know this before upgrading to 6.5.19, if you're serious about Combination strategies:

ATTENTION! Combination Strategies broken in 6.5.19

profile picture

falcon82

#3
Hello Eugene,

thanks for your help and the PosSizer hint - this is working for now! But it is still an approach to organize the positions between the different strategies, because first each strategy gets executed by itself and the result is the sum of all strategies - this is how the combination strategy tool is designed, right? Maybe in the future WL can create a PosSizer for the combination strategy tool which can organize the positions among all strategies in the combination?
profile picture

Eugene

#4
You could try to accomplish your task by assigning a lower "Strategy Priority" value in the Combination Strategy tool to the first Strategy. In this case, Wealth-Lab will give higher priority to positions created by the 1st strategy when there's not enough money to execute all signals.

As for creating a PosSizer for the combination strategy tool, your proposition doesn't seem valid to me because PosSizers are applied on a per Strategy basis - not to Combination Strategy as a whole.
profile picture

Supersol

#5
Dear Eugene,

I have a similar problem. I want to combine multiple strategies (A,B,C,..), and it shouldn't be allowed that more than one strategy is trading a symbol simultaneously. For instance, if A holds already AAPL, than B and C are not allowed to make an entry in AAPL until A exits it and vice versa. Still, all strategies should enter n positions each.
If A,B,C using the same entry method, at the same time, and all three strategies alert AAPL, the one with the highest priority should get its turn.

Can I implement this with the "Combination Strategy" and the "Position-Options/Max open in symbol" function/PosSizer in Wealth-lab? Do I have to put the value of "Max open in symbol" to "1"? But what, if all strategies using multi-position-code?

Maybe this code (if it is still implemented in the latest WL version) would work out?

Thanks a lot for your help,
regards.
profile picture

Eugene

#6
Hi Mathias,
QUOTE:
Maybe this code (if it is still implemented in the latest WL version) would work out?

Although this code should work in each and every version, it's hard to see how it would help you. The same logic (and problem) applies here: each system is executed individually without knowing its peer's holdings.

QUOTE:
I want to combine multiple strategies (A,B,C,..), and it shouldn't be allowed that more than one strategy is trading a symbol simultaneously.

Try using Wealth-Lab's global memory that is shared between different Strategies. The QuickRef examples for SetGlobal, GetGlobal and ClearGlobals should give you an idea. When one system (A) takes a position in symbol AAPL, it sets a "don't enter" flag via SetGlobal, and vice versa (an "okay to enter" when this Position is closed). Mind the casting (unboxing) that should take place in GetGlobal. Don't forget to clear the global memory in the end.

Please ask any general questions re: global memory in appropriate thread(s), should you have them.
profile picture

KGo

#7
QUOTE:
Maybe in the future WL can create a PosSizer for the combination strategy tool which can organize the positions among all strategies in the combination?

QUOTE:
I want to combine multiple strategies (A,B,C,..), and it shouldn't be allowed that more than one strategy is trading a symbol simultaneously


Can do now. A new style of combination will apply a PosSizer to all trades from all included strategies. For example, all the options in the Position Options PosSizer may be used on the combination trades. You can limit one open trade per symbol or 5 total trades per day and so on. See https://www.wealth-lab.com/Forum/Posts/New-style-of-Combination-Strategy-uses-Historical-Trades-40092/
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).