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!