polygon-io / issues

Quickly track and report problems with polygon.io
29 stars 0 forks source link

Are dividends split adjusted? #230

Open fplein opened 1 year ago

fplein commented 1 year ago

URL https://api.polygon.io/v3/reference/dividends?ticker=AAPL&ex_dividend_date.gte=2020-01-01&ex_dividend_date.lte=2021-01-01&sort=ex_dividend_date&order=desc

Result Returns 4 dividend entries: {"cash_amount":0.205,"currency":"USD","declaration_date":"2020-10-29","dividend_type":"CD","ex_dividend_date":"2020-11-06","frequency":4,"pay_date":"2020-11-12","record_date":"2020-11-09","ticker":"AAPL"}, {"cash_amount":0.205,"currency":"USD","declaration_date":"2020-07-30","dividend_type":"CD","ex_dividend_date":"2020-08-07","frequency":1,"pay_date":"2020-09-20","record_date":"2020-08-10","ticker":"AAPL"}, {"cash_amount":0.205,"currency":"USD","declaration_date":"2020-04-30","dividend_type":"CD","ex_dividend_date":"2020-05-08","frequency":4,"pay_date":"2020-05-14","record_date":"2020-05-11","ticker":"AAPL"}, {"cash_amount":0.1925,"currency":"USD","declaration_date":"2020-01-28","dividend_type":"CD","ex_dividend_date":"2020-02-07","frequency":4,"pay_date":"2020-02-13","record_date":"2020-02-10","ticker":"AAPL"}

Expected Result In your knowledge base (https://polygon.io/knowledge-base/article/does-polygon-adjust-historic-dividends-for-splits), you claim that dividends are NOT split adjusted. According to Apple's investor website "The stock split on a 4-for-1 basis on August 28, 2020". Consequently, the dividends should look as follows: {"cash_amount":0.205,"currency":"USD","declaration_date":"2020-10-29","dividend_type":"CD","ex_dividend_date":"2020-11-06","frequency":4,"pay_date":"2020-11-12","record_date":"2020-11-09","ticker":"AAPL"}, {"cash_amount":0.82,"currency":"USD","declaration_date":"2020-07-30","dividend_type":"CD","ex_dividend_date":"2020-08-07","frequency":1,"pay_date":"2020-09-20","record_date":"2020-08-10","ticker":"AAPL"}, {"cash_amount":0.82,"currency":"USD","declaration_date":"2020-04-30","dividend_type":"CD","ex_dividend_date":"2020-05-08","frequency":4,"pay_date":"2020-05-14","record_date":"2020-05-11","ticker":"AAPL"}, {"cash_amount":0.77,"currency":"USD","declaration_date":"2020-01-28","dividend_type":"CD","ex_dividend_date":"2020-02-07","frequency":4,"pay_date":"2020-02-13","record_date":"2020-02-10","ticker":"AAPL"}

Note that the dividends before 2020-08-28, should be multiplied by 4 for them to be NOT split adjusted.

Additional context I need to understand whether all dividends are split adjusted, in order to make the right corrections to obtain the point-in-time dividends without adjustments. Is this a bug in the API or is the statement in your knowledge base false?

fplein commented 1 year ago

@jrbell19 any clarifications for this discrepancy? What can we assume for the data?

wangtieqiao commented 1 year ago

I raised the same question on slack, when I query use old (v2) api via Kotlin, it return expected result. Could some one investigate and fix it? It should be un_adjusted cash dividend amount. Thx!

jrbell19 commented 1 year ago

@wangtieqiao Yep, apologies for the delay here.

We are looking into this now.

bluelu commented 1 year ago

@jrbell19 any update?

fplein commented 1 year ago

@jrbell19 It seems that you have corrected the example of AAPL I gave in the OP. So I assume that now for some stocks it may now be correct. However, there are still other stocks where this split-adjusted dividend phenomenon is a problem (e.g. SQQQ or UBOT, to name only two). Overall, this could be an issue for any stock that has paid out dividends prior to some future stock split.

Do you plan to fix this throughout your dividend data in a coherent way? We need to know if we need to run checks ourselves to determine if dividends are split-adjusted or not. Currently, it is quite the guess work and the API behaviour seems different from one stock to another.

fplein commented 1 year ago

To complement on my previous comment: the knowledge base (https://polygon.io/knowledge-base/article/does-polygon-adjust-historic-dividends-for-splits) has been updated in februrary and now claims that dividends ARE adjusted. However, this is now not true for the AAPL stock, is it?

Would it not be possible to add a flag to the API to turn on or off split adjustments for dividends? Or to return both the split and not split-adjusted value in the same entry?

Imagine the following scenario, suppose stock X pays a dividend of 0.10$ today. As long as no future splits are known, the API would return an (adjusted) dividend of 0.10$. Now some time in the future a new 2-for-1 split appears for stock X. With that knowledge the previous dividend should now become 0.05$. At what point in time will this update in the API happen? If for a given stock the split is present/added in the API, will then the dividend also be adjusted at that same moment?

Do you not agree that it is confusing if the API returns different data at different points in time?

jrbell19 commented 1 year ago

@fplein I completely agree that it is confusing. The solution for this is not trivial, as it stems upstream from our provider. I assure you we are working on ways to handle this.

fplein commented 11 months ago

@jrbell19 any ETA or update on this matter?

bluelu commented 4 months ago

@jrbell19 any update?

AHangstefer commented 3 months ago

Hello again! We are working with an additional data source for out split and dividend data which should help with the issue.