Login Page - Create Account

Support Board


Date/Time: Wed, 24 Apr 2024 10:12:51 +0000



incorrect P/L in backtesting

View Count: 1637

[2013-07-31 16:59:01]
User76625 - Posts: 49
I've noticed that during backtesting, when a stop is hit, the exit price is always the stop level (+/- $0.01), whether or not the actual price at that time was anywhere close. This creates big errors in backtesting data when, for example, your stop would have been hit after a gap at opening the next day. What is the logic behind this? Why not have it show the exit price as a price you actually could have gotten at the time it would have been triggered? i.e., the opening price of the bar that would have caused the stop to be triggered.

For example, I have a record that shows Profit/Loss at -$1,009 (which is based on where the stop was placed) when it actually should have been -$22,063 (which is where it actually gapped to and the stop would have been filled at market open the next morning). By showing me the stop level and not the actual amount that I would have incurred, the backtesting results are unusable.

Can this issue to be remedied?
[2013-07-31 17:04:30]
User76625 - Posts: 49
In case it helps, below is a screenshot showing the purple "fill" triangle that is nowhere where it could have actually been filled (at the gap between 1/24 and 1/25).

http://www.sierrachart.com/image.php?l=1375290103600.png

[2013-07-31 18:27:53]
Sierra Chart Engineering - Posts: 104368
This is documented here:
http://www.sierrachart.com/index.php?l=doc/doc_TradeSimulation.php#HowOrdersAreFilled

See where it describes a resting stop order.

Were you performing a bar based back test or a replay back test?

We will see how to resolve this.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2013-07-31 18:36:30]
User76625 - Posts: 49
That's right, I remember reading that section in the past but I couldn't find it this morning.

I use replay backtests as I'm using 10-min bars made up of 1-minute data, so bar based BT doesn't give accurate enough results.

I was substituting the "Drawdown" column for profit and loss where the stop was hit at open the next morning, and it's probably more accurate than the P/L column, but I don't think that's accurate enough to rely on it.
[2013-08-01 07:47:38]
Sierra Chart Engineering - Posts: 104368
This will be resolved in the next release.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account