PosSizer: How do I adjust position size based on priority?
Author: mikesblack
Creation Date: 12/23/2009 2:11 AM

#### mikesblack

#1
Hey fellas- With pos sizer now (5.6), how can I adjust the percentage of equity in relation to priority magnitude? Also, can you suggest references for use of this new item? Thanks in advance.

#### Eugene

#2
Unfortunately, Fidelity didn't make the API documentation available yet - including the PosSizer part of it. The development of a PosSizer requires Visual Studio or SharpDevelop; so, without the documentation and an example, creating a PosSizer is not that simple.

I'm marking your idea for our upcoming PosSizer pack.

#### Eugene

#3
By the way, what are the adjustment rules?

#### mikesblack

#4
Let's say that through regression or multi regression I find a good linear ( perhaps exponential)relationship between values in an indicator or set of values of indicators with % return on past trades.

I have now some regression formula that defines that relationship. The result of such a formula are in terms of average % return on trades. I might want to assign values of position size that are adjusted with higher values getting higher % of equity, within limits. e.g. ( between 2-12 percent of equity.)

I could envision discrete limits on % of equity based on the user defined limits on values found in his or her specific formulation, such as, if for example, where F(x)= p.Priority, F(x) >.01 and F(x)<.02 then position size = 3%; if F(x) >.02 and F(x)<.04 then position size = 4%; if F(x) >.04 and F(x)<.06 then position size = 4%, etc... This way the user wouldn't be bound to a continuous relationship that may not relate to the distribution of results.

Does this make sense? Do you have any ideas how this may be applied?

#5
BTW Thanks-

#### Eugene

#6
This is interesting idea. I think of creating a demo version of our PosSizer pack and make it available through the Extension Manager. (The full version that currently includes over a dozen of money management techniques will be available to customers only.) This one will suit IMHO. The demo project's source code can then be disclosed in the Wiki, helping to build PosSizers w/o the manuals currently unavailable.

Thanks for the explanations. I'm only interested in the pure numerical part of it i.e. what kind of input values are to be expected by the PosSizer. It will then process the values stored in the Position.Priority property (or .Tag) and apply a formula with a stepping. The question is, should we make the demo universal i.e. the stepping of the input values is determined automatically, based on the range of values, or make it simple and hardcoded. This will speed up the development of the demo PosSizer.

#### mikesblack

#7
Perhaps not totally clear, but some priority values may not suggest a linear progression of risk applied. In fact, perhaps we may find that while even though percentage of return generally increases with magnitude of Position.Priority at some point the efficiency of that return will peak much earlier. For sake of money management it might seem most practical to manually define the steps accordingly in order to have the greatest position size at the peak of return/risk relationship and the least amount at the tails.

I am looking forward to using this. Thanks for making this practically available for us. Very much appreciated.

#### mikesblack

#8
For what it's worth, having the flexibility to enter position size in steps or on a continuous way should work in all cases. Besides I'm sure my forecasting ability is not even close to the difference found between sizing in steps or by continuous methods.

#### Eugene

#9
I'll be looking into this task early next year, after meeting a recurring deadline.

#### mikesblack

#10
Great! Thanks Eugene. I'll look forward to it.

#### Eugene

