Mike,
I've used your ps formula & switched to "Detailed Log" in the BT settings.
I've chosen a trade somewhere in the middle of the backtest, so that current
equity is not identical to the initial equity.
I'm getting the following info:
Trade Date: 2004-07-27
Enter Long, T, Price: 25.34, Shares: 3448, Commission: 0, Rank: 1, Equity
170338, Margin Loan: 0, Fx rate: 1
VZ not entered because of insufficient funds
2 Open Positions: , RX (+2709), , T (+3448), Equity: 170717, Cash: 16378.3
Additional info: ATR(20) of ticker symbol "T" on this date is 0.49.
1.) Why are there two different equity numbers (170338 and 170717)? It's the
same date and I am using EOD data, so there should be no change. And which one
is used for position sizing during the backtest?
2.) Manually calculating position size for both equity numbers leads to a)
170338 * 0.01 [pctVolaRisk = 1%] / (0.49 * 1) = 3476 units, and b) 170717 *
0.01 / (0.49 * 1) = 3484 units.
But the log states a position size of 3448 units (so using both equity numbers
results in a different position size than the one stated in the log).
How can this be explained?