Scaling / 'Pyramiding'

Discussions about Money Management and Risk Control.
verec
Roundtable Knight
Roundtable Knight
Posts: 162
Joined: Mon Jun 09, 2003 7:04 pm
Location: London, UK
Contact:

Re: Scaling/Pyramiding

Post by verec »

Corn Elius wrote:I can't realistically see me doing that.
and
There just isn't enough time to try every thing yourself
Well... how do you trust other's results? What do you know that can allow you to bypass the necessary filtering between good ideas, methods, results and crackpots/jokes/I-dare-you-to/traps?

Trading is probably like living: you can't do it by procuration 8)

This forum is excellent as a source of ideas, of enlightenment (little light bulbs suddenly popping out inside your head), as a repository of other's failures and how they got there, but I wouldn't trust a single recipe for success whether from this forum, or any other ...
richard
Roundtable Fellow
Roundtable Fellow
Posts: 94
Joined: Tue May 18, 2004 10:17 pm

Re: Scaling/Pyramiding

Post by richard »

verec wrote:
Corn Elius wrote:
Trading is probably like living: you can't do it by procuration 8)

This forum is excellent as a source of ideas, of enlightenment (little light bulbs suddenly popping out inside your head), as a repository of other's failures and how they got there, but I wouldn't trust a single recipe for success whether from this forum, or any other ...
Well said. In Koppel's book on Intuitive Trading, he has a floor trader (I forget her name) who didn't know a thing about trading and bought a seat on MidAm. She said she finally stopped listening to people and made money.

I think it's interesting to listen and hear what people have to say but in trading we make our own way.

I think pyramiding is very sound, at least in. I have learned from this forum and from Van Tharp that making partial exits is a poor strategy though. I like futures because of the mark-to-market approach...it lends itself to pyramiding more than stocks do.
Bondtrader
Roundtable Knight
Roundtable Knight
Posts: 101
Joined: Mon Apr 28, 2003 11:07 am
Location: Zimbabwe

Post by Bondtrader »

I have learned from this forum and from Van Tharp that making partial exits is a poor strategy though.
Whereas I've learned that my own test results frequently contradict what I read on forums including this one. Occasionally there's a good idea and often there are thought-provoking concepts, theories, and algorithms to test. But the posts are crummy predictors of my own test outcomes.

I find that scaling out and its degenerate special case, profit targets, very often improves the performance of mechanical futures trading systems. You may want to read about it. Here's an excerpt from one of the reading lists mentioned on the Turtle forum ( http://www.mjohnson.com/books/index.htm )
Attachments
booky.png
booky.png (5.49 KiB) Viewed 13257 times
richard
Roundtable Fellow
Roundtable Fellow
Posts: 94
Joined: Tue May 18, 2004 10:17 pm

Post by richard »

this is an area where I could really use some help -- exits.

I am doing shorter term trading -- days to weeks. My style is buying from solid support to resistance, or selling from solid resistance to support.

I am pyramidinig in, and I don't mind turning a trade that is trending with me into a longer term trend following play. I am doing that right now with one position in particular, increasing my exposure as it goes more my way.

My question is, given my style, how can I not close out positions based upon price targets? That makes the most sense. If I am buying into resistance, when that resistance is hit, shouldn't I sell? If I don't, often the trade unwinds with a retracement and I am back to where I started.

I am still trying to puzzle this out.
verec
Roundtable Knight
Roundtable Knight
Posts: 162
Joined: Mon Jun 09, 2003 7:04 pm
Location: London, UK
Contact:

Post by verec »

richard wrote:My question is, given my style, how can I not close out positions based upon price targets?
What are the ideas that you could try, but reject at first because you consider them stupid?
What about timed exit? Why? Why not?
What about volume based exit? Why? Why not?
What about SMA based exits? Why? Why not?
If I am buying into resistance, when that resistance is hit, shouldn't I sell? If I don't, often the trade unwinds with a retracement and I am back to where I started.
How often is "often" ?
Do you have some metrics that you have used to measure your strategy?
Because "often" might only be a pshychological "often"... What about hard numbers?
You see, the Turtle rules, in my testing, lose 3 times out of 4, yet, even in todays market, they are (not hugely) profitable ...
So, what's wrong with their "break-out" style exit? What's right?

My only answer to your question would be: pick an idea, any idea, and test, test and re-test... 8)
Repeat.
richard
Roundtable Fellow
Roundtable Fellow
Posts: 94
Joined: Tue May 18, 2004 10:17 pm