#11
Thought that your idea is too specific and sexy for a demo. So, the Random PosSizer will make the demo and this one goes to our closed source PosSizer pack (please create a support ticket to grab the library once it's ready). Before we get the ball rolling, let me throw some ideas/questions at you.

Firstly, I don't like the idea of "the flexibility to enter position size in steps" for several reasons:

1. Dynamical threshold settings in the interface (i.e. user adding/removing priority thresholds interactively, on demand) are out of question: time consuming and complicated.
2. We're left with fixed steps, and next question is: how many steps to have to enter position size in steps? Two is probably too small, 10 is too big (GUI-wise). Maybe 4? Or 6?

Do you find useful, when sizing a position "on a continuous way", to be able to reverse the way a position is sized according to Priority? For example, assign a larger size when Priority is 0.6 and a smaller when it's -0.4 - and do the same in reverse.

#### mikesblack

#12
I should think the more steps the better, within practical consideration. I should think 4 is enough, but would prefer 6.

Sorry, but as far as your question on reversing order, can you explain again what you mean. I'm not sure I quite understand.

#### Eugene

#13
QUOTE:
I should think 4 is enough, but would prefer 6.

That's what I'm talking about. 4 could be enough, but some Strategy is dying to have 6... this ain't a very universal approach.

What we have on the other hand is more appealing: say, there are 100 trades with their priorities ranging from 0.1 to 0.9, break them up in [N] bins (after that, the step can be determined automatically), and define the minimum and maximum position size (the program would decide on increment). Having just this logic considerably simplifies the PosSizer and its GUI.
QUOTE:
Sorry, but as far as your question on reversing order, can you explain again what you mean. I'm not sure I quite understand.

This means an option to either Increase or Decrease position size while Priority grows. One option sets larger size with growing Priority, another one does the opposite. Does that sound practical to you?

#### mikesblack

#14
Sounds right to me.

Let's say however, and for further consideration someone should find that the most efficient trades are found in the middle (.3-.7). Perhaps the distribution of efficient trades might be skewed in on direction or the other, do you imagine it possible to do the following: Bin 1: 3% of equity= 0-.29, Bin2: 4% of equity=.29-.39 Bin3: 5% of equity=.39-.49, (Now decreasing size with magnitude)Bin 4 3% of equity=.49-.69 Bin 5 2% of equity .69-.79 Bin 6 Don't trade!!!

#### Eugene

#15
Well, you're asking for it and I see you're skewed to the idea of "the flexibility to enter position size in steps". Let me see if it's possible and not too time consuming to create 2 PosSizers: one for manual playing with 6 bins like you just described, and one for automatical breaking of priorities in N bins and varying their size.

#### Eugene

#16
As you can see below, here's how your idea about "the flexibility to enter position size in steps") translates to a PosSizer:

This example only takes trades with the random assigned priorities ranging between 0.4-0.49 and 0.7-0.79, as can be proved by the "Trades+" visualizer (0.8-1.0 as well, though their size is set to 0% so they weren't included).

Here we have a series of checkboxes that define the number of active priority groups. Unchecking them:

1) allows to have any number of Priority groups from 1 to 6,
2) currently makes the trades with these priorities disappear.

Instead of skipping trades, what'd you say about a default position size option? So the unchecked priorities 0-0.29, 0.3-0.4 and 0.5-0.69 could rather produce trades with the default position size (e.g. 2%)?

P.S. I also plan to code another one, implementing the "formulation" idea (i.e. the user only has to define the number of "bins", but sorting priorities and breaking them up into bins is done automatically). This should be far more simple.

#### mikesblack

#17
This is very much what I had in mind. Fantastic! Thanks! Great design also.

I want to share a couple Excel scatter plots I have created to demonstrate some of my findings, but don't know how to do so.

#### Eugene

#18
Uploading them to any image hoster (above is tinypic.com, but imagebam.com, imageshack or whatever) and posting the direct or thumbnail link inside a pair of IMG tags (next to ...QUOTE, CODE > IMG) should work.

btw, please create a support ticket to get the PosSizer. For at least some time to come, it will be shared with the known customers through the support portal.

#19
Nice Eugene! :)

#### mikesblack

#20
QUOTE:
PosSizer settings?
Strategy?
Data? etc.

Settings: Starting From: 0.00-1.9; 3% 2-3.9; 4% 4-4.9, 5% 5-7.9 6% ,8-8.9 8% , 9-100 9%
data: SP 500

I'll follow up with a ticket.

#### Eugene

#21
QUOTE:
Settings: Starting From: 0.00-1.9; 3% 2-3.9; 4% 4-4.9, 5% 5-7.9 6% ,8-8.9 8% , 9-100 9%
data: SP 500

At the risk of duplicating my thoughts in your ticket, please explain here what sort of trouble you have, possibly avoiding vague descriptions like "unusual results" or "the calculations are not correct".

#### mikesblack

#22
Eugene, Bravo! I have found very useful results with this sizer method that I will start implementing after some further tests. Thank you!

Two questions:
1. Seems when I use another sizer, when I come back to this one the settings reset to it's original default values. Is there a way to set my new values as defaults so that I don't need to reset these values every time I switch away?

2. Will it be possible in the future to combine sizer methods?- e.g. This one with draw down or other?

Hope you have a nice weekend.

#### Eugene

#23
Thanks.

1 - I can't reproduce it, and I made sure that this PosSizer saves/restore its settings properly. However, currently there's a bug in WL 5.6 that has something to do exactly with saving/restoring PosSizer settings.
2 - It is only possible by manually programming another PosSizer that combines the features of two individual PosSizers.
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).