How to use PosSizers in Rules based strategy?
Author: Tims
Creation Date: 9/19/2019 11:46 PM
profile picture

Tims

#1
I have searched for the answer but could't find one yet. Is there a way to use one of the PosSizers in WealthLab Pro in a rules based strategy? I want to be able to trade with the ability to increase and decrease shares from an open position. I need the strategy to account for the increase and decrease in shares. When the current position reaches a certain level of drawdown increase or decrease shares inversely as it starts to make a profit increase or decrease.

Thank you.
profile picture

Eugene

#2
Sorry, such position management goes far beyond the capabilities of Rule-based Strategies. One cannot pyramid or scale out of a Position there. Scaling in and/or out requires having a code-based (WealthScript) Strategy and/or using dedicated PosSizer e.g. Pyramiding.

What existing Rules let you do is some simple tasks like exiting when number of open positions reaches a specified value (see 'Position-based' group of conditions). Note that multiple open positions in an instrument are allowed by activating the "Multiple open Positions allowed" radio button.
profile picture

Cone

#3
@Tims, just to throw it out there, keep in mind that Wealth-Lab strategies manage Positions.

So, if you have a Position in XYZ that happens to be 100 shares and want to increase this to 105 you can do it 2 ways:

1. Sell the 100 share position, then buy a 105 share position. This is easier because you only have to manage 1 open position.
2. Add 5 shares. This is usually more difficult because you have to manage 2 positions (or even more if you continue to add equity).

Likewise, decreasing the position from 100 to 95 shares. In both of these cases, however, you'll end up with 1 position:

1. Akin to #1 above; Sell the 100 share position, then buy 95 shares.
2. Split the 100 shares into 2 positions and sell the part that has 5 shares. This method takes a little getting used to.

There's never just 1 way to do things, but I'd probably go with the SetShareSize() method to easily deal with the shares of each position since you're able to set this in the script. With other PosSizer methods, the strategy script generally can't obtain the size of a Position since size is performed after the script runs.

I hope I helped and didn't add confusion!
profile picture

Tims

#4
Thanks very much for your help on position sizing.
The method you suggested, Cone, ie, selling entire position, then buying less or more, depending.
What we are doing is re-balancing the 3x ETFs daily, so we have to do it 15 minutes before the close. This will enable us to use market orders, which will immediately be filled.
But, more importantly, I buy when the market is going down, and the furthur it goes down, the more I buy. I DON'T recommend this for new guys, you have to get used to the idea that you look forward to the market going down, so you can buy more! I've done very well with this, but you have to get used to the fact that all you can lose is: all you have.
My trading mgr. sometimes writes you with questions, but he's going to start learning c+ now, maybe you have a suggestion for him on where, or how to start(basic beginning).
Thanks a lot for being patient with us. We're staying with WealthLab, despite a few glitches, because of the tremendous array of tools offered through extensions, add-ons, etc., which no other platform has for a sophisticated investor.
You learn to tolerate a couple of fleas, so you can love your dog!
Tim
profile picture

Eugene

#5
QUOTE:
You learn to tolerate a couple of fleas, so you can love your dog!

Well said!
profile picture

Tims

#6
Hello, Eugene do you have any resources on PosSizers and programming them into strategies or making them a stand alone strategy? I am still trying to figure out how to use the PosSizers as I described above.

Thank you.
profile picture

Eugene

#7
Hi Tim,

As Cone suggested above, the position sizing here is applied with SetShareSize and splitting shares is done with SplitPosition.
profile picture

Tims

#8
Hello Cone, is there a way to use the PosSizers in the strategy monitor, if I am not able to scale currently open positions can I use the PosSizers in the strategy monitor with trades moving forward? Are there any tutorials or extra help you can offer on how to use the PosSizers?
profile picture

Eugene

#9
Tim, if you haven't seen this note in the User Guide then it's the right time: Strategy Monitor > Operational difference between the Strategy Monitor and Backtester.
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).