SQX Stockpicker, Deprecated tickers are using to S&P500 backtest

Hi,

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.



Attachments
TR DataSetting.png
(16.66 KiB)
Tickers with no suplement.png
(104.30 KiB)
MAYS Data settings.png
(9.77 KiB)
MAYS in backtest.png
(515.40 KiB)
Summary.xlsx
(90.60 KiB)
Mays Chart.png
(211.08 KiB)
TR in backtest.png
(828.23 KiB)
  • Votes 0
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

m
#1

Michal

26.09.2023 15:59

Task created

m
#2

Michal

26.09.2023 16:04
I'm using latest SQX 138Dev version
TT
#3

Tamas

27.09.2023 08:29

Attachment image-0.png added

image-0.png
(611.77 KiB)
Hello Michal, thanks for reporting the bug.


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

TT
#4

Tamas

27.09.2023 14:05

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

m
#5

Michal

27.09.2023 17:30
>Symbols with postfix-YYYY means that the symbol was delisted from the market in 1964

Thanks for the explanation!
m
#6

Michal

27.09.2023 19:16

Attachment TKR.png added

Attachment Tradelist.png added

Tradelist.png
(610.65 KiB)
TKR.png
(12.65 KiB)
Hi Tamas,


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).


Votes: 0

Drop files to upload

or

choose files

Max size: 5MB

Not allowed: exe, msi, application, reg, php, js, htaccess, htpasswd, gitignore

...
Wait please