0
$\begingroup$

Can anyone speak to the reliability of the Alpha Vantage (AV) api for fundamental stock data? I have tried for a couple of stocks to get balance sheet data, and it seems close to accurate but I feel like I either don't clearly understand the data dictionary or it is unreliable.

Here is a sample code to pull balance sheet data for XOM using R:

library(tidyverse)
library(httr)
library(jsonlite)
library(lubridate)
# Download Data ------------------------------------------------------------
my_api_key <- 'my_api_key'

url <- 'https://www.alphavantage.co/query?'

query <- list('function' = 'BALANCE_SHEET', 
              symbol = 'XOM',  
              apikey = my_api_key)

r <- GET(url = url, 
         query = query,
         accept_json())

j <- content(r, type = 'text', encoding = 'UTF-8') 

d <- fromJSON(j)

# Clean the data ----------------------------------------------------------
bs_quarterly <- d[[3]]

bs_quarterly <- tibble(bs_quarterly)

bs_quarterly <-
  bs_quarterly %>%
  mutate(fiscalDateEnding = ymd(fiscalDateEnding)) %>%
  mutate_at(.vars = -(1:2), .f = as.numeric)

# Review the data ---------------------------------------------------------
bs_quarterly %>%
  filter(fiscalDateEnding %in% 
           ymd(c('2020-12-31', '2019-12-31'))) %>%
  select(fiscalDateEnding, 
         currentDebt,
         shortTermDebt, 
         longTermDebt,
         shortLongTermDebtTotal)

Here is the output from that code: R results

Now if I go to the sec.gov website and look at the XOM 10-K report at this site: https://www.sec.gov/ix?doc=/Archives/edgar/data/34088/000003408821000012/xom-20201231.htm

This is what I see from the balance sheet (column 1 is 2020-12-31, and column 2 is 2019-12-31):

enter image description here

The long term debt for 12-31-2019 is listed as 24,672 in AV compared to 26,342 from the 10-k. I have no idea what the AV value of short term debt as 1,701 represents. The shortLongTermDebtTotal of 26,273 is the sum of these two AV values, but this seems to grossly understate the company's debt.

My findings are the AV fundamental data is arbitrarily close to accurate but not reliable to do any real analysis with. Please let me know if I am missing something, or what other users think of this api data quality.

If AV is unreliable, is there a free or reasonably priced alternative that is reliable?

$\endgroup$
2
  • $\begingroup$ Have you checked that the data is coming from comparable reporting periods, e.g. 10-K for annual, and 10-Q for quarterly periods? $\endgroup$ – Sergei Rodionov Apr 9 at 11:07
  • $\begingroup$ For the balance sheet I don't think it matters, a balance doesn't have a duration (like year or quarter). I have checked to make sure the periods match I am comparing against from the AV data and the SEC data. $\endgroup$ – Chris Kiniry Apr 9 at 13:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.