Equalizing a Portfolio for Optimization

Questions about MultiCharts and user contributed studies.
flipflopper
Posts: 261
Joined: 28 Feb 2008
Has thanked: 2 times
Been thanked: 1 time

Equalizing a Portfolio for Optimization

Postby flipflopper » 29 Mar 2010

How to chose proper position sizing on a portfolio of stocks so as to equalize the results from all stocks during optimization.

Here is an example:

* Stops and targets are based on the volatility of the individual stock
* Let's say there are two $100 stocks. Stock A has a stop of $1 and Stock B has a $2 stop since one is twice as volatile as the other.

Does this mean that you buy 200 shares of Stock A and 100 shares of Stock B? This would equalize the amount risked between the two stocks at $200.

In other words the Easy Language code would go something like this:

Positionsize = dollarriskamount/(volatilityofindividualstock * stoplossmultplier)

User avatar
Bruce DeVault
Posts: 438
Joined: 19 Jan 2010
Location: Washington DC
Been thanked: 2 times
Contact:

Postby Bruce DeVault » 30 Mar 2010

It's common to do things such as:

(a) equalize the dollar amount invested e.g. $5000 / stock price. This approach most commonly used for equities in systems that don't inherently use a stop. Not usually applicable to commodities or spot forex.

(b) equalize the dollar amount risked in distance to the initial stop. This requires taking into account the dollar value of a point move e.g. $50 for ES, and knowing the stop distance in advance. Complicated by the fact that the stop may be pulled up during the course of the position, which is why I say "initial". Also requires estimating the stop placement, so if you plan to place the stop based on entry order fills, you need to estimate that if you want a stop in place on the bar you place the entry order. You also need to bear in mind this isn't your true risk, because of slippage and/or gaps - you could always have a loss that exceeds this value but it's an estimation.

Using volatility as a way to control the distance to the stop is a "reasonable" approach, and is separate from the position sizing. It's usually not really the case that you're doing volatility based sizing per se, but that you're doing risk based sizing as determined by your stop, and you happen to be setting your stop based on ATR or something similar. You can do risk based sizing whether or not you set your stop based on some volatility measure - it just requires that you know what your intended risk is (something that's just about always a good idea for technical trades.)

flipflopper
Posts: 261
Joined: 28 Feb 2008
Has thanked: 2 times
Been thanked: 1 time

Postby flipflopper » 30 Mar 2010

Interesting you say:

Using volatility as a way to control the distance to the stop is a "reasonable" approach

It seems to me that is the only way to come up with a good adaptable stop.

I also noticed I made a huge blunder in my equation:

Positionsize = dollarriskamount/(volatilityofindividualstock * stoplossmultplier)

Since I am optimizing for the stoplossmultiplier I cannot include it in the equation for position size. My goal in this thread is to make stocks equal by and compare apples to apples after optimizing.

The new way that I am thinking would be to compare dollar volatility of two different stocks.

Positionsize = equalizingdollaramount/onevolatilityunitofstock

onevolatilityunitofstock = ATR

The more I think about the problem the more I realize there is NO perfect solution. Since I am optimizing for stop and target inputs that will likely be different between stocks.

User avatar
Bruce DeVault
Posts: 438
Joined: 19 Jan 2010
Location: Washington DC
Been thanked: 2 times
Contact:

Postby Bruce DeVault » 30 Mar 2010

The reason I said measures of or proxies for volatility are reasonable ways to set a stop rather than saying that's the only way is that there are other common approaches. For instance, it's common to also set stops based on technical considerations... for instance, one might set a stop a tick behind a key support/resistance level etc.

This type of technical rather than statistical basis would indeed be adaptive (in that it's adaptive to the levels that are determined, which might themselves be further apart etc. due to volatility), just not in the same way. There's more than one solution to this problem, but indeed things like multiples of ATR are common.

flipflopper
Posts: 261
Joined: 28 Feb 2008
Has thanked: 2 times
Been thanked: 1 time

Postby flipflopper » 30 Mar 2010

My systems try to buy/sell support/resistance so placing a stop one tic beyond that wouldn't make sense. For me using some volatility multiple is the only way to go.

Care to comment on the realization I made that it is impossible to truly compare apples to apples when optimizing different strategies for stop and target multipliers.

Since different stocks would have different multipliers it would be impossible to compare exactly since the real risk would be different.

I guess you could optimize first on one share then after knowing the exact stop multiplier of both you can normalize them but this is a huge chore when doing walk forward testing!! Oh well. I guess one thing you learn in this game is that nothings perfect... and even if it were it probably wouldn't matter since the future is uncertain anyways!!

User avatar
Bruce DeVault
Posts: 438
Joined: 19 Jan 2010
Location: Washington DC
Been thanked: 2 times
Contact:

Postby Bruce DeVault » 31 Mar 2010

There's no reason that a strategy being breakout or mean reversion means you can't use technical levels - you might simply be on one side or on the other side of the level with your stop depending on which way you're anticipating a profitable move.

There is an entire approach to performance statistics that measures everything in terms of "R" multiples, or multiples of your ATR-based risk, popularized by Van Tharp. It's a way of looking at the world intended to equalize this, so that opportunities are evaluated in a consistent way, looking at the potential reward relative to the risk for each trade across various instruments, with the risk determined based on the volatility of that instrument at that time. It's certainly not a perfect solution, but it's an approach geared to attempting to answer exactly this question.


Return to “MultiCharts”