Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 130 lines (110 sloc) 7.83 KB
XBRL items can include Footnotes. Should probably print these out.
Income Statement
- In IncomeStatement::latest_quarterly_refactored, it's checking whether the statement has any
quarterly periods, and if so, using the last one. There's a problem with that, some statements
do have quarterly periods, but don't break all lines down to the quarterly level. In this example:
./examples/show_reports.rb --income-detail CHRW 2011-09-01
The 2012-12-31 column is missing a $283M income (FIBT) because that item is only given in annual
periods (not the 2012-10-01..2012-12-31 quarterly period). See it in this dump:
./examples/dump_latest_10k.rb http://www.sec.gov/Archives/edgar/data/1043277/000104327713000004/0001043277-13-000004-index.htm
Need to modify that method to check whether there are quarterly PERIODS and that all leaf items
have that quarterly period.
- Improve the readability of the error checking. One option would be to move to
a system like ActiveRecord's error-handling, in which a class just accumulates its errors
nicely, and lets you print them out whenever it's convenient, and in a well-formatted way,
without causing an immediate exception.
- The classifier that had been classifying unknown credits/debits is disabled. Replace it?
(I don't even remember what this refers to...)
- net income != comprehensive income. pull in items from SSE? and/or parse the comprehensive
income statement.
- certain things are being misclassified as FIBT instead of OOIBT. (hedging,
currency exchg, etc)
- need to better understand minority interest, noncontrollable blah-blah,
etc. (not a big deal for tech companies, but important for conglomerates, mediaco's, etc)
- naming consistency (e.g., rename OIBT as OOIBT?)
- naming consistency between operating/financing vs. operational/financial?
- Instead of having find_calculation_arc use a discrete set of exact regexes, what about using
a classifier (and minimum confidence threshold), like the row classifier works?
- How to tell if a stock gave off a dividend? Are we tracking those somewhere?
Forecasts
- Refactor it. The logic is too spread around.
- Detect historicals that are too noisy to forecast from:
- R^2 of regressions?
- Certain ratios remaining constant-ish (e.g, composition ratios)
- Detect historicals with poor earnings quality:
- Noisy NI/C
- Detect forecasts that look suspect:
- Derived values in the forecasts (e.g., composition ratio) remain
with a standard deviation or two from their trend lines.
- Allow assumptions to be tweaked by user:
- How is continuing value calculated? (What long-term g?)
Comprehensive Income Statement
- Not very many examples, especially of less common things like FIAT. Find more.
- The pension and stock-expense OCIs are getting labeled as operating OCI, which is geting
added back in as other operating income after tax. Really, though, they should be treated
as a core operating expense, since they're about paying the core employees.
Balance Sheet
- Dig into the disclosures. They've got lots more interesting goodness.
- Need to reclassify: credits to shareholders' equity for stock compensation expense
- Minority interest?
- Need to reclassify: dividends payable
- The classifier that had been classifying unknown credits/debits is disabled. Replace it?
- "Redeemable Noncontrolling Interest Equity Carrying Amount"??
Try to figure out why the change in equity is not equal to comprehensive income, in cases where we know it.
- Some 10k's (and even some 10q's?) have Statements of SE
- When they don't:
- Some 10q's have AOCI broken out on BS. We can look for deltas
- Some 10q's have disclosures that list components of OCI or CI
- The remaining residual is probably stock-based compensation expense
- minority interests makes it screwey. also, preferred dividends?
Cash Flow Statement
- not taking into account: net cash interest, tax on net interest, or non-cash
transactions. All 3 of these items are listed in supplementary disclosures.
- the classifier's success rate isn't that high.
- "I" is defined inversely.
Statement of Shareholder Equity
- Not taking into account share-based compensation, dividends payable, etc.
Cost of Capital
- Debt cost of capital - try to estimate before tax cost of capital by modeling
credit spread as a function of interest coverage. Is there a way to estimate
marginal (not effective) tax rate?
XBRL includes a "weight" parameter. Is that useable in place of the "mapping" idea used here?
########################################################################################################################
########################################################################################################################
########################################################################################################################
require 'finmodeling'
report_paths=["/Users/jimlindstrom/.finmodeling/filings/000110465910063219", "/Users/jimlindstrom/.finmodeling/filings/000119312509153165", "/Users/jimlindstrom/.finmodeling/filings/000119312509214859", "/Users/jimlindstrom/.finmodeling/filings/000119312510012085", "/Users/jimlindstrom/.finmodeling/filings/000119312510030774", "/Users/jimlindstrom/.finmodeling/filings/000119312510088957", "/Users/jimlindstrom/.finmodeling/filings/000119312510162840", "/Users/jimlindstrom/.finmodeling/filings/000119312510238044", "/Users/jimlindstrom/.finmodeling/filings/000119312511010144", "/Users/jimlindstrom/.finmodeling/filings/000119312511104388", "/Users/jimlindstrom/.finmodeling/filings/000119312511134428", "/Users/jimlindstrom/.finmodeling/filings/000119312511192493", "/Users/jimlindstrom/.finmodeling/filings/000119312511199078", "/Users/jimlindstrom/.finmodeling/filings/000119312511282113", "/Users/jimlindstrom/.finmodeling/filings/000119312511282235", "/Users/jimlindstrom/.finmodeling/filings/000119312512023398", "/Users/jimlindstrom/.finmodeling/filings/000119312512025336", "/Users/jimlindstrom/.finmodeling/filings/000119312512182321", "/Users/jimlindstrom/.finmodeling/filings/000119312512314552", "/Users/jimlindstrom/.finmodeling/filings/000119312512444068", "/Users/jimlindstrom/.finmodeling/filings/000119312513022339"]
report_paths.each do |report_path|
puts report_path
filing=FinModeling::AnnualReportFiling.new(report_path)
bs=filing.balance_sheet
le=bs.liabs_and_equity_calculation
le.periods.each do |period|
puts le.calculation.leaf_items(period).select{ |x| x.footnotes }.inspect
end
a=bs.assets_calculation
a.periods.each do |period|
puts a.calculation.leaf_items(period).select{ |x| x.footnotes }.inspect
end
puts
end
# #<Xbrlware::Item:0x007fcd631b7b18
# @ins=#<Xbrlware::Instance:0x007fcd63b8cdf0>,
# @name="CommonStockValue",
# @context=Id [eol_PE2035----0910-Q0009_STD_0_20091226_0],
# Entity { Identifier { schema [http://www.sec.gov/CIK], value [] } },
# period [2009-12-26],
# @precision=nil,
# @decimals="-6",
# @footnotes={"en-US"=>["See Note 2, \"Retrospective Adoption of New Accounting Principles\" of this Form 10-Q."]},
# @value="8962000000.0",
# @unit=#<Xbrlware::Unit:0x007fcd66db28e8 @id="iso4217_USD", @measure=["iso4217:USD"], @ns="http://www.xbrl.org/2003/instance", @nsp="">,
# @ns="http://xbrl.us/us-gaap/2009-01-31",
# @nsp="us-gaap",
# @def={"xbrli:balance"=>"credit", "name"=>"CommonStockValue", "nillable"=>"true", "xbrli:periodType"=>"instant", "id"=>"us-gaap_CommonStockValue", "type"=>"xbrli:monetaryItemType", "substitutionGroup"=>"xbrli:item"}>
# several TODOs:
# 1. modify xbrlware-extras to write these to the constructors
# item = Xbrlware::Item.new(instance, name, context, value, unit, precision, decimals, footnotes)
# 2. modify CalculationSummary to handle printing footnoes
# 3. modify the various calculations to extract footnoes and stuff them into the summaries.
# --- And do it TDD-style.
Something went wrong with that request. Please try again.