Post by richard »

good points you raise, verec on exits.

One thing I've tried in the last few days is exiting upon an exceptional change in volatility (usually a spike, or a "long bar") or volume, a range expansion bar really.

The neat thing about exiting upon such a spike is positive slippage. In the pit markets this is a Good Thing. And I realize that I am not doing much worse, and probably better, than when I close a position after giving back profits on a retracement.

Volume is interesting in its signals. The old time tape readers knew how important volume is.

Lots of times volume dries up for awhile but it is the calm before a storm with a breakout impending. This happens when the chart indicates a rectangle or trading range.

Once the breakout (or break) happens, at the tail end of that break volume dries up again, a good signal to exit, at least for my style of trading at the moment.

So the rate of price changes and the rate of volume changes is a powerful exit signal, potentially, a range expansion bar...I believe Lebeau and Crabel have writtten about this.
choppystride
Full Member
Full Member
Posts: 22
Joined: Thu Jul 17, 2003 4:54 am

Post by choppystride »

I'm in the process of coding my systems and I want to able to test various pyraminding/scaling rules. I'm a bit stumped when it comes to the idea of using asymmetric entry/exit sizing.

For example, let's say I want to go long a stock. I allocate $10000 for my full position. I want to scale in at chunks of $5000, then $3000, then the remaing $2000.

Here are my sequence of purchases:

1) long 500 shares at $10/share ($5000/$10 = 500)
2) long 250 shares at $12/share ($3000/$12 = 250)
3) long 160 shares at $12.5/share ($2000/$12.5 = 160)

Therefore, for my full position, I have a total of 910 shares.

To exit my position, I want to scale out approximately one-third of my full position at a time. For instance, my sequence of exits are:

1) sell 303 shares at $13/share (910 shares * 0.333 = 303 shares approx)
2) sell 303 shares at $14/share (910 shares * 0.333 = 303 shares approx)
3) sell 304 shares at $15/share (the remaining position)

The coding will be a bit complex but should be doable. What really confuses me is: when I compute my system statistics such as # of winning trades & # of losing trade, what is my definition of a trade? Should trades be defined by the entry trades or by the exit trades?

For instance, let's say that a trade is defined by the entries, and that their associated exits are ordered in a FIFO manner, then my first trade would have the following characteristic:

entry quantity = +500 shares
entry basis price = $10

exit quantity = -500 shares
exit basis price = given by exit #1 and partially by exit#2
= ((303 shares * $13/share) + (197 shares * $14/share)) / 500 shares
= $13.394

Therefore, this is a winning trade with a 33.94% gain

Would this be a correct definition? Or perhaps there's a better way to define a winning trade vs a losing trade?

Has anyone traded or tested this kind of scheme and find it beneficial? Even though I think it's codeable, I don't really want to code up a mess only to find that it gives no discernible benefit compared to symmetric in/out scaling.

Thanks!
choppystride
Full Member
Full Member
Posts: 22
Joined: Thu Jul 17, 2003 4:54 am

Post by choppystride »

...One more thing...can Veritrader handle this kind of scaling (described in the previous message)?

If it can, perhaps I should just buy it and save my efforts...
Forum Mgmnt
Roundtable Knight
Roundtable Knight
Posts: 1842
Joined: Tue Apr 15, 2003 11:02 am
Contact:

Post by Forum Mgmnt »

...One more thing...can Veritrader handle this kind of scaling (described in the previous message)?
VeriTrader has an internal concept called a unit, that is intended for this sort of thing. A unit is a portion of a larger position.

In your case, you would have three units for your position.

In addition, you can partially exit a unit.

VeriTrader works on the basis of orders, entry orders that are filled add units to a position in a market. Each exit order is targetted against a particular unit, and reduces it by the amount specified. You can exit the entire unit or some lesser number of contracts. The way you work with orders is very much the same way it works in real life with real brokers.

The scenario you outline above would be easily handled with VeriTrader. It could even handle an exit of one share a day for the next 3 1/2 years if that's what you wanted.

For statistical purposes, VeriTrader considers each separate unit as a trade upon its exit, or multiple trades for each partial exit. For example if you had three units put on at different prices and then exited them all on the same day, this would be three trades. If you exited two full units but only 1/2 of the third unit on one day with the remaining 1/2 of the third unit a week later, VeriTrader would count that as four trades; one each for the two full unit exits, and one trade for each of the 1/2 unit exits.

