Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
backtest problem with trailing stop on a daily chart
I have a strategy (as many of you) that uses daily bars for entries and trailing stops for exits. The problem with daily bars is that is you set stops too narrow then MC (I am using Multicharts and TS too) test trailing stops from four points on the bar OHLC during the backtest. So, if say the strategy is long, then MC checks L of the bar and from that defines whether my trailing stop worked or not. But of course it does not know how the bar was filled. The only solution to this problem I found was to create a chart with two data where data1 is 1 minute data for the instrument and data2 is daily data for the same instrument, thus i use data1 for execution and data2 for model calculations that defines entries and exists (another solution would be not to put stops too narrow but it does not look like appropriate solution to me). Also, it appears to me that if only stop loss is used (not trailing) then backtest would close the position at the appropriate price.
Question - what are other solutions to the trailing stop problem for backtest on the daily bars to make executions mirror live trading? Any suggestions/referrences are much appreciated.
Can you help answer these questions from other members on NexusFi?
Trading: Primarily Energy but also a little Equities, Fixed Income, Metals and Crypto.
Frequency: Many times daily
Duration: Never
Posts: 5,041 since Dec 2013
Thanks Given: 4,375
Thanks Received: 10,192
Apologies if you already know this but since you mention TS, I thought I would mention it just in case.
In Tradestation there is a special feature purely to do what you want.
No worries as any help is much appreciated.
Yes, i have seen it and used it. The problem here is that 1 minute data for TS is limited. I am not sure why but for some instruments data is more less ok in terms of look back period for 1 minute and in some cases it is very short. For instance, when backtesting continious non-adjusted ES futures, i got the following message from TS:
- You strartegy will begin calculating on 09/28/2000 but the data required for Look-Inside-Bar Back-testing is only available starting on 08/25/2016. Strartegy calculation prior to 08/25/2016 will not use Look-Inside-Bar testing.
That is way too short. May be i need to load up the quotes first somehow, not sure about that. ?
It probably tried to run strategy before all data was loaded. I would trun off the strategy and turn it back on and see if the message returns - it should not.
Yes, you are absolutely right. I did not allow the data (minute data) to upload to a daily chart and set the model on. For some reason, it stops loading up data while model status is on.