xlf QandA series
Yahoo data - null fields
QUESTION
WHY DO SOME YAHOO PRICE RECORDS SHOW 'null'?
Answer
Database NULL values usually mean that the data is missing, unknown, or not available. Yahoo historical data sometimes includes a valid date, but a series of fields containing null. An example is AXJO.AX (the S&P/ASX 200 index - an Australian stock index) as shown in figure 1, worksheet line 675 for 4 September 2017. Null fields are more frequent in stock price data prior to 2012, see figure 4.

4 September 2017 was a trading day on the Australian Stock Exchange. See figure 2.

MySQL describes null as a missing unknown value
. Null is displayed without the string double-quote, see figure 3. A Null is different to 0 (zero) or an empty string ("", or '').
A Source Code view of Yahoo data is displayed in figure 3.

When loaded to an Excel worksheet, the Yahoo Null is displayed as a text "null", figure 1.
How to handle the null fields For participants of excelatfinance.com related programs, the recommendation is:
- Count the number of nulls: COUNTIF(range, "null")
- If COUNTIF returns a value greater than 0
- Then replace null with string "#N/A" or formula =NA(). These statements are equivalent, figure 4.

Fig 4: Find and Replace - Yahoo null with Excel N/A error
Other examples of Yahoo data null
Advance Nanotek Limited (ANO.AX) data for 2011 has numerous null records (see figure 5). A quick examination of ASX charts suggest that ANO stocks did not trade on these dates.

References
- Hide the holidays. Create a list of trading days
- MySQL 8.0 Reference Manual: Working with NULL Values. Accessed 5 April 2020
- Development platform: Excel 2016 ProPlus 64 bit.
- Published: 5 April 2020
- Revised: Friday 24th of February 2023 - 02:39 PM, Pacific Time (PT)
