Issue with some dividend-adjusted prices

I've noticed a weird issue when I was trying to calculate total returns and noticed discrepancies relative to other data sources. Upon further investigation, the problem is some tickers have prices that are properly adjusted for dividends and some tickers are not. When I compare to the information on Tiingo's website, it appears that for some tickers only the day before the ex-dividend date is price-adjusted, but days prior to that are not adjusted - it's using the raw price.

In amiquote, I've selected Tiingo Historical, entered my Tiingo API token and selected the csv format option.

Is there another setting somewhere I need to adjust? Is this a vendor issue? Has anyone come across this or know of a solution? @Tomasz

I've also contact Tiingo and will post their reply.

Thank you in advance for your help.
Gavin

Here are some examples:
AAPL - adjusted prices are ok
image

CMCSA - adjusted and raw prices seem to be getting mixed
image

T - adjusted prices ok
image

SPY - adjusted and raw prices seem to be getting mixed up
image

Thanks to @Rishi_at_tiingo for his help.

The fix was to manually delete my Tiingo database and to re-download everything from scratch. I guess I'm still not sure what the issue was and I will probably need to spot check from time to time going forward.

Nice catch.

Typically this is due to appending data. However, when there is a corporate action adjustment, like a split or dividend, all prices need to be historically adjusted. Therefore if the source adjusts its data set, you only get those if you then refresh and download all the history from the beginning etc.

This is a major issue if for example you are only able to download the last 15 days of intra-day data. To make it usable you need to know the corporate actions, find any "Partial adjustment you may have inadvertently downloaded a piece of; to then undo it to make a complete, clean and raw series and then manually make the corporate adjustments yourself.

-S

2 Likes

Thanks @Sean - that makes perfect sense. Hard to track all individual adjustments that need to be made. I guess the best thing to do then is to re-download your entire database periodically to make sure you capture all the historical adjustments.

Am I correct that if Amiquote is set on "overwrite existing files" and I set the download start date back to the beginning of the data history (say 1/1/2000), it will then overwrite all data back to that point?

Yes that should work, but remember you can also create your own sources as well, some of which take start date-end date.

I would say there is a bit of a trick involved I was trying to have Tomasz include into the download import process. It goes something like this. When you download data that has an overlap of what you already have, so for example you download the last 2 trading days every day or download 15 days of intra-day data every 5 or 10 days, then you can have code that first compares the overwrite part of the series and if they differ that would indicate an adjustment and flag an auto download of all history or if only limited history is available or for speed you could simply measure the difference on the overlap and adjust all data for it etc. Something to that effect. This would work for continuous futures as well when there is a roll.
-S

I wonder if there is a way for us (Tiingo) to tell AmiBroker there is an adjustment and to redownload the entire timeseries.

If there was a setting in AB on import, that sampled a few different prices of overlapped data, then it would be source independent.

I think AQ is in it's own universe and looking for some type of a price flag might be possible with a user defined source, but then Tomasz would have to throw in logic to stop the download, change the to/from dates and re-instantiate the same download. Additionally, AQ would have no idea what the start date of the beginning of the history would be anyway IMHO.

@Tomasz is there a way for Tiingo)to tell AmiBroker there is an adjustment and only to redownload the symbols that have been adjusted?

Prepare ticker lists with symbols that need redownload. Ticker list is plain text file with .TLS extension holding symbols (one symbol per line)

@Rishi_at_tiingo

Prepare ticker lists with symbols that need redownload. Ticker list is plain text file with .TLS extension holding symbols (one symbol per line)

is the problem fixed?.......because I am currently using tiingo