Nasdaq / data-link-python

A Python library for Nasdaq Data Link's RESTful API
MIT License
428 stars 70 forks source link

adj_* data information required #33

Open morfeo630 opened 1 year ago

morfeo630 commented 1 year ago

Hello to all, I have some questions regarding the adjusted data.

  1. I understand that the data can vary from broker to broker for a little bit but why nasdaq have in the same row the "regular" data (open, high, low, close) and the adjusted data (adj_open, adj_high, adj_low, adj_close)?
  2. Why the adj_* data exists in first place and how is calculated?
  3. Why for the date before and included 2022-11-08 the adj_* data is so different from the "regular" data?
  4. What data is best to use for further calculation and data manipulation?

Folowing is the data:

     ticker       date    open    high     low   close     volume  dividend  split    adj_open    adj_high     adj_low   adj_close  adj_volume
0       IBM 2022-11-14  142.63  146.08  142.18  144.20  5293453.0      0.00    1.0  142.630000  146.080000  142.180000  144.200000   5293453.0
1       IBM 2022-11-11  141.50  144.13  140.96  143.17  5869298.0      0.00    1.0  141.500000  144.130000  140.960000  143.170000   5869298.0
2       IBM 2022-11-10  140.26  141.37  138.29  141.23  5386540.0      0.00    1.0  140.260000  141.370000  138.290000  141.230000   5386540.0
3       IBM 2022-11-09  137.95  138.90  136.94  137.39  4718328.0      1.65    1.0  137.950000  138.900000  136.940000  137.390000   4718328.0
4       IBM 2022-11-08  139.00  140.93  138.72  140.04  5039458.0      0.00    1.0  137.350475  139.257571  137.073797  138.378133   5039458.0
5       IBM 2022-11-07  136.64  138.70  136.51  138.34  4042576.0      0.00    1.0  135.018481  137.054035  134.890024  136.698307   4042576.0
6       IBM 2022-11-04  135.65  137.73  134.94  136.96  4176645.0      0.00    1.0  134.040229  136.095546  133.338655  135.334684   4176645.0
7       IBM 2022-11-03  136.42  136.48  133.97  134.47  4441075.0      0.00    1.0  134.801092  134.860380  132.380166  132.874233   4441075.0
8       IBM 2022-11-02  137.75  140.17  136.80  136.83  5360222.0      0.00    1.0  136.115309  138.506590  135.176582  135.206226   5360222.0
9       IBM 2022-11-01  138.25  138.65  136.70  138.20  3574815.0      0.00    1.0  136.609375  137.004628  135.077769  136.559968   3574815.0

The upper data was received using:

    data = nasdaqdatalink.get_table('QUOTEMEDIA/PRICES', ticker='IBM',
                                    date={'gte': '2022-11-01', 'lte': '2022-11-14'}, paginate=True)
    print(data)

Thank you in advance for your time and answers and helping me understanding and getting a dipper knowledge of the market data. Best regards, Valter

clientsuccessnasdaq commented 1 year ago

-- Please reply above this line --

        Hi Valter,

Thank you for your questions.

Kindly see our response below:

  1. THE EOD DATABASE CONTAINS OHLCV DATA AS WELL AS ADJUSTMENTS/EXCHANGE CORRECTIONS -- these are the product's inclusions. You can learn about the exact column definitions by following this link: https://data.nasdaq.com/databases/EOD/documentation?anchor=column-definition [1]. The EOD database adjusts split/cash dividend/spinoff. Please note that EOD data is available by 5:00 PM ET, and adjustments/exchange corrections are updated by 9:30 PM ET.

  2. Please consult the methodology section of the product, which details how adjusted values are calculated. You may view it here: https://data.nasdaq.com/databases/EOD/documentation?anchor=knowledge-base [2].

  3. The adjusted price data is backward-adjusted. This means today's adjusted price will always equal the price traded in the market. Adjustments apply only to historical data; the further back you go into the past, the greater the cumulative adjustments are likely to be, as corporate actions accumulate. THE ADJUSTMENT TAKES IN CONSIDERATION THE 1.65 DIVIDEND THAT TOOK PLACE ON NOV. 9.

  4. Regarding which of the two is best used for calculation, here is an article on Investopedia that details the difference between the unadjusted and adjusted prices (also details the benefits and criticism of using adjusted stock prices): https://www.investopedia.com/terms/a/adjusted_closing_price.asp#:~:text=Key%20Takeaways-,The%20adjusted%20closing%20price%20amends%20a%20stock's%20closing%20price%20to,price%20before%20the%20market%20closes [3].

The above link is an example only. There are many other third-party sites that discuss which of the two should be used depending on the use case.

We hope this information helps. Please let us know should you have further questions.

Best regards, Kim

Links:

[1] https://data.nasdaq.com/databases/EOD/documentation?anchor=column-definitions [2] https://data.nasdaq.com/databases/EOD/documentation?anchor=knowledge-base [3] https://www.investopedia.com/terms/a/adjusted_closing_price.asp#:~:text=Key%20Takeaways-,The%20adjusted%20closing%20price%20amends%20a%20stock's%20closing%20price%20to,price%20before%20the%20market%20closes

KIM LIRA Client Success  Nasdaq Data Link

How would you rate my reply? Great [1]    Okay [2]    Not Good [3]

Links:

[1] https://secure.helpscout.net/satisfaction/589514374/record/6280330070/1/ [2] https://secure.helpscout.net/satisfaction/589514374/record/6280330070/2/ [3] https://secure.helpscout.net/satisfaction/589514374/record/6280330070/3/

    > On Fri, Dec 30, 2022 at 8:08 AM EST, Nasdaq/data-Link-Python ***@***.***> wrote:

WARNING - EXTERNAL EMAIL; EXERCISE CAUTION.

Hello to all, I have some questions regarding the adjusted data.

  • I understand that the data can vary from broker to broker for a little bit but why nasdaq have in the same row the "regular" data (open, high, low, close) and the adjusted data (adj_open, adj_high, adj_low, adj_close)?
  • Why the adj_* data exists in first place and how is calculated?
  • Why for the date before and included 2022-11-08 the adj_* data is so different from the "regular" data?
  • What data is best to use for further calculation and data manipulation?

Folowing is the data:

ticker date open high low close volume dividend split adj_open adj_high adj_low adj_close adj_volume 0 IBM 2022-11-14 142.63 146.08 142.18 144.20 5293453.0 0.00 1.0 142.630000 146.080000 142.180000 144.200000 5293453.0 1 IBM 2022-11-11 141.50 144.13 140.96 143.17 5869298.0 0.00 1.0 141.500000 144.130000 140.960000 143.170000 5869298.0 2 IBM 2022-11-10 140.26 141.37 138.29 141.23 5386540.0 0.00 1.0 140.260000 141.370000 138.290000 141.230000 5386540.0 3 IBM 2022-11-09 137.95 138.90 136.94 137.39 4718328.0 1.65 1.0 137.950000 138.900000 136.940000 137.390000 4718328.0 4 IBM 2022-11-08 139.00 140.93 138.72 140.04 5039458.0 0.00 1.0 137.350475 139.257571 137.073797 138.378133 5039458.0 5 IBM 2022-11-07 136.64 138.70 136.51 138.34 4042576.0 0.00 1.0 135.018481 137.054035 134.890024 136.698307 4042576.0 6 IBM 2022-11-04 135.65 137.73 134.94 136.96 4176645.0 0.00 1.0 134.040229 136.095546 133.338655 135.334684 4176645.0 7 IBM 2022-11-03 136.42 136.48 133.97 134.47 4441075.0 0.00 1.0 134.801092 134.860380 132.380166 132.874233 4441075.0 8 IBM 2022-11-02 137.75 140.17 136.80 136.83 5360222.0 0.00 1.0 136.115309 138.506590 135.176582 135.206226 5360222.0 9 IBM 2022-11-01 138.25 138.65 136.70 138.20 3574815.0 0.00 1.0 136.609375 137.004628 135.077769 136.559968 3574815.0

The upper data was received using:

data = nasdaqdatalink.get_table('QUOTEMEDIA/PRICES', ticker='IBM', date={'gte': '2022-11-01', 'lte': '2022-11-14'}, paginate=True) print(data)

Thank you in advance for your time and answers and helping me understanding and getting a dipper knowledge of the market data. Best regards, Valter

- Reply to this email directly, view it on GitHub [1], or unsubscribe [2]. You are receiving this because you are subscribed to this thread.Message ID: @.***>


CONFIDENTIALITY AND PRIVACY NOTICE: This e-mail and any attachments are for the exclusive and confidential use of the intended recipient and may constitute non-public information. Personal data in this email is governed by our Privacy Policy at https://www.nasdaq.com/privacy-statement [3] unless explicitly excluded from it; please see the section in the policy entitled "Situations Where This Privacy Policy Does Not Apply" for circumstances where different privacy terms govern emailed personal data. If you received this e-mail in error, disclosing, copying, distributing or taking any action in reliance of this e-mail is strictly prohibited and may be unlawful. Instead, please notify us immediately by return e-mail and promptly delete this message and its attachments from your computer system. We do not waive any work product or other applicable legal privilege(s) by the transmission of this message.


Links:

[1] https://github.com/Nasdaq/data-link-python/issues/33 [2] https://github.com/notifications/unsubscribe-auth/AWYQ64YUPOYWIMY2FNRHU5LWP3NCDANCNFSM6AAAAAATM4D2WA [3] https://www.nasdaq.com/privacy-statement