New Position Sizer requested to change Max Percent Risk behavior
Author: Sammy_G
Creation Date: 5/27/2011 10:50 AM
profile picture

Sammy_G

#1
While the Max % Risk position sizing method (in Portfolio Simulation Mode) may work OK on individual stocks, it appears - based on my testing on my own rotation-type strategies - that it may not be useful when used in this situation, since it often lands up assigning all available equity to one position (?perhaps because its unaware there are other positions to be created). To compensate for this behavior, I have to increase the margin by almost the same factor as # of positions in my script in order to avoid dropped trades (e.g. 5 : 1 if my rotation script holds 5 positions). But then this results in unreliable performance metrics.

So my suggestion is that a new Position Sizer be created that combines the merits of both 'Percent of Equity' and 'Max Percent Risk' sizing methods. This way, one can assign the maximum capital that will be available for any single position, and then the position is further sized down based on the Max % Risk (depending upon the RiskStopLevel defined in the strategy). e.g. if using 5 positions in my rotation script, I will use % of Equity = 20 (or slightly less) for any new position created (not 100% as appears to be the default currently).
profile picture

Eugene

#2
QUOTE:
for any new position created (not 100% as appears to be the default currently).

You don't show what risk % value you set as the default, but if it's too big, new positions will naturally draw all available capital.
QUOTE:
This way, one can assign the maximum capital that will be available for any single position, and then the position is further sized down

Such PosSizers already exist:

Spread Equity Equally
Graded equity percentage
profile picture

Sammy_G

#3
I use 10% risk setting.

I don't think you properly understood the situation. As far as I can tell, all existing position sizers merely divvy up the cash into various sized blocks of cash, and then fully use that cash to enter a position regardless of the stop level (if any). There is NO PosSizer that, after dividing the cash (whether equally or graded) goes the NEXT step, namely further downsize the # of shares to buy (or short) depending on the stop level (RiskStopLevel) and portfolio percent risk settings. None.
profile picture

Eugene

#4
What I understand is that risking 10% of equity in a single trade is a pretty sizable chunk. It's not 10% of account equity, and depending on your risk stop level can leave an insufficient amount for the other positions. No wonder you have to use margin.

In contrast to the two PosSizers I implemented before, one of them being a custom request, here it's hard to see any rationale for further downsizing (upsizing, or whatever) the # of shares. Unless you give me a bullet point list of rules for this new money management algorithm with a clear explanation, it seems questionable and confusing to me.
profile picture

Sammy_G

#5
I visualize the PosSizer as having just 2 input boxes, and one check box:

1. Max number of positions
This box should have a check box below it labeled 'Limit to Cash available (for non-margin accounts)'.

2. Max Portfolio Risk per position (%) [this is just Max Percent Risk re-worded for clarity]. The strategy must assign a RiskStopLevel to each position in order to use this, just as in Max Percent Risk sizing method.

Details and Reasons:
1. Max number of positions: Dividing the portfolio equity by this value would set the maximum amount that is available for a new position.
2. Depending on the selected value, Max Portfolio may further downsize the position.

Perhaps an example may help::

For a margin account:
Max number of positions = 5
Starting equity = $100,000, was equally divided among 5 positions ($20,000 each)
One position is being closed at a loss and gives us $5,000, while the other 4 positions have appreciated in value and are now worth $95,000, and we have to enter a new position; question is - how many shares?
Current equity = 95,000 + 5,000 = $100,000
New position Entry Price: $20
Max amount available for new position = 100,000 / 5 = $20,000

Position Size, shares = 20,000 / 20 = 1,000 shares (if Portfolio Risk was not a consideration) ......A
Position dollar value = 1,000 * 20 = $20,000

Max Portfolio Risk per position: 5 % (i.e. Risk no more than 5% of equity per position)
Initial Stop Level: $18 [this is the RiskStopLevel for the new position]
Position Size, shares: (0.05 * 20,000) / (20 - 18) = 500 Shares ......B
[[Position Size, shares: (0.05 * 100,000) / (20 - 18) = 2500 Shares (if there was no dollar cap per position)]]
Position dollar value = 500 * 20 = $10,000
Even if there was just $5,000 cash available, the balance ($5,000) would be borrowed from the broker.


For a non-margin account:
Same example as above
But since the Cash available is only $5,000 and you cannot borrow on margin, then using the example above the position would be further sized down to:
Position Size, shares = (0.05 * Minimum(Cash available, Max amount allowed per position)) / (20 - 18) = (0.05 * Minimum(5000, 20000)) / (20 - 18) = (0.05 * 5,000) / (20 - 18) = 125 shares ......C
Position dollar value = 125 * 20 = $2,500
This is where the 'Limit to Cash available' check box would come in useful to allow realistic backtesting for non-margin accounts.

=============================
So, depending on the situation, one comes up with different # of shares for the new position:
- Margin account, simply using dollar amount allowed (portfolio risk not a factor) = 1,000 shares ...A (above)
- Margin account, using both dollar amount allowed as well as portfolio risk = 500 shares ...B (above)
- Non-margin account, using the lower of dollar amount allowed per position and actual cash available & also factoring in portfolio risk = 125 shares ...C (above)
=============================