While all this is operational internally in VeriTrader 1.6 and has been there from the days before VeriTrader even existed as a product, you won't be able to access this until 2.0 comes out. While we have a pretty full complement of testers, since you are a programmer and would likely use our language pretty vigorously, we could put you into the Beta program if you wished.

This way you could really help us make sure VeriTrader does what you need.

- Forum Mgmnt
choppystride
Full Member
Full Member
Posts: 22
Joined: Thu Jul 17, 2003 4:54 am

Post by choppystride »

VeriTrader has an internal concept called a unit, that is intended for this sort of thing. A unit is a portion of a larger position.

In your case, you would have three units for your position.

In addition, you can partially exit a unit.
Thanks for the explanation. That does seem a sensible way to partition positions and trades.

VeriTrader works on the basis of orders, entry orders that are filled add units to a position in a market. Each exit order is targetted against a particular unit, and reduces it by the amount specified. You can exit the entire unit or some lesser number of contracts. The way you work with orders is very much the same way it works in real life with real brokers

The scenario you outline above would be easily handled with VeriTrader. It could even handle an exit of one share a day for the next 3 1/2 years if that's what you wanted.

For statistical purposes, VeriTrader considers each separate unit as a trade upon its exit, or multiple trades for each partial exit. For example if you had three units put on at different prices and then exited them all on the same day, this would be three trades. If you exited two full units but only 1/2 of the third unit on one day with the remaining 1/2 of the third unit a week later, VeriTrader would count that as four trades; one each for the two full unit exits, and one trade for each of the 1/2 unit exits.
.

I have more questions if you don't mind:

1) When you say "...Each exit order is targetted against a particular unit...", do you mean that I have to specify my targetted unit when I issue my orders? Or can I simply issue my orders without worrying about the individual units and that Veritrader would automatically determine which chunks are spliced off which unit(s)? The second method is closer to how I would conceptualize trading in real life. However, it also means that Veritrader needs to implement some sort of logic to handle the sequencing of entries and exits - say, FIFO or LIFO. I'm concerned about this point b/c it's likely that this sequencing could impact some of the final system statistics.

2) Another concern I have (which may not be actually related to pyramiding/scaling) is how variation in trade sizes could potentially give misleading trade statistics. For example, consider the following 2 scenarios that occur in the same test:

a) you put on a big position and exit a little chunks at a time
b) you put on a big position and exit it all at once

These two occurences could represent many trades but the big one would be weighted equally as the smaller ones. This could give extra (perhaps unfair) weighting for small trades when we compute certain stats such as % of winning trades. Do you think it is necessary to implement some sort of normalization scheme for partitioning trades?

For instance, a simple but perhaps naive method would be to normalize it by 1% of your starting capital against the entry costs of your trades:

e.g.

Starting captial: $100,000

entry: buy 105 shares @ $28.58; cost = $3000 approx
exit: sell 95 shares @ $35; proceed = $3325 (22% win...nice!)
exit: sell 5 shares @ $25; proceed = $125 (13% loss..bummer..)
exit: sell 5 shares @ $20; proceed = $100 (30% loss..ouch..)

When we apply the normalization scheme, since the initial cost of $3000 represent 3% of the starting capital, we therefore have 3 trades of 35 shares each (105 shares / 3).

The trade details are:

TRADE #1:
size = 35 shares,
entry price = $28.58,
exit price = $35

TRADE #2:
size = 35 shares,
entry price = $28.58,
exit price = $35

TRADE #3:
size = 35 shares,
entry price = $28.58,
exit price = $31.43 = ((25 shares * $35) + (5 shares * $25) + (5 shares * $20)) / 35 shares

Would implementing such a scheme be advisable? Or perhaps we should forego this complexity and just keep in mind that certain trade statistics may be misleading if the trade sizes vary greatly?
While all this is operational internally in VeriTrader 1.6 and has been there from the days before VeriTrader even existed as a product, you won't be able to access this until 2.0 comes out. While we have a pretty full complement of testers, since you are a programmer and would likely use our language pretty vigorously, we could put you into the Beta program if you wished.

