Position Priority still used when using your own PosSizer dll?
Author: HappyLoser
Creation Date: 5/28/2010 11:07 AM
profile picture

HappyLoser

#1
Dear all,

does anybody know, if WL 5.6 still uses the Position Priority, if I set the Positionsize via my own PosSizer dll?

Or do I need to check the currentPos.Priority and the candidates myself and then decide, if I am allowed to still return a value > 0 for SizePosition?

Thanks and best regards
Faik
profile picture

Eugene

#2
Hi Faik
QUOTE:
does anybody know, if WL 5.6 still uses the Position Priority, if I set the Positionsize via my own PosSizer dll?

PosSizers only size Positions, they don't set priorities.
QUOTE:
Or do I need to check the currentPos.Priority and the candidates myself and then decide, if I am allowed to still return a value > 0 for SizePosition?

Yes, you can check the .Priority property in SizePosition() and decide.
profile picture

HappyLoser

#3
Ok, I think I might not make myself clear enough:

But what if my DLL sets SizePosition to potentially buy more shares that I can by the Margin Factor and my Equity Limit. Will WL use the Position.Priority to select the ones with the lowest Priority first, so that I will not go over the limit?

Thanks for the super fast reply.
Faik
profile picture

Eugene

#4
Your assumption is right: WL is still at control here. If the position size is too big, WL will still use the .Priority property.

btw, curious fact: trade size can't exceed 2 bln. shares even with a PosSizer.
profile picture

HappyLoser

#5
I hoped so. And good to know with the 2 bln shares! Thanks for the support!!!
profile picture

ss161

#6
a somewhat related question:

for each bar, is the PosSizer's SizePosition routine called in order of the previously set priority (assuming priority was set).

thanks.
profile picture

Eugene

#7
The order of calling SizePosition isn't documented. The SizePosition routine is called once per each theoretical Position created by your Strategy.
profile picture

ss161

#8
Thanks. I'm confused as to what to do then though. I've modeled my position sizer after MaxEntryPerDays PosSizer in the documentation. If the trades aren't being fed into the PosSizer's SizePosition routine in descending order of Priority, then it seems to me that the MaxEntriesPerDay Sizer would not work correctly (along with my sizer), since after it has sized the "Max Entry" number of positions, it returns 0 as the position size.

I've adapted it to handle Pairs (each name in the pair is given the same priority), and to allow a maximum number of open positions per GICS Sector, Group, SubGroup, LongSymbol and ShortSymbol. Getting the positions sized in the correct order is critical since when I take a Long trade I need to be able to size the corresponding Short trade on the same bar later when it is called by the SizePosition routine.

If you have any suggestions, I'd appreciate it.

Thanks.
profile picture

Cone

#9
QUOTE:
The order of calling SizePosition isn't documented.
It may not be documented explicitly, but you can verify that the order is by Position Priority, highest to lowest.
profile picture

ss161

#10
I've probably made a logic mistake somewhere, but I'm getting all my shorts sent to the sizer first then the longs -- so for me it's not sending them in order of priority (since both legs of a pair are assigned the same priority).
profile picture

Cone

#11
Okay, we'll investigate. A ticket can help. tia.
profile picture

Eugene

#12
QUOTE:
It may not be documented explicitly, but you can verify that the order is by Position Priority, highest to lowest.

Thanks. Live and learn.
profile picture

Eugene

#13
QUOTE:
Okay, we'll investigate. A ticket can help. tia.

So far we found that the PosSizer indeed operates in descending Priority order.
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).