jimlindstrom / FinModeling

Tools for Financial Modeling
101 stars 32 forks source link

No XBRL filing error #1

Closed keithblanchard closed 11 years ago

keithblanchard commented 11 years ago

Sometimes I get an error saying has no instance files. No XBRL filing?

Is there a way to parse out the data of this type? Apple has 230 10-Q records but I can only get 11 records with the script.

jimlindstrom commented 11 years ago

Hi Keith,

When I clone this repo, run "rake install" and then try "./examples/show_reports.rb --num-forecasts 2 aapl 2009-02-01", I do see that the first 10-Q generates the exception you describe. (Although the exception is properly handled and that report is skipped.)

I confirmed on the SEC site (http://www.sec.gov/cgi-bin/browse-edgar?action=getcompany&CIK=0000320193&type=10-q&dateb=&owner=include&count=40) that in fact, Apple has only ten 10-Qs that have XBRL filings. The oldest one is this one (http://www.sec.gov/Archives/edgar/data/320193/000119312509153165/0001193125-09-153165-index.htm) filed on 2009-07-22. Note the file called "XBRL INSTANCE DOCUMENT". In the prior 10-Q (http://www.sec.gov/Archives/edgar/data/320193/000119312509087629/0001193125-09-087629-index.htm), there's no such file.

Given that, I think the code is doing what I expect. This is is the limitation of using XBRL filings -- you can only go back so far in a company's reporting history. If you're feeling particularly frisky, you might check out my earlier (and now abandoned) project "sec_edgar" (https://github.com/jimlindstrom/sec_edgar), which just downloaded the raw HTML filings and attempted to parse them. It is similarly incomplete (can't download all reports), and more badly written/tested (earlier in my use of ruby and TDD). But it is able to handle many older reports if that is of particular interest to you.

Let me know if you think I'm missing something, or if you're seeing other issues. I'd be curious to hear how the project is working for you, and what you're using it for, too.

jbl