In summary, the PosSizer would really be Max Percent Risk (= Portfolio Risk) position sizing with the additional restriction that the amount available to invest per position cannot exceed Equity divided by Max number of Positions (further capped by cash available for non-margin accounts).
[It is expected, and understood, that universal backtest settings may further limit a position's size e.g. under Preferences | Backtest Settings | Limit a Position's Quantity to a Percentage of the Bar's Volume.]
*/

Hope this clarifies.
profile picture

Sammy_G

#6
Oops. I made a mistake in the post above in the sense that for eq B I used 20,000 (per-position dollar amount) instead of 100,000 (portfolio equity).
But rather than edit it, I will post a new example, limiting it to a margin account for brevity:

Max number of positions = 5
Starting equity = $100,000, was equally divided among 5 positions ($20,000 each)
One position is being closed at a loss and gives us $5,000, while the other 4 positions have appreciated in value and are now worth $95,000, and we have to enter a new position; question is - how many shares?
Current equity = 95,000 + 5,000 = $100,000
New position Entry Price: $20
Max amount available for new position = 100,000 / 5 = $20,000

Position Size, shares = 20,000 / 20 = 1,000 shares (if Portfolio Risk was not a consideration) ......A
Position dollar value = 1,000 * 20 = $20,000
Eq A is same as 'Percent of Equity' position sizing.

Max Portfolio Risk per position: 5 % (i.e. Risk no more than 5% of portfolio equity per position)
Initial Stop Level: $18 [this is the RiskStopLevel for the new position]
Position Size, shares: (0.05 * 100,000) / (20 - 18) = 2500 Shares ......B
Position dollar value = 2500 * 20 = $50,000
Eq B is the current implementation of 'Max Percent Risk' position sizing.

And there lies the problem. It ends up assigning a greater dollar amount to the position, based solely on portfolio risk, than the dollar amount actually available per position. Based on RiskStopLevel and Max Percent Risk setting, it may create a position with even higher dollar amounts. And collectively for all positions this amount can be several times the portfolio equity. Which is what I have observed in backtesting this position sizing method.

Hence the request for this PosSizer which would really be Max Percent Risk (= Portfolio Risk) position sizing with the additional restriction that the amount available to invest per position cannot exceed Equity divided by Max number of Positions (further capped by cash available for non-margin accounts).
profile picture

Eugene

#7
QUOTE:
Hence the request for this PosSizer which would really be Max Percent Risk (= Portfolio Risk) position sizing with the additional restriction that the amount available to invest per position cannot exceed Equity divided by Max number of Positions (further capped by cash available for non-margin accounts).

Please correct me if I'm wrong, as I read your reply over and over: in the Position Sizing control, first you would set a high % risk per position only to artificially reduce it to allow for N positions to take, using the new PosSizer?

For me it boils down to something this: initial risk per position is e.g. 10% (potentially allowing to take a position like 65% of account's equity and leaving no cash for other candidates), max positions allowed in the portfolio = 5, let's cap a position at 20% then (100/5=20), and then we reduce the max % risk per position to fit this limit. This example not necessarily follows your method religiously but rather my impression of it.

What's the point of all that construction, if you can simply take less risk per position??
profile picture

Sammy_G

#8
Don't be fixated on what value of portfolio risk I may have used in some of my backtests. In the examples above, I used 5% portfolio risk.

The bottom-line is that the Max Percent Risk position sizing control is wrong in assigning 100% of equity to every position. It should not exceed (Portfolio Equity/Number of Positions). And that's the entire point, plain and simple.
profile picture

Eugene

#9
QUOTE:
Position dollar value = 2500 * 20 = $50,000
Eq B is the current implementation of 'Max Percent Risk' position sizing.

That's what you get for being a risk taker. If for a moment we recollect the old (but still very sane) adage on risking no more than 2% on a single trade, then 5% (let alone 10%) is 2.5 times larger than that. 2% max. risk would be 1,000 shares by $20 = $20,000. No wonder with 10% risk the position size can max out the available equity. This is not meant to criticize your approach, of course, just to highlight that Wealth-Lab is not to blame at all.
QUOTE:
The bottom-line is that the Max Percent Risk position sizing control is wrong in assigning 100% of equity to every position.

The Max Percent Risk method is working correctly and by design. It does not assign 100% equity per position unless you tell it to do so. Wealth-Lab's modus operandi is documented in the User Guide: Strategy Window > Backtesting Strategies > 100% of Equity Sizing. A pointer to where is it advertised in the User Guide (or elsewhere) that Wealth-Lab's position sizing should care about not exceeding "(Portfolio Equity/Number of Positions)" (or whatever), if it existed, would be appreciated.

Nevertheless, I'll be happy to help you develop your own enhanced Max Percent Risk PosSizer so please fire away with your questions.
profile picture

Sammy_G

#10
Not to be argumentative, but portfolio risk per position is of little value unless you also factor in the number of positions. I am well aware of the 2% adage, but let me ask you this: if you take 50 positions at a time and each is risking 2% of portfolio, do you realize that your portfolio risk just became 100% (50 positions * 2% risk)? And with 100 positions, it becomes 200% of portfolio. Would you still advocate the "sane and safe" 2% risk approach?
*/

Truth be told, I had initially tested some of my strategies using lower % risk settings (2%, 3%, etc) but that left too much in cash. In this scenario, performance metrics are unreliable as they would be largely based on the returns of cash, which is not much. To "soak up" the excess cash, I had to use higher risk settings in order to get results more like real-life. All else being equal, I would personally never risk 10% of portfolio per position (I trade actively and hold many positions on any given day); it was just a backtest setting for the reason given above.
*/

From the WLab User Guide | Reference | Data Panel | Portfolio Simulation Mode under Max Percent Risk:
QUOTE:
If the calculated position cash value is greater than the current equity and no other equity Positions exist in the Portfolio Simulation, position size will be based on 100% of current equity. For the sake of argument, assume that Max Percent Risk in the previous example were selected to be 12%. In this case, 1,500 shares would be calculated as the share size, which is worth $120,000 at $80/share. Since the Current Equity is only $100,000, the calculated position will be reduced to 1,250 shares ($100,000 / $80). Consequently, if the portfolio were fully in cash, the trade would be executed.


[I am tickled that the example chose a risk setting of 12%, not a safe 2%!!]
Let me repeat part of a sentence from the above paragraph "...position size will be based on 100% of current equity." This is just plain wrong. The position size should not exceed (Portfolio Equity/Number of Positions), or 20% of equity for 5 positions, 10% of equity for 10 positions, etc.

So I would appreciate if you could develop a PosSizer similar to the Max Percent Risk except that a position size cannot exceed (Portfolio Equity/Number of Positions). Which means an input box would be required for the number of positions. The initial position size (# of shares) would obviously be calculated using the portfolio equity (since % risk is based on that); if, and only if, the position dollar value turns out to exceed (Portfolio Equity/Number of Positions), then it would need to be downsized so that it doesn't exceed (Portfolio Equity/Number of Positions); if the position dollar value turns out to be <= (Portfolio Equity/Number of Positions), then no size adjustment would be needed. That's it, plain and simple.

[[If the PosSizer beta works OK, then maybe - just maybe - you may consider enhancing it further so that it only uses cash available, not equity, for use with non-margin accounts as I elaborated in my post of 5/28/2011 7:11 PM.]]
profile picture

Eugene

#11
QUOTE:
Would you still advocate the "sane and safe" 2% risk approach?

Of course no. The Portfolio Heat, which I'm going to expand with long/short portfolio heat as one of the changes in 2011.06, is about a similar idea -- to limit the amount of total risk to which a portfolio is exposed.
QUOTE:
So I would appreciate if you could develop a PosSizer similar to the Max Percent Risk except that a position size cannot exceed (Portfolio Equity/Number of Positions).

This where the problem is. Per our support policy, custom solutions (and PosSizers can become involved) isn't part of the support deal. If we consider the PosSizer Library route, then I do not see this PosSizer in our library for the reasons expressed above (weak rationale + usage limited to "Max % Risk").

So I see here two alternatives: to let this idea season to be implemented in a later release as e.g. as another option in the Position Options PosSizer (or something else), or to help you implement it.
profile picture

Sammy_G

#12
I reject your argument that the rationale is weak. Its fairly obvious to me that the current implementation of Max Percent Risk is wrong since it can lead to positions whose combined value can be multiple times the account equity simply b/c it assigns full equity for each position.
*/
Can you expound further on what you mean by "help you implement it"?
profile picture

Eugene

#13
No software can please everyone. Likewise it's not possible to expand the documented, baseline functionality of the Max % Risk for everyone's vision. So by helping you implement it, I meant the natural choice made possible by Wealth-Lab 6's extensibility: help you start developing your own PosSizer as you envision it, by yourself.
profile picture

Eugene

#14
But wait. Let me see if I can boil your request together with a promising idea from this discussion {5/30/2011 2:44 PM, #2} to arrive at a new Max % Risk PosSizer for a later release (2011.06 is ready).
profile picture

Eugene

#15
On a second thought, the idea linked above is best served as an enhancement of the existing Drawdown/Runup PosSizer. So no "new Max % Risk PosSizer" (for a new public PosSizer, there has to be a real improvement and not just a tweak).

Instead I'll try adding the requested logic in the Position Options PosSizer. There's going to be just one extra option activated when using the Max % Risk: constrain position size to no more than X% of equity. Since Max Open Positions is already there, no need in complicating the formula with max number of positions.
profile picture

Eugene

#16
P.S. To stress the point further: am not talking about some position size capping logic that can skip trades or adjust size. In other words, instead of computing the position size based on the total equity, the Max % Risk will base its calculation on the specified fraction of equity (0% to 100%). So if you're planning on having 10 positions, you'd enter 100% / 10 = 10% in the PosSizer's input field for the new size to be adjusted respectively.
profile picture

Eugene

#17
Sammy_G, look for the requested option to limit the position size as a % of equity for Max % Risk in the new release. It's introduced to the redesigned Position Options dialog. Hope that helps.
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).