"How should I handle symbol changes?"
By Dave Mabe
Here's a question from Nathan A. (name used with permission):
Nathan A:
I've been building a 10-year U.S. equities database (daily + intraday data, listed, delisted, and OTC) for intraday and swing trading, and I’ve run into challenges around how best to handle symbol changes.
Currently, I maintain a master ticker file and assign a persistent "instrument_id" to symbols that represent the same underlying stock. I use share-class FIGI and delisting dates to link symbols, and all of my backtesting references the "instrument_id" rather than the raw ticker symbol. While this works in theory, I’ve found it becomes much more complex in practice.
How do you think about this problem, and how did you and the team approach it at Trade-Ideas?
Dave:
This is a great question because it's something traders with a technical background have a difficult time wrapping their heads around.
It seems like there should be a perfect solution that handles all the edge cases - if you just spent more time tracking down the logic for them - THEN you'll have your backtesting setup just right.
But then another bizarre edge case comes along that breaks it.
It's messy, and there are weird judgment calls you end up having to make.
When you go down this rabbit hole, you'll learn some mildly interesting things about corporate actions, but I've found it's largely a waste of time for traders.
Rather than trying to over-engineer the perfect solution, a better approach is to design your trading strategies so that the effect of corporate actions and symbol changes is minimized.
Any guesses about what this might involve?
More tomorrow on this.
Thanks for the question, Nathan!
-Dave
P.S. Wish you could backtest your ideas - without spending months learning to code? Run your first backtest in an afternoon using my Amibroker AFL Course.