This way you could really help us make sure VeriTrader does what you need.
Thanks for your offer. I've checked out the docs for v1.6 yesterday and it's certainly a very impressive product. The addition of intraday capabilities and programmability will undoubtedly make it great. I've given it some serious thoughts but have come to the conclusion that, at my current newbie stage, its price tag is too much for me. Right now, I'm trying to develop some systems on stocks which should be less complex than ones on futures. In the future, when I decide to move up to the futures markets, I would definitely reconsider Veritrader again.

Again, thanks!
Forum Mgmnt
Roundtable Knight
Roundtable Knight
Posts: 1842
Joined: Tue Apr 15, 2003 11:02 am
Contact:

Post by Forum Mgmnt »

choppystride wrote:1) When you say "...Each exit order is targetted against a particular unit...", do you mean that I have to specify my targetted unit when I issue my orders? Or can I simply issue my orders without worrying about the individual units and that Veritrader would automatically determine which chunks are spliced off which unit(s)? The second method is closer to how I would conceptualize trading in real life. However, it also means that Veritrader needs to implement some sort of logic to handle the sequencing of entries and exits - say, FIFO or LIFO. I'm concerned about this point b/c it's likely that this sequencing could impact some of the final system statistics.
Yes, the sequencing will affect the statistics. That's why we let you choose the units to target for exits, so you can choose LIFO or FIFO depending how you want to handle it. If you know you have three units and you want to exit one unit, it's not that hard to specify unit one or three for the exit. You can also specify an exit of all units which will exit everything irrespective of how many you have.
These two occurences could represent many trades but the big one would be weighted equally as the smaller ones. This could give extra (perhaps unfair) weighting for small trades when we compute certain stats such as % of winning trades. Do you think it is necessary to implement some sort of normalization scheme for partitioning trades?
I don't really look at trades from a proft perspetive but rather from a percentage gain perspective and from an R-Multiple perspective which are both ways of normalizing trades. VeriTrader supports many statistics that are normalized such as the Percent Profit Factor which is a normalized proift factor where you don't look at the dollars won and lost but rather the total percentage won divided by the total percentage lost, which removes the skew of recent history dominating the test that is the weakness of a measure like the normal "Profit Factor".
Right now, I'm trying to develop some systems on stocks which should be less complex than ones on futures. In the future, when I decide to move up to the futures markets, I would definitely reconsider Veritrader again.

Again, thanks!
You are welcome. We're in no hurry. The way I figure it, it's our job to make the decision to buy our product an easy one. The better we do our job, the easier it will be for people to justify the purchase of an expensive tool like VeriTrader. Over time, I expect this will become an easier decision for anyone who is serious about trading, but we realize that the benefits just aren't obvious or compelling for everyone, or even most people yet.

That's what keeps us busy at nights :)

- Forum Mgmnt
bfg2001
Contributor
Contributor
Posts: 2
Joined: Wed Jun 15, 2005 4:53 am
Location: Germany

Pyramiding

Post by bfg2001 »

Well my own view of pyramiding is a rather simplistic one. To me pyramiding is just compounding on the same position as it moves in your favor, as opposed to compounding your gains across your entire portfolio.

This has the effect (assuming the position continues to move in your favor)
of changing your equity profile (on that trade only) from linear to exponential.

So taking a very simple case of buying 500 shares of A at a certain price. Then as the price moves up you gain 500 dollars for every dollar the price moves up. Its linear.

But if you pyramid(compound) onto that at successive steps up then the overall profile changes to an upward exponential curve. Personally I just wait until the price has moved up to the point where the risk on my initial position is negated and then I add another position, the size of which depends on my risk level and stop placement.

I don't really bother experimenting with different pyramiding strategies. If you plot the lines on a graph for this simple experiment then you will have your straight line(no pyramiding), and then a succession of upward curving lines, each corresponding to a higher position size on each position.

I can't see the value of adding successively smaller bet-sizes as your original position moves up. The line is still an upward curve but is very shallow and is not much better than your original linear gain. I'd rather just add the maximum I can within my risk parameter, but only after the risk on my original position is gone. So Its an entirely new trade.

One interesting thing about the plotted lines is that although pyramiding leads to exponential gains the longer a trend runs, in the early stages it underperforms the linear(no pyramiding) strategy because your 2nd or third bet will tend to cancel out any gains on your first bet if the position moves against you.

I used to place as many trades as I could but now I tend to only have 2 or 3 trades on the go at any one time and instead of saving my remaining capital for new opportunites I just pyramid as hard as I can (within risk tolerance) onto my existing positions.
Post Reply