I found a strange behavior of SQX (or two tickers setting) taken to the S&P500 backtest.
Two very old tickers, (not active in S&P500 - using your data setting) are actively trading in my S&P500 Stockpicker backtest in 2023.
Both TR.D and MAYS.D have data settings that they are not in the index since 1957/1960 but the backtest is using this tickers now.
Maybe the problem is a very old year in the setting? I didn't find more examples but some problems exist.
Please see the screens.
BTW. If the ticker is deprecated it needs to have "-YYYY" supplement? Eg. MAYS-1964?
If yes, there are 141 tickers without this supplement in S&P500 group.
The screen and my short are summary attached.
Attachment image-0.png added
Exactly, there was a problem with handling dates before 1970. I already fixed this yesterday.
The same bug was in your other task https://roadmap.strategyquant.com/tasks/qdm_000178/edit
EGLP-2012.D;04.03.1957;21.08.1957
It means that this symbol was in sp500 only in the period from 04.03.1957 to 21.08.1957.
After the fix it works correctly. See the screenshot.
There is a check for listed/delisted symbols (survivorship bias) - symbols that were delisted from sp500 group before the backtest period are skipped.
Sincerely,
Tamas
Status changed from New to Fixed
BTW. If the ticker is deprecated it needs to have "-YYYY" supplement? Eg. MAYS-1964?
I had to ask my colleague what does it mean exactly.
Symbols with postfix-YYYY means that the symbol was delisted from the market in 1964
Attachment TKR.png added
Attachment Tradelist.png added
I see one more problem about this topic.
If the ticker is delisted only from the S&P500 group, SQX is closing the trade (CloseType Delisted) day before delisting, without waiting for an Exit signal.
See examples in scr.
In reality, AC does not work this way. We discussed this topic with Tomas Brynda last week.
In my opinion, SQX should wait for the Exit signal ignoring Delisting from the Index event.
Another topic is delisting from the StockExchange - here it should be closed at the last known price (eg. TWTR in 2022).