Philadelphia, PA
Experience: Advanced
Platform: Matlab, TradeStation
Trading: Stocks
Posts: 211 since Aug 2012
Thanks Given: 5,190
Thanks Received: 296
|
I am conducting a breakout backtest and have a question on determining a proper action price. The split adjusted data I am using has precision to 5 decimal places. So, theoretically the buy price has precision of 5 decimal places.
Now my question is regarding the calculation of profit or loss %'s. For example, if the buy price is 0.46429 and the sell price is 5% below the buy price, then the sell price is 0.46429 * 0.95 = 0.4410755.
My question is, do I round the stop loss price to the precision of the input data or keep full precision throughout the calculation? ***Yes, I recognize we cannot buy at this precision and hence why I have this question.***
Performing the the loss % calculation with full precision is: (0.4410755/.46429) - 1 = 0.05.
Performing the the loss % calculation by truncating the sell price to match the input data precision is: (0.44108-.46429)/.46429 = -0.049990307781774.
So, should the loss be calculated as 0.05 or -0.04999? I want to ensure I am applying the proper method (close enough is not good enough for me, I want to do this right.)
Thank you in advance!
|