Cannot Synchronize, no overlapping Dates error
Author: trader rog
Creation Date: 10/27/2010 11:07 PM
profile picture

trader rog

#1
I am testing using 1 minute bars and get the following error when I type in a Data Range: Runtime error: Cannot Synchronize, no overlapping Dates. I have searched here and WL Wiki but have not found any info that was helpful. How can I fix this error?
profile picture

Eugene

#2
Not enough information, please be specific. Here's the checklist with the items we need first:

How to report a Problem?
profile picture

trader rog

#3
I am using the 64-bit edition of WL. The scale is set to 1 minute and Data Range is set to 4/1/2010 to 9/10/2010. The script only works if I put a number of days in Data Range. Still, it only goes back to 9/20/2010 regardless of how many days I put in Data Range. So there are two problems: the overlapping Dates error and the backtest going back to no earler than 9/20/2010. I included the script if that helps.

CODE:
Please log in to see this code.
profile picture

Cone

#4
Change "ko" and "pep" to "KO" and "PEP"
profile picture

Eugene

#5
While I'm at it... Like mentioned many months ago (and commented in your code), there's no need to slow the exits down with unneccessary processing of SetContext/RestoreContext. Check this out:
CODE:
Please log in to see this code.
profile picture

Eugene

#6
QUOTE:
Change "ko" and "pep" to "KO" and "PEP"

I couldn't check on WLP6 but on WLD6, it doesn't seem to be context-sensitive - at least with the providers I tried (like IQFeed and Random provider). Is this a Fidelity static provider issue?
profile picture

trader rog

#7
Thanks for your help. Using upper case letters for the symbols made all the difference. It runs light years quicker now. I still get the overlapping Dates error on a few pairs though (CSX-NSC, AAP-ORLY, AGCO-DE, to name a few). Could it just be bad data from Fidelity that is causing the issue?
profile picture

Cone

#8
Definitely could be. Run a bad data check on your DataSet (in the Utility folder) and make sure that there are not large gaps. Unfortunately the current script produces lots of false Alarms, but generally if you see gaps of more than 6 days, then it's a real problem.

Early next month we'll have a much improved script that all but eliminates false Alarms and gives you the ability to delete all the symbols with detected errors so that you can easily refresh many with a data update.
profile picture

Nadja

#9
Hello all,

I receive the runtime error mentioned in this thread when backtesting strategies like the "Fidelity Select Sector Fund Rotation System" or other rotation strategies on individual stocks with daily data from yahoo, like the S&P 100 Set for example. If the end of the backtesting period is a recent day, all works fine. But if the end of the backtesting period is some months ago, there is this error.

Does anybody know how to eliminate this error in synchronizing?

Thank you in advance!

Kind regards

Andreas
profile picture

Eugene

#10
To quote Cone's reply right before your question:
QUOTE:
Run a bad data check on your DataSet (in the Utility folder) and make sure that there are not large gaps. Unfortunately the current script produces lots of false Alarms, but generally if you see gaps of more than 6 days, then it's a real problem.
profile picture

Nadja

#11
Hello Eugene

Thank you for the quick answer, I try to explain the problem in a more precise manner, with an example:

Strategy: Fidelity Select Sector Fund Rotation System or any other Strategy which uses the Set Context method

First backtest:
Nasdaq 100 Data Set from Yahoo free static provider, backtest settings 1.1.1998 - 12.31.2012: Works fine

Second backtest:
Same Data Set, backtest settings 1.1.1998 - 11.17.2006: Works fine

Third backtest:
Same Data Set, backtest settings 1.1.1998 - 11.16.2006: Produces the runtime error mentioned above.

Problem:
The symbol FSLR (First Solar) is the symbol with the least bars in the Nasdaq 100 Data Set. The series begins on 11.17.2006. In fact, this should not be a problem, because the backtest ends one day earlier and it would therefore not be necessary to synchronize this symbol. But the system tries to synchronize and produces the runtime error, because there are no overlapping dates.

Question:
Do you see any possibility to solve this problem? (Instead of removing all symbols from the Data Set which start later than the end of the backtest period)

Thank you in advance for your help!

Kind regards

Andreas






profile picture

Eugene

#12
Andreas,

As you already understand, there symbol's data doesn't contain any dates that can be synchronized with the current (clicked) symbol's chart i.e. there's no overlap for synchronization. Wealth-Lab processes all symbols from the DataSet, so you need to exclude those symbols somehow.

What I'd suggest against is wrapping the SetContext/RestoreContext in a try/catch block; that would eliminate the error at the price of considerably reduced execution speed.
profile picture

Nadja

#13
Hello Eugene

Works fine now, good solution!

Thanks a lot

Andreas
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).