mirror of
https://github.com/hydrosquall/tiingo-python.git
synced 2025-12-17 20:04:19 +01:00
Merge pull request #581 from atarax/feature/fundamentals
Feature/fundamentals
This commit is contained in:
@@ -17,3 +17,4 @@ Contributors
|
|||||||
* Nima Yazdanmehr
|
* Nima Yazdanmehr
|
||||||
* Michael MacCormack
|
* Michael MacCormack
|
||||||
* David Minnen
|
* David Minnen
|
||||||
|
* Tobias Kaesser <t.kaesser@gmail.com>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ History
|
|||||||
0.14.0 (2020-12-XX - Unreleased)
|
0.14.0 (2020-12-XX - Unreleased)
|
||||||
--------------------------------
|
--------------------------------
|
||||||
* Feature (Name #Number)
|
* Feature (Name #Number)
|
||||||
|
* Feature: Added 3 new methods for fundamentals-endpoint: definitions, daily and statements
|
||||||
* Development: Run tests in Github Actions instead of Travis.org
|
* Development: Run tests in Github Actions instead of Travis.org
|
||||||
* [/news] Fix bug in get_news() when sources list is empty (#566)
|
* [/news] Fix bug in get_news() when sources list is empty (#566)
|
||||||
|
|
||||||
|
|||||||
19
README.rst
19
README.rst
@@ -106,6 +106,25 @@ Now you can use ``TiingoClient`` to make your API calls. (Other parameters are a
|
|||||||
startDate='2017-01-01',
|
startDate='2017-01-01',
|
||||||
endDate='2017-08-31')
|
endDate='2017-08-31')
|
||||||
|
|
||||||
|
# Get definitions for fields available in the fundamentals-api, ticker is
|
||||||
|
# optional
|
||||||
|
definitions = get_fundamentals_definitions('GOOGL')
|
||||||
|
|
||||||
|
# Get fundamentals which require daily-updated (like marketCap). A start-
|
||||||
|
# and end-date can be passed. If omited, will get all available data.
|
||||||
|
fundamentals_daily = CLIENT.get_fundamentals_daily('GOOGL',
|
||||||
|
startDate='2020-01-01',
|
||||||
|
endDate='2020-12-31')
|
||||||
|
|
||||||
|
# Get fundamentals based on quarterly statements. Accepts time-range like
|
||||||
|
# daily-fundamentals. asReported can be set to get the data exactly like
|
||||||
|
# it was reported to SEC. Set to False if you want to get data containing
|
||||||
|
# corrections
|
||||||
|
fundamentals_stmnts = CLIENT.get_fundamentals_statements('GOOGL',
|
||||||
|
startDate='2020-01-01',
|
||||||
|
endDate='2020-12-31',
|
||||||
|
asReported=True)
|
||||||
|
|
||||||
|
|
||||||
To receive results in ``pandas`` format, use the ``get_dataframe()`` method:
|
To receive results in ``pandas`` format, use the ``get_dataframe()`` method:
|
||||||
|
|
||||||
|
|||||||
40
tests/fixtures/fundamentals_daily.yaml
vendored
Normal file
40
tests/fixtures/fundamentals_daily.yaml
vendored
Normal file
File diff suppressed because one or more lines are too long
170
tests/fixtures/fundamentals_daily_csv.yaml
vendored
Normal file
170
tests/fixtures/fundamentals_daily_csv.yaml
vendored
Normal file
@@ -0,0 +1,170 @@
|
|||||||
|
interactions:
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept:
|
||||||
|
- '*/*'
|
||||||
|
Accept-Encoding:
|
||||||
|
- gzip, deflate
|
||||||
|
Authorization:
|
||||||
|
- Token 0000000000000000000000000000000000000000
|
||||||
|
Connection:
|
||||||
|
- keep-alive
|
||||||
|
Content-Type:
|
||||||
|
- application/json
|
||||||
|
User-Agent:
|
||||||
|
- tiingo-python-client 0.13.0
|
||||||
|
method: GET
|
||||||
|
uri: https://api.tiingo.com/tiingo/fundamentals/GOOGL/daily?startDate=2020-1-1&endDate=2020-4-1&format=csv
|
||||||
|
response:
|
||||||
|
body:
|
||||||
|
string: 'date,marketCap,enterpriseVal,peRatio,pbRatio,trailingPEG1Y
|
||||||
|
|
||||||
|
2019-12-31,923760472316.11,920030472316.11,27.0147236789028,4.58573918207776,1.34343490727517
|
||||||
|
|
||||||
|
2020-01-02,943961417697.32,940231417697.32,27.605486083098,4.68602087795653,1.37281336197028
|
||||||
|
|
||||||
|
2020-01-03,939023255562.48,935293255562.48,27.4610730133118,4.66150681368572,1.36563173904037
|
||||||
|
|
||||||
|
2020-01-06,964052013086.69,960322013086.69,28.1930213795885,4.78575477351639,1.40203133347143
|
||||||
|
|
||||||
|
2020-01-07,962189856974.39,958459856974.39,28.1385639370714,4.77651064313494,1.39932317957328
|
||||||
|
|
||||||
|
2020-01-08,969038453342.96,965308453342.96,28.3388463089956,4.81050850042671,1.4092831677987
|
||||||
|
|
||||||
|
2020-01-09,979211343215.71,975481343215.71,28.6363453005244,4.86100884232538,1.4240777122423
|
||||||
|
|
||||||
|
2020-01-10,985535777123.04,981805777123.04,28.8212989108512,4.89240464810237,1.43327540529638
|
||||||
|
|
||||||
|
2020-01-13,993170617183.47,989440617183.47,29.0445744251714,4.93030558266632,1.4443788362788
|
||||||
|
|
||||||
|
2020-01-14,986659967664.91,982929967664.91,28.854175070593,4.89798536385117,1.4349103278349
|
||||||
|
|
||||||
|
2020-01-15,992598176600.8,988868176600.8,29.0278338039532,4.92746386851202,1.44354632971011
|
||||||
|
|
||||||
|
2020-01-16,1000157151041.84,996427151041.84,29.2488906817265,4.96498819035672,1.45453942849667
|
||||||
|
|
||||||
|
2020-01-17,1020406374544.48,1016676374544.48,29.8410649455426,5.065509548875,1.48398809458915
|
||||||
|
|
||||||
|
2020-01-21,1022289221280.25,1018559221280.25,29.8961274707543,5.07485639181625,1.48672633908616
|
||||||
|
|
||||||
|
2020-01-22,1023613421182.33,1019883421182.33,29.934852763211,5.08142999564306,1.48865213741374
|
||||||
|
|
||||||
|
2020-01-23,1023972058655.81,1020242058655.81,29.9453408632513,5.08321034667948,1.48917370779412
|
||||||
|
|
||||||
|
2020-01-24,1011199047100.33,1007469047100.33,29.57180314643,5.01980245976672,1.47059777809274
|
||||||
|
|
||||||
|
2020-01-27,987446211356.77,983716211356.77,28.8771682129891,4.90188844112334,1.43605377059189
|
||||||
|
|
||||||
|
2020-01-28,1000391644774.5,996661644774.5,29.255748285599,4.96615226603438,1.45488045528384
|
||||||
|
|
||||||
|
2020-01-29,1004667706958.3,1000937706958.3,29.3807987091569,4.98737952839179,1.46109917904997
|
||||||
|
|
||||||
|
2020-01-30,1002977972708.25,999247972708.25,29.3313836224284,4.97899133600862,1.45864178014239
|
||||||
|
|
||||||
|
2020-01-31,988170383178.22,984440383178.22,28.8983461073013,4.90548338071613,1.43710694155228
|
||||||
|
|
||||||
|
2020-02-03,1022530611887.4,1018800611887.4,29.9031867688584,5.07605470501384,1.48707739607296
|
||||||
|
|
||||||
|
2020-02-04,993410187346.9,989680187346.9,29.1530859217426,4.94872536838935,1.44977508367585
|
||||||
|
|
||||||
|
2020-02-05,993850050444.5,990120050444.5,29.1659943525615,4.95091656966496,1.45041701645171
|
||||||
|
|
||||||
|
2020-02-06,1014413650257.3,1010683650257.3,29.7694634933441,5.05335522929939,1.48042737372306
|
||||||
|
|
||||||
|
2020-02-07,1016571728579.9,1012841728579.9,29.8327954820492,5.06410581055782,1.48357685640461
|
||||||
|
|
||||||
|
2020-02-10,1036881032539.4,1033151032539.4,30.4288019362646,5.1652776819548,1.51321609628992
|
||||||
|
|
||||||
|
2020-02-11,1037843233065.4,1034113233065.4,30.4570391286809,5.17007093474518,1.51462032423711
|
||||||
|
|
||||||
|
2020-02-12,1043733274856.7,1040003274856.7,30.629891085115,5.1994124893263,1.52321620531383
|
||||||
|
|
||||||
|
2020-02-13,1040131895745.1,1036401895745.1,30.5242033077854,5.1814720288823,1.51796038071149
|
||||||
|
|
||||||
|
2020-02-14,1043802003465.7,1040072003465.7,30.6319080274304,5.19975486452561,1.52331650731005
|
||||||
|
|
||||||
|
2020-02-18,1044289976589.6,1040559976589.6,30.6462283178701,5.20218572844073,1.52402865148327
|
||||||
|
|
||||||
|
2020-02-19,1048021940058.3,1044291940058.3,30.755748285599,5.22077670176343,1.52947504987844
|
||||||
|
|
||||||
|
2020-02-20,1042606125669.1,1038876125669.1,30.5968132311416,5.19379753605757,1.52157125257569
|
||||||
|
|
||||||
|
2020-02-21,1019561423071.4,1015831423071.4,29.9205324727713,5.07899913172793,1.48793999324052
|
||||||
|
|
||||||
|
2020-02-24,975850027747.4,972120027747.4,28.6377571601452,4.86124850496489,1.42414792363965
|
||||||
|
|
||||||
|
2020-02-25,952798452288.8,949068452288.8,27.9612747075434,4.74641586311533,1.39050663410486
|
||||||
|
|
||||||
|
2020-02-26,955650689562.3,951920689562.3,28.0449778136345,4.76062443388682,1.39466916694831
|
||||||
|
|
||||||
|
2020-02-27,903746844045.5,900016844045.5,26.5217829770069,4.50206268336568,1.3189210993971
|
||||||
|
|
||||||
|
2020-02-28,920447896032.5,916717896032.5,27.0118999596612,4.58525985679872,1.34329448448045
|
||||||
|
|
||||||
|
2020-03-02,952798452288.8,949068452288.8,27.9612747075434,4.74641586311533,1.39050663410486
|
||||||
|
|
||||||
|
2020-03-03,919396348314.8,915666348314.8,26.9810407422348,4.58002151624923,1.34175986393816
|
||||||
|
|
||||||
|
2020-03-04,949554461944.0,945824461944.0,27.8660750302541,4.73025575370776,1.38577237988291
|
||||||
|
|
||||||
|
2020-03-05,903616259688.4,899886259688.4,26.5179507866075,4.50141217048698,1.31873052560427
|
||||||
|
|
||||||
|
2020-03-06,890544078256.6,886814078256.6,26.134328358209,4.43629240757766,1.29965308592175
|
||||||
|
|
||||||
|
2020-03-09,835595555361.1,831865555361.1,24.5217829770069,4.16256343572695,1.21946163993764
|
||||||
|
|
||||||
|
2020-03-10,876406603385.3,872676603385.3,25.7194433239209,4.36586582907898,1.27902096529769
|
||||||
|
|
||||||
|
2020-03-11,832234726381.0,828504726381.0,24.4231544977814,4.14582128848055,1.2145568723221
|
||||||
|
|
||||||
|
2020-03-12,763952853339.5,760222853339.5,22.419322307382,3.80567152796313,1.11490683906981
|
||||||
|
|
||||||
|
2020-03-13,834550880504.3,830820880504.3,24.491125453812,4.15735933269739,1.21793704959498
|
||||||
|
|
||||||
|
2020-03-16,737457974570.0,733727974570.0,21.6417910447761,3.67368588862799,1.076240419524
|
||||||
|
|
||||||
|
2020-03-17,768427085785.4,764697085785.4,22.5506252521178,3.8279601534384,1.12143649902424
|
||||||
|
|
||||||
|
2020-03-18,749959708547.1,746229708547.1,22.0086728519564,3.73596393738301,1.09448535263783
|
||||||
|
|
||||||
|
2020-03-19,764035327670.3,760305327670.3,22.4217426381606,3.8060823782023,1.11502720146528
|
||||||
|
|
||||||
|
2020-03-20,734165874198.9,730435874198.9,21.5451795078661,3.6572861165809,1.07143595390469
|
||||||
|
|
||||||
|
2020-03-23,724488886051.7,720758886051.7,21.2611940298507,3.60907968851763,1.05731343283582
|
||||||
|
|
||||||
|
2020-03-24,776640154560.9,772910154560.9,22.791649858814,3.8688739897563,1.13342258757345
|
||||||
|
|
||||||
|
2020-03-25,757128102465.8,753398102465.8,22.2190399354578,3.77167367067135,1.10494685084439
|
||||||
|
|
||||||
|
2020-03-26,799258739782.8,795528739782.8,23.4554255748286,3.98154966785019,1.16643197453202
|
||||||
|
|
||||||
|
2020-03-27,763066254283.4,759336254283.4,22.3933037515127,3.80125488789199,1.11361294331847
|
||||||
|
|
||||||
|
2020-03-30,787842917827.9,784112917827.9,23.1204114562324,3.92468114724431,1.14977181295858
|
||||||
|
|
||||||
|
2020-03-31,798592072275.5,794440072275.5,23.2576060848679,3.92122161198621,5.86336490244826
|
||||||
|
|
||||||
|
2020-04-01,757457999789.0,753305999789.0,22.0596477181745,3.7192463863075,5.56135329316082
|
||||||
|
|
||||||
|
'
|
||||||
|
headers:
|
||||||
|
allow:
|
||||||
|
- GET, HEAD, OPTIONS
|
||||||
|
content-length:
|
||||||
|
- '5994'
|
||||||
|
content-type:
|
||||||
|
- text/csv
|
||||||
|
date:
|
||||||
|
- Sat, 06 Feb 2021 16:23:38 GMT
|
||||||
|
server:
|
||||||
|
- nginx/1.14.0 (Ubuntu)
|
||||||
|
vary:
|
||||||
|
- Accept, Cookie, Origin
|
||||||
|
x-frame-options:
|
||||||
|
- SAMEORIGIN
|
||||||
|
status:
|
||||||
|
code: 200
|
||||||
|
message: OK
|
||||||
|
version: 1
|
||||||
202
tests/fixtures/fundamentals_definitions.yaml
vendored
Normal file
202
tests/fixtures/fundamentals_definitions.yaml
vendored
Normal file
@@ -0,0 +1,202 @@
|
|||||||
|
interactions:
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept:
|
||||||
|
- '*/*'
|
||||||
|
Accept-Encoding:
|
||||||
|
- gzip, deflate
|
||||||
|
Authorization:
|
||||||
|
- Token 0000000000000000000000000000000000000000
|
||||||
|
Connection:
|
||||||
|
- keep-alive
|
||||||
|
Content-Type:
|
||||||
|
- application/json
|
||||||
|
User-Agent:
|
||||||
|
- tiingo-python-client 0.13.0
|
||||||
|
method: GET
|
||||||
|
uri: https://api.tiingo.com/tiingo/fundamentals/definitions?tickers=GOOGL&format=json
|
||||||
|
response:
|
||||||
|
body:
|
||||||
|
string: '[{"dataCode":"rps","name":"Revenue Per Share","description":"Revenue
|
||||||
|
per share","statementType":"overview","units":"$"},{"dataCode":"roa","name":"Return
|
||||||
|
on Assets ROA","description":"Net Income\/Total Assets","statementType":"overview","units":"%"},{"dataCode":"assetTurnover","name":"Asset
|
||||||
|
Turnover","description":"Revenue over assets","statementType":"overview","units":null},{"dataCode":"bookVal","name":"Book
|
||||||
|
Value","description":"Book value of the share, assets - liabilities","statementType":"overview","units":"$"},{"dataCode":"bvps","name":"Book
|
||||||
|
Value Per Share","description":"Book Value per each share","statementType":"overview","units":"$"},{"dataCode":"revenue","name":"Revenue","description":"Revenue","statementType":"incomeStatement","units":"$"},{"dataCode":"epsDil","name":"Earnings
|
||||||
|
Per Share Diluted","description":"EPS for diluted shares","statementType":"incomeStatement","units":"$"},{"dataCode":"netinc","name":"Net
|
||||||
|
Income","description":"Net income","statementType":"incomeStatement","units":"$"},{"dataCode":"profitMargin","name":"Profit
|
||||||
|
Margin","description":"This field is marked for DEPRECATION. Please use grossMargin
|
||||||
|
instead. Profit Margin is calculated by the (Revenue - COGS)\/Revenue","statementType":"overview","units":"%"},{"dataCode":"revenueQoQ","name":"Revenue
|
||||||
|
QoQ Growth","description":"Revenue Quarter-over-Quarter Growth rate","statementType":"overview","units":"%"},{"dataCode":"debtEquity","name":"Debt
|
||||||
|
to Equity Ratio","description":"Debt\/Equity ratio","statementType":"overview","units":""},{"dataCode":"grossMargin","name":"Gross
|
||||||
|
Margin","description":"The margin of good sold, basically how much of the
|
||||||
|
money the company keeps after selling their goods and services. (Rev.-Cost
|
||||||
|
of Rev.)\/Rev.","statementType":"overview","units":"%"},{"dataCode":"roe","name":"Return
|
||||||
|
on Equity ROE","description":"Return on Shareholder''s equity; ROE=Net Income\/Shareholder''s
|
||||||
|
Equity","statementType":"overview","units":"%"},{"dataCode":"currentRatio","name":"Current
|
||||||
|
Ratio","description":"Ability for a company to pay off its short-term liabilities,
|
||||||
|
Current Assets\/Current Liabilities","statementType":"overview","units":""},{"dataCode":"fxRate","name":"FX
|
||||||
|
Rate","description":"The exchange rate used for the conversion of foreign
|
||||||
|
currency to USD for non-US companies that do not report in USD.","statementType":"overview","units":null},{"dataCode":"sharesBasic","name":"Shares
|
||||||
|
Outstanding","description":"Outstanding shares","statementType":"balanceSheet","units":""},{"dataCode":"piotroskiFScore","name":"Piotroski
|
||||||
|
F-Score","description":"0-9 point scale to determine strength of company''s
|
||||||
|
financial position","statementType":"overview","units":null},{"dataCode":"longTermDebtEquity","name":"Long-term
|
||||||
|
Debt to Equity","description":"Long term debt to equity","statementType":"overview","units":null},{"dataCode":"opMargin","name":"Operating
|
||||||
|
Margin","description":"Operating margin, or how much money a company makes
|
||||||
|
on each dollar of revenue. In other words Operating Income\/Revenue","statementType":"overview","units":"%"},{"dataCode":"epsQoQ","name":"Earnings
|
||||||
|
Per Share QoQ Growth","description":"Earnings Per Share Quarter-over-Quarter
|
||||||
|
Growth rate","statementType":"overview","units":"%"},{"dataCode":"shareswaDil","name":"Weighted
|
||||||
|
Average Shares Diluted","description":"Used to calculated diluted EPS. Considers
|
||||||
|
all outstanding common stock plus all instruments that can be converted into
|
||||||
|
shares (like stock options) ","statementType":"incomeStatement","units":""},{"dataCode":"eps","name":"Earnings
|
||||||
|
Per Share","description":"Earnings per basic share (not diluted)","statementType":"incomeStatement","units":"$"},{"dataCode":"ppeq","name":"Property,
|
||||||
|
Plant & Equipment","description":"A component of assets representing the total
|
||||||
|
amount of marketable and non-marketable securties, loans receivable and other
|
||||||
|
invested assets.","statementType":"balanceSheet","units":"$"},{"dataCode":"ebitda","name":"EBITDA","description":"EBITDA
|
||||||
|
is a non-GAAP accounting metric that is widely used when assessing the performance
|
||||||
|
of companies, calculated by adding Depreciation\/Amortization back to Earnings
|
||||||
|
before interest and taxes","statementType":"incomeStatement","units":"$"},{"dataCode":"freeCashFlow","name":"Free
|
||||||
|
Cash Flow","description":"Operating Cash Flow - Capex, How much cash is left
|
||||||
|
over after reinvesting it in the business. Used as a measure to evaluate financial
|
||||||
|
performance of a company","statementType":"cashFlow","units":"$"},{"dataCode":"issrepayDebt","name":"Issuance
|
||||||
|
or Repayment of Debt Securities","description":"Representing the net cash
|
||||||
|
inflow (outflow) from issuance (repayment) of debt securities.","statementType":"cashFlow","units":"$"},{"dataCode":"capex","name":"Capital
|
||||||
|
Expenditure","description":"Money uses to upgrade or acquire property or materials
|
||||||
|
to maintain and increase size","statementType":"cashFlow","units":"$"},{"dataCode":"rnd","name":"Research
|
||||||
|
& Development","description":"The aggregate costs incurred in a planned search
|
||||||
|
or critical investigation aimed at discovery of new knowledge with the hope
|
||||||
|
that such knowledge will be useful in developing a new product or service.","statementType":"incomeStatement","units":"$"},{"dataCode":"sga","name":"Selling,
|
||||||
|
General & Administrative","description":"The aggregate total costs related
|
||||||
|
to selling a firm''s product and services, as well as all other general and
|
||||||
|
administrative expenses. Direct selling expenses (for example, credit, warranty,
|
||||||
|
and advertising) are expenses that can be directly linked to the sale of specific
|
||||||
|
products. Indirect selling expenses are expenses that cannot be directly linked
|
||||||
|
to the sale of specific products, for example telephone expenses, Internet,
|
||||||
|
and postal charges. General and administrative expenses include salaries","statementType":"incomeStatement","units":"$"},{"dataCode":"investmentsCurrent","name":"Current
|
||||||
|
Investments","description":"The current portion of Investments, reported if
|
||||||
|
the company operates a classified balance sheet that segments current and
|
||||||
|
non-current assets.","statementType":"balanceSheet","units":"$"},{"dataCode":"payDiv","name":"Payment
|
||||||
|
of Dividends & Other Cash Distributions","description":"Representing dividends
|
||||||
|
and dividend equivalents paid on common stock and restricted stock units.","statementType":"cashFlow","units":"$"},{"dataCode":"peRatio","name":"Price
|
||||||
|
to Earnings Ratio","description":"P\/E Ratio","statementType":"overview","units":""},{"dataCode":"investmentsAcqDisposals","name":"Investment
|
||||||
|
Acquisitions & Disposals","description":"A component of cash flow from financing,
|
||||||
|
representing the net cash inflow (outflow) associated with the acquisition
|
||||||
|
& disposal of investments, including marketable securities and loan originations.","statementType":"cashFlow","units":"$"},{"dataCode":"taxLiabilities","name":"Tax
|
||||||
|
Liabilities","description":"A component of liabilities representing outstanding
|
||||||
|
tax liabilities.","statementType":"balanceSheet","units":"$"},{"dataCode":"ncff","name":"Net
|
||||||
|
Cash Flow from Financing","description":"Net Cash flow from financing activities
|
||||||
|
like issuing stock or debt minus dividends or acquiring debt","statementType":"cashFlow","units":"$"},{"dataCode":"opinc","name":"Operating
|
||||||
|
Income","description":"Operating income is a measure of financial performance
|
||||||
|
before the deduction of interest expense, tax expenses and other Non-Operating
|
||||||
|
items. It is calculated as gross profit minus operating expenses","statementType":"incomeStatement","units":"$"},{"dataCode":"nonControllingInterests","name":"Net
|
||||||
|
Income to Non-Controlling Interests","description":"The portion of income
|
||||||
|
which is attributable to non-controlling interest shareholders, subtracted
|
||||||
|
from consolidated income in order to obtain net income","statementType":"incomeStatement","units":"$"},{"dataCode":"assetsNonCurrent","name":"Other
|
||||||
|
Assets","description":"Assets that cannot be easily converted into cash and
|
||||||
|
where the value of the item will be realized in a year","statementType":"balanceSheet","units":"$"},{"dataCode":"taxAssets","name":"Tax
|
||||||
|
Assets","description":"A component of assets representing tax assets and receivables.","statementType":"balanceSheet","units":"$"},{"dataCode":"issrepayEquity","name":"Issuance
|
||||||
|
or Repayment of Equity","description":"Representing the net cash inflow (outflow)
|
||||||
|
from issuance (repayment) of equity.","statementType":"cashFlow","units":"$"},{"dataCode":"ncfx","name":"Effect
|
||||||
|
of Exchange Rate Changes on Cash","description":"Cash flow from exchange rate
|
||||||
|
changes","statementType":"cashFlow","units":"$"},{"dataCode":"ncfo","name":"Net
|
||||||
|
Cash Flow from Operations","description":"Cash flow generating from a company''s
|
||||||
|
operations","statementType":"cashFlow","units":"$"},{"dataCode":"grossProfit","name":"Gross
|
||||||
|
Profit","description":"Aggregate revenue [REVENUE] less cost of revenue [COR]
|
||||||
|
directly attributable to the revenue generation activity.","statementType":"incomeStatement","units":"$"},{"dataCode":"debtCurrent","name":"Current
|
||||||
|
Debt","description":"Current debt - debt due within a year","statementType":"balanceSheet","units":"$"},{"dataCode":"retainedEarnings","name":"Accumulated
|
||||||
|
Retained Earnings or Deficit","description":"A component of Shareholder''s
|
||||||
|
Equity representing the cumulative amount of the entities undistributed earnings
|
||||||
|
or deficit. May only be reported annually by certain companies, rather than
|
||||||
|
quarterly.","statementType":"balanceSheet","units":"$"},{"dataCode":"liabilitiesNonCurrent","name":"Other
|
||||||
|
Liabilities","description":"Long-term liabilities (like debt) that are not
|
||||||
|
due within a year","statementType":"balanceSheet","units":"$"},{"dataCode":"sbcomp","name":"Shared-based
|
||||||
|
Compensation","description":"A component of cash flow from operating activities,
|
||||||
|
representing the total amount of noncash, equity-based employee remuneration.
|
||||||
|
This may include the value of stock or unit options, amortization of restricted
|
||||||
|
stock or units, and adjustment for officers'' compensation. As noncash, this
|
||||||
|
element is an add back when calculating net cash generated by operating activities
|
||||||
|
using the indirect method.","statementType":"cashFlow","units":"$"},{"dataCode":"businessAcqDisposals","name":"Business
|
||||||
|
Acquisitions & Disposals","description":"A component of cash flow from investing,
|
||||||
|
representing the net cash inflow (outflow) associated with the acquisition
|
||||||
|
& disposal of businesses, joint-ventures, affiliates, and other named investments.","statementType":"cashFlow","units":"$"},{"dataCode":"liabilitiesCurrent","name":"Current
|
||||||
|
Liabilities","description":"Debt or liabilities that are due within a year","statementType":"balanceSheet","units":"$"},{"dataCode":"acctRec","name":"Accounts
|
||||||
|
Receivable","description":"Amount company will receive based on work already
|
||||||
|
completed and delivered","statementType":"balanceSheet","units":"$"},{"dataCode":"cashAndEq","name":"Cash
|
||||||
|
and Equivalents","description":"Cash or assets that can be converted to cash
|
||||||
|
immediately","statementType":"balanceSheet","units":"$"},{"dataCode":"accoci","name":"Accumulated
|
||||||
|
Other Comprehensive Income","description":"Unrealized gains and losses - such
|
||||||
|
as items that have changed in value but haven''t been bought or sold yet","statementType":"balanceSheet","units":"$"},{"dataCode":"depamor","name":"Depreciation,
|
||||||
|
Amortization & Accretion","description":"Depreciation, Amortization, and Accretion","statementType":"cashFlow","units":"$"},{"dataCode":"assetsCurrent","name":"Current
|
||||||
|
Assets","description":"Assets that can easily be converted to cash and can
|
||||||
|
be used to fund day-to-day operations","statementType":"balanceSheet","units":"$"},{"dataCode":"shareswa","name":"Weighted
|
||||||
|
Average Shares","description":"Weighted average shares (undiluted)","statementType":"incomeStatement","units":""},{"dataCode":"investments","name":"Investments","description":"A
|
||||||
|
component of assets representing the total amount of marketable and non-marketable
|
||||||
|
securties, loans receivable and other invested assets.","statementType":"balanceSheet","units":"$"},{"dataCode":"prefDVDs","name":"Preferred
|
||||||
|
Dividends Income Statement Impact","description":"Impact of dividend on company''s
|
||||||
|
preferred shares","statementType":"incomeStatement","units":"$"},{"dataCode":"intangibles","name":"Intangible
|
||||||
|
Assets","description":"Goodwill and Intangible Assets","statementType":"balanceSheet","units":"$"},{"dataCode":"opex","name":"Operating
|
||||||
|
Expenses","description":"Operating expenses represents the total expenditure
|
||||||
|
on SG&A, R&D and other operating expense items, it excludes cost of revenue.","statementType":"incomeStatement","units":"$"},{"dataCode":"inventory","name":"Inventory","description":"A
|
||||||
|
component of Total Assets representing the amount after valuation and reserves
|
||||||
|
of inventory expected to be sold, or consumed within one year or operating
|
||||||
|
cycle, if longer.","statementType":"balanceSheet","units":"$"},{"dataCode":"deposits","name":"Deposits","description":"Deposit
|
||||||
|
liabilities, both domestic and international including deposits such as savings
|
||||||
|
deposts","statementType":"balanceSheet","units":"$"},{"dataCode":"ebt","name":"Earnings
|
||||||
|
before tax","description":"Revenue - Expenses and excluding tax","statementType":"incomeStatement","units":"$"},{"dataCode":"netMargin","name":"Net
|
||||||
|
Margin","description":"Net Profit Margin, or the Net Income as a proportion
|
||||||
|
of Revenue. In other words, Net Income\/Revenue","statementType":"overview","units":"%"},{"dataCode":"investmentsNonCurrent","name":"Non-Current
|
||||||
|
Investments","description":"The non-current portion of investments, reported
|
||||||
|
if the company operates a classified balance sheet that segments current and
|
||||||
|
non-current assets.","statementType":"balanceSheet","units":"$"},{"dataCode":"totalAssets","name":"Total
|
||||||
|
Assets","description":"Total assets","statementType":"balanceSheet","units":"$"},{"dataCode":"deferredRev","name":"Deferred
|
||||||
|
Revenue","description":"Revenue that was received, but not yet paid out including
|
||||||
|
sales, license fees, and royalties, but excluding interest income.","statementType":"balanceSheet","units":"$"},{"dataCode":"taxExp","name":"Tax
|
||||||
|
Expense","description":"Tax expenses","statementType":"incomeStatement","units":"$"},{"dataCode":"debt","name":"Total
|
||||||
|
Debt","description":"Debt","statementType":"balanceSheet","units":"$"},{"dataCode":"costRev","name":"Cost
|
||||||
|
of Revenue","description":"The aggregate cost of goods produced and sold and
|
||||||
|
services rendered during the reporting period.","statementType":"incomeStatement","units":"$"},{"dataCode":"acctPay","name":"Accounts
|
||||||
|
Payable","description":"Short-term debt the company must pay off within a
|
||||||
|
year","statementType":"balanceSheet","units":"$"},{"dataCode":"ncf","name":"Net
|
||||||
|
Cash Flow to Change in Cash & Cash Equivalents","description":"Net Cash flow
|
||||||
|
- Total cash minux liabilities","statementType":"cashFlow","units":"$"},{"dataCode":"netIncDiscOps","name":"Net
|
||||||
|
Income from Discontinued Operations","description":"Net income from discontinued
|
||||||
|
operations","statementType":"incomeStatement","units":"$"},{"dataCode":"totalLiabilities","name":"Total
|
||||||
|
Liabilities","description":"Total Liabilities","statementType":"balanceSheet","units":"$"},{"dataCode":"ncfi","name":"Net
|
||||||
|
Cash Flow from Investing","description":"Cash flow from investments made by
|
||||||
|
the company","statementType":"cashFlow","units":"$"},{"dataCode":"debtNonCurrent","name":"Non-Current
|
||||||
|
Debt","description":"Longer-term debt, typically greater than a year","statementType":"balanceSheet","units":"$"},{"dataCode":"ebit","name":"Earning
|
||||||
|
Before Interest & Taxes EBIT","description":"Earning Before Interest & Taxes
|
||||||
|
(EBIT)","statementType":"incomeStatement","units":"$"},{"dataCode":"netIncComStock","name":"Net
|
||||||
|
Income Common Stock","description":"Net Income applied to common share holders.
|
||||||
|
Used in calculating EPS (earnings per share).","statementType":"incomeStatement","units":"$"},{"dataCode":"intexp","name":"Interest
|
||||||
|
Expense","description":"Interest expense","statementType":"incomeStatement","units":"$"},{"dataCode":"consolidatedIncome","name":"Consolidated
|
||||||
|
Income","description":"The portion of profit or loss for the period, net of
|
||||||
|
income taxes, which is attributable to the consolidated entity.","statementType":"incomeStatement","units":"$"},{"dataCode":"equity","name":"Shareholders
|
||||||
|
Equity","description":"Shareholders Equity","statementType":"balanceSheet","units":"$"},{"dataCode":"marketCap","name":"Market
|
||||||
|
Capitalization","description":"Size of the company (shares outstanding * share
|
||||||
|
price)","statementType":"overview","units":"$"},{"dataCode":"enterpriseVal","name":"Enterprise
|
||||||
|
Value","description":"An alternative to marketcap that''s the theoretical
|
||||||
|
takeover price of a company (marketcap + debt - cash and cash equivalents)","statementType":"overview","units":"$"},{"dataCode":"pbRatio","name":"Price
|
||||||
|
to Book Ratio","description":"Price\/Book value per share ratio","statementType":"overview","units":null},{"dataCode":"trailingPEG1Y","name":"PEG
|
||||||
|
Ratio","description":"PEG ratio using the trailing 1 year EPS growth rate
|
||||||
|
in the denominator","statementType":"overview","units":null}]'
|
||||||
|
headers:
|
||||||
|
allow:
|
||||||
|
- GET, HEAD, OPTIONS
|
||||||
|
content-length:
|
||||||
|
- '17003'
|
||||||
|
content-type:
|
||||||
|
- application/json
|
||||||
|
date:
|
||||||
|
- Sat, 06 Feb 2021 16:23:39 GMT
|
||||||
|
server:
|
||||||
|
- nginx/1.14.0 (Ubuntu)
|
||||||
|
vary:
|
||||||
|
- Accept, Cookie, Origin
|
||||||
|
x-frame-options:
|
||||||
|
- SAMEORIGIN
|
||||||
|
status:
|
||||||
|
code: 200
|
||||||
|
message: OK
|
||||||
|
version: 1
|
||||||
297
tests/fixtures/fundamentals_definitions_csv.yaml
vendored
Normal file
297
tests/fixtures/fundamentals_definitions_csv.yaml
vendored
Normal file
@@ -0,0 +1,297 @@
|
|||||||
|
interactions:
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept:
|
||||||
|
- '*/*'
|
||||||
|
Accept-Encoding:
|
||||||
|
- gzip, deflate
|
||||||
|
Authorization:
|
||||||
|
- Token 0000000000000000000000000000000000000000
|
||||||
|
Connection:
|
||||||
|
- keep-alive
|
||||||
|
Content-Type:
|
||||||
|
- application/json
|
||||||
|
User-Agent:
|
||||||
|
- tiingo-python-client 0.13.0
|
||||||
|
method: GET
|
||||||
|
uri: https://api.tiingo.com/tiingo/fundamentals/definitions?tickers=GOOGL&format=csv
|
||||||
|
response:
|
||||||
|
body:
|
||||||
|
string: 'dataCode,name,description,statementType,units
|
||||||
|
|
||||||
|
rps,Revenue Per Share,Revenue per share,overview,$
|
||||||
|
|
||||||
|
roa,Return on Assets ROA,Net Income/Total Assets,overview,%
|
||||||
|
|
||||||
|
assetTurnover,Asset Turnover,Revenue over assets,overview,
|
||||||
|
|
||||||
|
bookVal,Book Value,"Book value of the share, assets - liabilities",overview,$
|
||||||
|
|
||||||
|
bvps,Book Value Per Share,Book Value per each share,overview,$
|
||||||
|
|
||||||
|
revenue,Revenue,Revenue,incomeStatement,$
|
||||||
|
|
||||||
|
epsDil,Earnings Per Share Diluted,EPS for diluted shares,incomeStatement,$
|
||||||
|
|
||||||
|
netinc,Net Income,Net income,incomeStatement,$
|
||||||
|
|
||||||
|
profitMargin,Profit Margin,This field is marked for DEPRECATION. Please use
|
||||||
|
grossMargin instead. Profit Margin is calculated by the (Revenue - COGS)/Revenue,overview,%
|
||||||
|
|
||||||
|
revenueQoQ,Revenue QoQ Growth,Revenue Quarter-over-Quarter Growth rate,overview,%
|
||||||
|
|
||||||
|
debtEquity,Debt to Equity Ratio,Debt/Equity ratio,overview,
|
||||||
|
|
||||||
|
grossMargin,Gross Margin,"The margin of good sold, basically how much of the
|
||||||
|
money the company keeps after selling their goods and services. (Rev.-Cost
|
||||||
|
of Rev.)/Rev.",overview,%
|
||||||
|
|
||||||
|
roe,Return on Equity ROE,Return on Shareholder''s equity; ROE=Net Income/Shareholder''s
|
||||||
|
Equity,overview,%
|
||||||
|
|
||||||
|
currentRatio,Current Ratio,"Ability for a company to pay off its short-term
|
||||||
|
liabilities, Current Assets/Current Liabilities",overview,
|
||||||
|
|
||||||
|
fxRate,FX Rate,The exchange rate used for the conversion of foreign currency
|
||||||
|
to USD for non-US companies that do not report in USD.,overview,
|
||||||
|
|
||||||
|
sharesBasic,Shares Outstanding,Outstanding shares,balanceSheet,
|
||||||
|
|
||||||
|
piotroskiFScore,Piotroski F-Score,0-9 point scale to determine strength of
|
||||||
|
company''s financial position,overview,
|
||||||
|
|
||||||
|
longTermDebtEquity,Long-term Debt to Equity,Long term debt to equity,overview,
|
||||||
|
|
||||||
|
opMargin,Operating Margin,"Operating margin, or how much money a company makes
|
||||||
|
on each dollar of revenue. In other words Operating Income/Revenue",overview,%
|
||||||
|
|
||||||
|
epsQoQ,Earnings Per Share QoQ Growth,Earnings Per Share Quarter-over-Quarter
|
||||||
|
Growth rate,overview,%
|
||||||
|
|
||||||
|
shareswaDil,Weighted Average Shares Diluted,Used to calculated diluted EPS.
|
||||||
|
Considers all outstanding common stock plus all instruments that can be converted
|
||||||
|
into shares (like stock options) ,incomeStatement,
|
||||||
|
|
||||||
|
eps,Earnings Per Share,Earnings per basic share (not diluted),incomeStatement,$
|
||||||
|
|
||||||
|
ppeq,"Property, Plant & Equipment","A component of assets representing the
|
||||||
|
total amount of marketable and non-marketable securties, loans receivable
|
||||||
|
and other invested assets.",balanceSheet,$
|
||||||
|
|
||||||
|
ebitda,EBITDA,"EBITDA is a non-GAAP accounting metric that is widely used
|
||||||
|
when assessing the performance of companies, calculated by adding Depreciation/Amortization
|
||||||
|
back to Earnings before interest and taxes",incomeStatement,$
|
||||||
|
|
||||||
|
freeCashFlow,Free Cash Flow,"Operating Cash Flow - Capex, How much cash is
|
||||||
|
left over after reinvesting it in the business. Used as a measure to evaluate
|
||||||
|
financial performance of a company",cashFlow,$
|
||||||
|
|
||||||
|
issrepayDebt,Issuance or Repayment of Debt Securities,Representing the net
|
||||||
|
cash inflow (outflow) from issuance (repayment) of debt securities.,cashFlow,$
|
||||||
|
|
||||||
|
capex,Capital Expenditure,Money uses to upgrade or acquire property or materials
|
||||||
|
to maintain and increase size,cashFlow,$
|
||||||
|
|
||||||
|
rnd,Research & Development,The aggregate costs incurred in a planned search
|
||||||
|
or critical investigation aimed at discovery of new knowledge with the hope
|
||||||
|
that such knowledge will be useful in developing a new product or service.,incomeStatement,$
|
||||||
|
|
||||||
|
sga,"Selling, General & Administrative","The aggregate total costs related
|
||||||
|
to selling a firm''s product and services, as well as all other general and
|
||||||
|
administrative expenses. Direct selling expenses (for example, credit, warranty,
|
||||||
|
and advertising) are expenses that can be directly linked to the sale of specific
|
||||||
|
products. Indirect selling expenses are expenses that cannot be directly linked
|
||||||
|
to the sale of specific products, for example telephone expenses, Internet,
|
||||||
|
and postal charges. General and administrative expenses include salaries",incomeStatement,$
|
||||||
|
|
||||||
|
investmentsCurrent,Current Investments,"The current portion of Investments,
|
||||||
|
reported if the company operates a classified balance sheet that segments
|
||||||
|
current and non-current assets.",balanceSheet,$
|
||||||
|
|
||||||
|
payDiv,Payment of Dividends & Other Cash Distributions,Representing dividends
|
||||||
|
and dividend equivalents paid on common stock and restricted stock units.,cashFlow,$
|
||||||
|
|
||||||
|
peRatio,Price to Earnings Ratio,P/E Ratio,overview,
|
||||||
|
|
||||||
|
investmentsAcqDisposals,Investment Acquisitions & Disposals,"A component of
|
||||||
|
cash flow from financing, representing the net cash inflow (outflow) associated
|
||||||
|
with the acquisition & disposal of investments, including marketable securities
|
||||||
|
and loan originations.",cashFlow,$
|
||||||
|
|
||||||
|
taxLiabilities,Tax Liabilities,A component of liabilities representing outstanding
|
||||||
|
tax liabilities.,balanceSheet,$
|
||||||
|
|
||||||
|
ncff,Net Cash Flow from Financing,Net Cash flow from financing activities
|
||||||
|
like issuing stock or debt minus dividends or acquiring debt,cashFlow,$
|
||||||
|
|
||||||
|
opinc,Operating Income,"Operating income is a measure of financial performance
|
||||||
|
before the deduction of interest expense, tax expenses and other Non-Operating
|
||||||
|
items. It is calculated as gross profit minus operating expenses",incomeStatement,$
|
||||||
|
|
||||||
|
nonControllingInterests,Net Income to Non-Controlling Interests,"The portion
|
||||||
|
of income which is attributable to non-controlling interest shareholders,
|
||||||
|
subtracted from consolidated income in order to obtain net income",incomeStatement,$
|
||||||
|
|
||||||
|
assetsNonCurrent,Other Assets,Assets that cannot be easily converted into
|
||||||
|
cash and where the value of the item will be realized in a year,balanceSheet,$
|
||||||
|
|
||||||
|
taxAssets,Tax Assets,A component of assets representing tax assets and receivables.,balanceSheet,$
|
||||||
|
|
||||||
|
issrepayEquity,Issuance or Repayment of Equity,Representing the net cash inflow
|
||||||
|
(outflow) from issuance (repayment) of equity.,cashFlow,$
|
||||||
|
|
||||||
|
ncfx,Effect of Exchange Rate Changes on Cash,Cash flow from exchange rate
|
||||||
|
changes,cashFlow,$
|
||||||
|
|
||||||
|
ncfo,Net Cash Flow from Operations,Cash flow generating from a company''s
|
||||||
|
operations,cashFlow,$
|
||||||
|
|
||||||
|
grossProfit,Gross Profit,Aggregate revenue [REVENUE] less cost of revenue
|
||||||
|
[COR] directly attributable to the revenue generation activity.,incomeStatement,$
|
||||||
|
|
||||||
|
debtCurrent,Current Debt,Current debt - debt due within a year,balanceSheet,$
|
||||||
|
|
||||||
|
retainedEarnings,Accumulated Retained Earnings or Deficit,"A component of
|
||||||
|
Shareholder''s Equity representing the cumulative amount of the entities undistributed
|
||||||
|
earnings or deficit. May only be reported annually by certain companies, rather
|
||||||
|
than quarterly.",balanceSheet,$
|
||||||
|
|
||||||
|
liabilitiesNonCurrent,Other Liabilities,Long-term liabilities (like debt)
|
||||||
|
that are not due within a year,balanceSheet,$
|
||||||
|
|
||||||
|
sbcomp,Shared-based Compensation,"A component of cash flow from operating
|
||||||
|
activities, representing the total amount of noncash, equity-based employee
|
||||||
|
remuneration. This may include the value of stock or unit options, amortization
|
||||||
|
of restricted stock or units, and adjustment for officers'' compensation.
|
||||||
|
As noncash, this element is an add back when calculating net cash generated
|
||||||
|
by operating activities using the indirect method.",cashFlow,$
|
||||||
|
|
||||||
|
businessAcqDisposals,Business Acquisitions & Disposals,"A component of cash
|
||||||
|
flow from investing, representing the net cash inflow (outflow) associated
|
||||||
|
with the acquisition & disposal of businesses, joint-ventures, affiliates,
|
||||||
|
and other named investments.",cashFlow,$
|
||||||
|
|
||||||
|
liabilitiesCurrent,Current Liabilities,Debt or liabilities that are due within
|
||||||
|
a year,balanceSheet,$
|
||||||
|
|
||||||
|
acctRec,Accounts Receivable,Amount company will receive based on work already
|
||||||
|
completed and delivered,balanceSheet,$
|
||||||
|
|
||||||
|
cashAndEq,Cash and Equivalents,Cash or assets that can be converted to cash
|
||||||
|
immediately,balanceSheet,$
|
||||||
|
|
||||||
|
accoci,Accumulated Other Comprehensive Income,Unrealized gains and losses
|
||||||
|
- such as items that have changed in value but haven''t been bought or sold
|
||||||
|
yet,balanceSheet,$
|
||||||
|
|
||||||
|
depamor,"Depreciation, Amortization & Accretion","Depreciation, Amortization,
|
||||||
|
and Accretion",cashFlow,$
|
||||||
|
|
||||||
|
assetsCurrent,Current Assets,Assets that can easily be converted to cash and
|
||||||
|
can be used to fund day-to-day operations,balanceSheet,$
|
||||||
|
|
||||||
|
shareswa,Weighted Average Shares,Weighted average shares (undiluted),incomeStatement,
|
||||||
|
|
||||||
|
investments,Investments,"A component of assets representing the total amount
|
||||||
|
of marketable and non-marketable securties, loans receivable and other invested
|
||||||
|
assets.",balanceSheet,$
|
||||||
|
|
||||||
|
prefDVDs,Preferred Dividends Income Statement Impact,Impact of dividend on
|
||||||
|
company''s preferred shares,incomeStatement,$
|
||||||
|
|
||||||
|
intangibles,Intangible Assets,Goodwill and Intangible Assets,balanceSheet,$
|
||||||
|
|
||||||
|
opex,Operating Expenses,"Operating expenses represents the total expenditure
|
||||||
|
on SG&A, R&D and other operating expense items, it excludes cost of revenue.",incomeStatement,$
|
||||||
|
|
||||||
|
inventory,Inventory,"A component of Total Assets representing the amount after
|
||||||
|
valuation and reserves of inventory expected to be sold, or consumed within
|
||||||
|
one year or operating cycle, if longer.",balanceSheet,$
|
||||||
|
|
||||||
|
deposits,Deposits,"Deposit liabilities, both domestic and international including
|
||||||
|
deposits such as savings deposts",balanceSheet,$
|
||||||
|
|
||||||
|
ebt,Earnings before tax,Revenue - Expenses and excluding tax,incomeStatement,$
|
||||||
|
|
||||||
|
netMargin,Net Margin,"Net Profit Margin, or the Net Income as a proportion
|
||||||
|
of Revenue. In other words, Net Income/Revenue",overview,%
|
||||||
|
|
||||||
|
investmentsNonCurrent,Non-Current Investments,"The non-current portion of
|
||||||
|
investments, reported if the company operates a classified balance sheet that
|
||||||
|
segments current and non-current assets.",balanceSheet,$
|
||||||
|
|
||||||
|
totalAssets,Total Assets,Total assets,balanceSheet,$
|
||||||
|
|
||||||
|
deferredRev,Deferred Revenue,"Revenue that was received, but not yet paid
|
||||||
|
out including sales, license fees, and royalties, but excluding interest
|
||||||
|
income.",balanceSheet,$
|
||||||
|
|
||||||
|
taxExp,Tax Expense,Tax expenses,incomeStatement,$
|
||||||
|
|
||||||
|
debt,Total Debt,Debt,balanceSheet,$
|
||||||
|
|
||||||
|
costRev,Cost of Revenue,The aggregate cost of goods produced and sold and
|
||||||
|
services rendered during the reporting period.,incomeStatement,$
|
||||||
|
|
||||||
|
acctPay,Accounts Payable,Short-term debt the company must pay off within a
|
||||||
|
year,balanceSheet,$
|
||||||
|
|
||||||
|
ncf,Net Cash Flow to Change in Cash & Cash Equivalents,Net Cash flow - Total
|
||||||
|
cash minux liabilities,cashFlow,$
|
||||||
|
|
||||||
|
netIncDiscOps,Net Income from Discontinued Operations,Net income from discontinued
|
||||||
|
operations,incomeStatement,$
|
||||||
|
|
||||||
|
totalLiabilities,Total Liabilities,Total Liabilities,balanceSheet,$
|
||||||
|
|
||||||
|
ncfi,Net Cash Flow from Investing,Cash flow from investments made by the company,cashFlow,$
|
||||||
|
|
||||||
|
debtNonCurrent,Non-Current Debt,"Longer-term debt, typically greater than
|
||||||
|
a year",balanceSheet,$
|
||||||
|
|
||||||
|
ebit,Earning Before Interest & Taxes EBIT,Earning Before Interest & Taxes
|
||||||
|
(EBIT),incomeStatement,$
|
||||||
|
|
||||||
|
netIncComStock,Net Income Common Stock,Net Income applied to common share
|
||||||
|
holders. Used in calculating EPS (earnings per share).,incomeStatement,$
|
||||||
|
|
||||||
|
intexp,Interest Expense,Interest expense,incomeStatement,$
|
||||||
|
|
||||||
|
consolidatedIncome,Consolidated Income,"The portion of profit or loss for
|
||||||
|
the period, net of income taxes, which is attributable to the consolidated
|
||||||
|
entity.",incomeStatement,$
|
||||||
|
|
||||||
|
equity,Shareholders Equity,Shareholders Equity,balanceSheet,$
|
||||||
|
|
||||||
|
marketCap,Market Capitalization,Size of the company (shares outstanding *
|
||||||
|
share price),overview,$
|
||||||
|
|
||||||
|
enterpriseVal,Enterprise Value,An alternative to marketcap that''s the theoretical
|
||||||
|
takeover price of a company (marketcap + debt - cash and cash equivalents),overview,$
|
||||||
|
|
||||||
|
pbRatio,Price to Book Ratio,Price/Book value per share ratio,overview,
|
||||||
|
|
||||||
|
trailingPEG1Y,PEG Ratio,PEG ratio using the trailing 1 year EPS growth rate
|
||||||
|
in the denominator,overview,
|
||||||
|
|
||||||
|
'
|
||||||
|
headers:
|
||||||
|
allow:
|
||||||
|
- GET, HEAD, OPTIONS
|
||||||
|
content-length:
|
||||||
|
- '11369'
|
||||||
|
content-type:
|
||||||
|
- text/csv
|
||||||
|
date:
|
||||||
|
- Sat, 06 Feb 2021 16:34:49 GMT
|
||||||
|
server:
|
||||||
|
- nginx/1.14.0 (Ubuntu)
|
||||||
|
vary:
|
||||||
|
- Accept, Cookie, Origin
|
||||||
|
x-frame-options:
|
||||||
|
- SAMEORIGIN
|
||||||
|
status:
|
||||||
|
code: 200
|
||||||
|
message: OK
|
||||||
|
version: 1
|
||||||
175
tests/fixtures/fundamentals_statements.yaml
vendored
Normal file
175
tests/fixtures/fundamentals_statements.yaml
vendored
Normal file
@@ -0,0 +1,175 @@
|
|||||||
|
interactions:
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept:
|
||||||
|
- '*/*'
|
||||||
|
Accept-Encoding:
|
||||||
|
- gzip, deflate
|
||||||
|
Authorization:
|
||||||
|
- Token 0000000000000000000000000000000000000000
|
||||||
|
Connection:
|
||||||
|
- keep-alive
|
||||||
|
Content-Type:
|
||||||
|
- application/json
|
||||||
|
User-Agent:
|
||||||
|
- tiingo-python-client 0.13.0
|
||||||
|
method: GET
|
||||||
|
uri: https://api.tiingo.com/tiingo/fundamentals/GOOGL/statements?startDate=2020-1-1&endDate=2020-4-1&asReported=false&format=json
|
||||||
|
response:
|
||||||
|
body:
|
||||||
|
string: '[{"date": "2020-03-31", "statementData": {"cashFlow": [{"value": -1847000000.0,
|
||||||
|
"dataCode": "ncfi"}, {"value": -9737000000.0, "dataCode": "issrepayEquity"},
|
||||||
|
{"value": 5446000000.0, "dataCode": "freeCashFlow"}, {"value": -272000000.0,
|
||||||
|
"dataCode": "ncfx"}, {"value": 11451000000.0, "dataCode": "ncfo"}, {"value":
|
||||||
|
-49000000.0, "dataCode": "issrepayDebt"}, {"value": 3108000000.0, "dataCode":
|
||||||
|
"depamor"}, {"value": -6005000000.0, "dataCode": "capex"}, {"value": 3191000000.0,
|
||||||
|
"dataCode": "sbcomp"}, {"value": 1146000000.0, "dataCode": "ncf"}, {"value":
|
||||||
|
-190000000.0, "dataCode": "businessAcqDisposals"}, {"value": 0.0, "dataCode":
|
||||||
|
"payDiv"}, {"value": 3936000000.0, "dataCode": "investmentsAcqDisposals"},
|
||||||
|
{"value": -8186000000.0, "dataCode": "ncff"}], "incomeStatement": [{"value":
|
||||||
|
14200000000.0, "dataCode": "opex"}, {"value": 6836000000.0, "dataCode": "netinc"},
|
||||||
|
{"value": 0.0, "dataCode": "prefDVDs"}, {"value": 0.0, "dataCode": "intexp"},
|
||||||
|
{"value": 22177000000.0, "dataCode": "grossProfit"}, {"value": 687286090.0,
|
||||||
|
"dataCode": "shareswa"}, {"value": 0.0, "dataCode": "netIncDiscOps"}, {"value":
|
||||||
|
41159000000.0, "dataCode": "revenue"}, {"value": 6820000000.0, "dataCode":
|
||||||
|
"rnd"}, {"value": 6836000000.0, "dataCode": "netIncComStock"}, {"value": 7380000000.0,
|
||||||
|
"dataCode": "sga"}, {"value": 18982000000.0, "dataCode": "costRev"}, {"value":
|
||||||
|
9.87, "dataCode": "epsDil"}, {"value": 9.96, "dataCode": "eps"}, {"value":
|
||||||
|
921000000.0, "dataCode": "taxExp"}, {"value": 7757000000.0, "dataCode": "ebit"},
|
||||||
|
{"value": 6836000000.0, "dataCode": "consolidatedIncome"}, {"value": 7977000000.0,
|
||||||
|
"dataCode": "opinc"}, {"value": 7757000000.0, "dataCode": "ebt"}, {"value":
|
||||||
|
0.0, "dataCode": "nonControllingInterests"}, {"value": 10865000000.0, "dataCode":
|
||||||
|
"ebitda"}], "overview": [{"value": 0.129119730854069, "dataCode": "roa"},
|
||||||
|
{"value": 0.538812896328871, "dataCode": "grossMargin"}, {"value": 296.323471350919,
|
||||||
|
"dataCode": "bvps"}, {"value": 0.174295876869016, "dataCode": "roe"}, {"value":
|
||||||
|
59.8862694864085, "dataCode": "rps"}, {"value": 3.65816516957376, "dataCode":
|
||||||
|
"currentRatio"}, {"value": 0.538812896328871, "dataCode": "profitMargin"},
|
||||||
|
{"value": 5.0, "dataCode": "piotroskiFScore"}, {"value": 203659000000.0, "dataCode":
|
||||||
|
"bookVal"}, {"value": 0.076068329904399, "dataCode": "longTermDebtEquity"},
|
||||||
|
{"value": 0.132639863507526, "dataCode": "revenueQoQ"}, {"value": 0.0396659707724427,
|
||||||
|
"dataCode": "epsQoQ"}], "balanceSheet": [{"value": 2640000000.0, "dataCode":
|
||||||
|
"taxAssets"}, {"value": 22574000000.0, "dataCode": "intangibles"}, {"value":
|
||||||
|
69744000000.0, "dataCode": "totalLiabilities"}, {"value": 109952000000.0,
|
||||||
|
"dataCode": "investments"}, {"value": 0.0, "dataCode": "debtCurrent"}, {"value":
|
||||||
|
147018000000.0, "dataCode": "assetsCurrent"}, {"value": 151068000000.0, "dataCode":
|
||||||
|
"retainedEarnings"}, {"value": 29555000000.0, "dataCode": "liabilitiesNonCurrent"},
|
||||||
|
{"value": -1097000000.0, "dataCode": "accoci"}, {"value": 19644000000.0, "dataCode":
|
||||||
|
"cashAndEq"}, {"value": 21825000000.0, "dataCode": "acctRec"}, {"value": 687286090.0,
|
||||||
|
"dataCode": "sharesBasic"}, {"value": 40189000000.0, "dataCode": "liabilitiesCurrent"},
|
||||||
|
{"value": 4099000000.0, "dataCode": "acctPay"}, {"value": 97585000000.0, "dataCode":
|
||||||
|
"investmentsCurrent"}, {"value": 15492000000.0, "dataCode": "debt"}, {"value":
|
||||||
|
7270000000.0, "dataCode": "deferredRev"}, {"value": 12199000000.0, "dataCode":
|
||||||
|
"taxLiabilities"}, {"value": 273403000000.0, "dataCode": "totalAssets"}, {"value":
|
||||||
|
87966000000.0, "dataCode": "ppeq"}, {"value": 12367000000.0, "dataCode": "investmentsNonCurrent"},
|
||||||
|
{"value": 15492000000.0, "dataCode": "debtNonCurrent"}, {"value": 203659000000.0,
|
||||||
|
"dataCode": "equity"}, {"value": 0.0, "dataCode": "deposits"}, {"value": 126385000000.0,
|
||||||
|
"dataCode": "assetsNonCurrent"}, {"value": 889000000.0, "dataCode": "inventory"}]},
|
||||||
|
"quarter": 1, "year": 2020}, {"date": "2019-12-31", "statementData": {"balanceSheet":
|
||||||
|
[{"value": 74467000000.0, "dataCode": "totalLiabilities"}, {"value": 689687449.0,
|
||||||
|
"dataCode": "sharesBasic"}, {"value": 84587000000.0, "dataCode": "ppeq"},
|
||||||
|
{"value": 101177000000.0, "dataCode": "investmentsCurrent"}, {"value": 11860000000.0,
|
||||||
|
"dataCode": "taxLiabilities"}, {"value": 123331000000.0, "dataCode": "assetsNonCurrent"},
|
||||||
|
{"value": 2887000000.0, "dataCode": "taxAssets"}, {"value": 0.0, "dataCode":
|
||||||
|
"debtCurrent"}, {"value": 152122000000.0, "dataCode": "retainedEarnings"},
|
||||||
|
{"value": 29246000000.0, "dataCode": "liabilitiesNonCurrent"}, {"value": 45221000000.0,
|
||||||
|
"dataCode": "liabilitiesCurrent"}, {"value": 25326000000.0, "dataCode": "acctRec"},
|
||||||
|
{"value": 18498000000.0, "dataCode": "cashAndEq"}, {"value": -1232000000.0,
|
||||||
|
"dataCode": "accoci"}, {"value": 152578000000.0, "dataCode": "assetsCurrent"},
|
||||||
|
{"value": 114255000000.0, "dataCode": "investments"}, {"value": 22603000000.0,
|
||||||
|
"dataCode": "intangibles"}, {"value": 999000000.0, "dataCode": "inventory"},
|
||||||
|
{"value": 0.0, "dataCode": "deposits"}, {"value": 13078000000.0, "dataCode":
|
||||||
|
"investmentsNonCurrent"}, {"value": 275909000000.0, "dataCode": "totalAssets"},
|
||||||
|
{"value": 8182000000.0, "dataCode": "deferredRev"}, {"value": 14768000000.0,
|
||||||
|
"dataCode": "debt"}, {"value": 5561000000.0, "dataCode": "acctPay"}, {"value":
|
||||||
|
14768000000.0, "dataCode": "debtNonCurrent"}, {"value": 201442000000.0, "dataCode":
|
||||||
|
"equity"}], "overview": [{"value": 0.543787303309821, "dataCode": "grossMargin"},
|
||||||
|
{"value": 0.131910509188086, "dataCode": "roa"}, {"value": 201442000000.0,
|
||||||
|
"dataCode": "bookVal"}, {"value": 292.077230478933, "dataCode": "bvps"}, {"value":
|
||||||
|
0.543787303309821, "dataCode": "profitMargin"}, {"value": 0.173108259496894,
|
||||||
|
"dataCode": "revenueQoQ"}, {"value": 66.8056234266777, "dataCode": "rps"},
|
||||||
|
{"value": 0.177925719651588, "dataCode": "roe"}, {"value": 3.374051878552,
|
||||||
|
"dataCode": "currentRatio"}, {"value": 4.0, "dataCode": "piotroskiFScore"},
|
||||||
|
{"value": 0.073311424628429, "dataCode": "longTermDebtEquity"}, {"value":
|
||||||
|
0.201086956521739, "dataCode": "epsQoQ"}], "cashFlow": [{"value": 8375000000.0,
|
||||||
|
"dataCode": "freeCashFlow"}, {"value": -47000000.0, "dataCode": "issrepayDebt"},
|
||||||
|
{"value": -6052000000.0, "dataCode": "capex"}, {"value": 0.0, "dataCode":
|
||||||
|
"payDiv"}, {"value": 3370000000.0, "dataCode": "investmentsAcqDisposals"},
|
||||||
|
{"value": -7326000000.0, "dataCode": "ncff"}, {"value": -7297000000.0, "dataCode":
|
||||||
|
"issrepayEquity"}, {"value": 68000000.0, "dataCode": "ncfx"}, {"value": 14427000000.0,
|
||||||
|
"dataCode": "ncfo"}, {"value": 2645000000.0, "dataCode": "sbcomp"}, {"value":
|
||||||
|
-2142000000.0, "dataCode": "businessAcqDisposals"}, {"value": 3413000000.0,
|
||||||
|
"dataCode": "depamor"}, {"value": 2466000000.0, "dataCode": "ncf"}, {"value":
|
||||||
|
-4703000000.0, "dataCode": "ncfi"}], "incomeStatement": [{"value": 46075000000.0,
|
||||||
|
"dataCode": "revenue"}, {"value": 15.33, "dataCode": "epsDil"}, {"value":
|
||||||
|
10671000000.0, "dataCode": "netinc"}, {"value": 15.47, "dataCode": "eps"},
|
||||||
|
{"value": 14117000000.0, "dataCode": "ebitda"}, {"value": 7222000000.0, "dataCode":
|
||||||
|
"rnd"}, {"value": 8567000000.0, "dataCode": "sga"}, {"value": 9266000000.0,
|
||||||
|
"dataCode": "opinc"}, {"value": 0.0, "dataCode": "nonControllingInterests"},
|
||||||
|
{"value": 25055000000.0, "dataCode": "grossProfit"}, {"value": 689687449.0,
|
||||||
|
"dataCode": "shareswa"}, {"value": 0.0, "dataCode": "prefDVDs"}, {"value":
|
||||||
|
15789000000.0, "dataCode": "opex"}, {"value": 10704000000.0, "dataCode": "ebt"},
|
||||||
|
{"value": 33000000.0, "dataCode": "taxExp"}, {"value": 21020000000.0, "dataCode":
|
||||||
|
"costRev"}, {"value": 0.0, "dataCode": "netIncDiscOps"}, {"value": 10704000000.0,
|
||||||
|
"dataCode": "ebit"}, {"value": 10671000000.0, "dataCode": "netIncComStock"},
|
||||||
|
{"value": 0.0, "dataCode": "intexp"}, {"value": 10671000000.0, "dataCode":
|
||||||
|
"consolidatedIncome"}]}, "quarter": 4, "year": 2019}, {"date": "2019-12-31",
|
||||||
|
"statementData": {"cashFlow": [{"value": -23161000000.0, "dataCode": "issrepayEquity"},
|
||||||
|
{"value": 30972000000.0, "dataCode": "freeCashFlow"}, {"value": -23209000000.0,
|
||||||
|
"dataCode": "ncff"}, {"value": -4017000000.0, "dataCode": "investmentsAcqDisposals"},
|
||||||
|
{"value": 0.0, "dataCode": "payDiv"}, {"value": 1797000000.0, "dataCode":
|
||||||
|
"ncf"}, {"value": -2515000000.0, "dataCode": "businessAcqDisposals"}, {"value":
|
||||||
|
10794000000.0, "dataCode": "sbcomp"}, {"value": 11781000000.0, "dataCode":
|
||||||
|
"depamor"}, {"value": -23548000000.0, "dataCode": "capex"}, {"value": -268000000.0,
|
||||||
|
"dataCode": "issrepayDebt"}, {"value": 54520000000.0, "dataCode": "ncfo"},
|
||||||
|
{"value": -29491000000.0, "dataCode": "ncfi"}, {"value": -23000000.0, "dataCode":
|
||||||
|
"ncfx"}], "incomeStatement": [{"value": 39625000000.0, "dataCode": "ebt"},
|
||||||
|
{"value": 34343000000.0, "dataCode": "consolidatedIncome"}, {"value": 0.0,
|
||||||
|
"dataCode": "nonControllingInterests"}, {"value": 51406000000.0, "dataCode":
|
||||||
|
"ebitda"}, {"value": 34231000000.0, "dataCode": "opinc"}, {"value": 39625000000.0,
|
||||||
|
"dataCode": "ebit"}, {"value": 49.16, "dataCode": "epsDil"}, {"value": 5282000000.0,
|
||||||
|
"dataCode": "taxExp"}, {"value": 34343000000.0, "dataCode": "netIncComStock"},
|
||||||
|
{"value": 71896000000.0, "dataCode": "costRev"}, {"value": 34343000000.0,
|
||||||
|
"dataCode": "netinc"}, {"value": 49.59, "dataCode": "eps"}, {"value": 28015000000.0,
|
||||||
|
"dataCode": "sga"}, {"value": 0.0, "dataCode": "intexp"}, {"value": 26018000000.0,
|
||||||
|
"dataCode": "rnd"}, {"value": 0.0, "dataCode": "netIncDiscOps"}, {"value":
|
||||||
|
689687449.0, "dataCode": "shareswa"}, {"value": 161857000000.0, "dataCode":
|
||||||
|
"revenue"}, {"value": 89961000000.0, "dataCode": "grossProfit"}, {"value":
|
||||||
|
0.0, "dataCode": "prefDVDs"}, {"value": 55730000000.0, "dataCode": "opex"}],
|
||||||
|
"balanceSheet": [{"value": 999000000.0, "dataCode": "inventory"}, {"value":
|
||||||
|
2887000000.0, "dataCode": "taxAssets"}, {"value": 0.0, "dataCode": "deposits"},
|
||||||
|
{"value": 14768000000.0, "dataCode": "debtNonCurrent"}, {"value": 123331000000.0,
|
||||||
|
"dataCode": "assetsNonCurrent"}, {"value": 13078000000.0, "dataCode": "investmentsNonCurrent"},
|
||||||
|
{"value": 275909000000.0, "dataCode": "totalAssets"}, {"value": 8182000000.0,
|
||||||
|
"dataCode": "deferredRev"}, {"value": 11860000000.0, "dataCode": "taxLiabilities"},
|
||||||
|
{"value": 84587000000.0, "dataCode": "ppeq"}, {"value": 14768000000.0, "dataCode":
|
||||||
|
"debt"}, {"value": 101177000000.0, "dataCode": "investmentsCurrent"}, {"value":
|
||||||
|
5561000000.0, "dataCode": "acctPay"}, {"value": 25326000000.0, "dataCode":
|
||||||
|
"acctRec"}, {"value": 45221000000.0, "dataCode": "liabilitiesCurrent"}, {"value":
|
||||||
|
18498000000.0, "dataCode": "cashAndEq"}, {"value": -1232000000.0, "dataCode":
|
||||||
|
"accoci"}, {"value": 201442000000.0, "dataCode": "equity"}, {"value": 29246000000.0,
|
||||||
|
"dataCode": "liabilitiesNonCurrent"}, {"value": 152578000000.0, "dataCode":
|
||||||
|
"assetsCurrent"}, {"value": 152122000000.0, "dataCode": "retainedEarnings"},
|
||||||
|
{"value": 74467000000.0, "dataCode": "totalLiabilities"}, {"value": 0.0, "dataCode":
|
||||||
|
"debtCurrent"}, {"value": 114255000000.0, "dataCode": "investments"}, {"value":
|
||||||
|
22603000000.0, "dataCode": "intangibles"}, {"value": 689687449.0, "dataCode":
|
||||||
|
"sharesBasic"}]}, "quarter": 0, "year": 2019}]'
|
||||||
|
headers:
|
||||||
|
allow:
|
||||||
|
- GET, HEAD, OPTIONS
|
||||||
|
content-length:
|
||||||
|
- '10825'
|
||||||
|
content-type:
|
||||||
|
- application/json
|
||||||
|
date:
|
||||||
|
- Sat, 06 Feb 2021 16:23:39 GMT
|
||||||
|
server:
|
||||||
|
- nginx/1.14.0 (Ubuntu)
|
||||||
|
vary:
|
||||||
|
- Accept, Cookie, Origin
|
||||||
|
x-frame-options:
|
||||||
|
- SAMEORIGIN
|
||||||
|
status:
|
||||||
|
code: 200
|
||||||
|
message: OK
|
||||||
|
version: 1
|
||||||
456
tests/fixtures/fundamentals_statements_csv.yaml
vendored
Normal file
456
tests/fixtures/fundamentals_statements_csv.yaml
vendored
Normal file
@@ -0,0 +1,456 @@
|
|||||||
|
interactions:
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept:
|
||||||
|
- '*/*'
|
||||||
|
Accept-Encoding:
|
||||||
|
- gzip, deflate
|
||||||
|
Authorization:
|
||||||
|
- Token 0000000000000000000000000000000000000000
|
||||||
|
Connection:
|
||||||
|
- keep-alive
|
||||||
|
Content-Type:
|
||||||
|
- application/json
|
||||||
|
User-Agent:
|
||||||
|
- tiingo-python-client 0.13.0
|
||||||
|
method: GET
|
||||||
|
uri: https://api.tiingo.com/tiingo/fundamentals/GOOGL/statements?startDate=2020-1-1&endDate=2020-4-1&asReported=false&format=csv
|
||||||
|
response:
|
||||||
|
body:
|
||||||
|
string: 'date,year,quarter,statementType,dataCode,value
|
||||||
|
|
||||||
|
2020-03-31,2020,1,cashFlow,ncfi,-1847000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,balanceSheet,taxAssets,2640000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,incomeStatement,opex,14200000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,incomeStatement,netinc,6836000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,cashFlow,issrepayEquity,-9737000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,balanceSheet,intangibles,22574000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,cashFlow,freeCashFlow,5446000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,cashFlow,ncfx,-272000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,incomeStatement,prefDVDs,0.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,balanceSheet,totalLiabilities,69744000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,cashFlow,ncfo,11451000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,balanceSheet,investments,109952000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,incomeStatement,intexp,0.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,incomeStatement,grossProfit,22177000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,incomeStatement,shareswa,687286090.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,cashFlow,issrepayDebt,-49000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,balanceSheet,debtCurrent,0.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,balanceSheet,assetsCurrent,147018000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,incomeStatement,netIncDiscOps,0.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,balanceSheet,retainedEarnings,151068000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,cashFlow,depamor,3108000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,incomeStatement,revenue,41159000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,balanceSheet,liabilitiesNonCurrent,29555000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,balanceSheet,accoci,-1097000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,cashFlow,capex,-6005000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,cashFlow,sbcomp,3191000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,balanceSheet,cashAndEq,19644000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,cashFlow,ncf,1146000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,cashFlow,businessAcqDisposals,-190000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,balanceSheet,acctRec,21825000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,balanceSheet,sharesBasic,687286090.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,balanceSheet,liabilitiesCurrent,40189000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,incomeStatement,rnd,6820000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,balanceSheet,acctPay,4099000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,incomeStatement,netIncComStock,6836000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,incomeStatement,sga,7380000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,incomeStatement,costRev,18982000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,incomeStatement,epsDil,9.87
|
||||||
|
|
||||||
|
2020-03-31,2020,1,balanceSheet,investmentsCurrent,97585000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,balanceSheet,debt,15492000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,incomeStatement,eps,9.96
|
||||||
|
|
||||||
|
2020-03-31,2020,1,cashFlow,payDiv,0.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,incomeStatement,taxExp,921000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,incomeStatement,ebit,7757000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,cashFlow,investmentsAcqDisposals,3936000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,balanceSheet,deferredRev,7270000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,incomeStatement,consolidatedIncome,6836000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,balanceSheet,taxLiabilities,12199000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,balanceSheet,totalAssets,273403000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,balanceSheet,ppeq,87966000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,cashFlow,ncff,-8186000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,balanceSheet,investmentsNonCurrent,12367000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,balanceSheet,debtNonCurrent,15492000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,incomeStatement,opinc,7977000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,incomeStatement,ebt,7757000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,balanceSheet,equity,203659000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,incomeStatement,nonControllingInterests,0.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,balanceSheet,deposits,0.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,incomeStatement,ebitda,10865000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,balanceSheet,assetsNonCurrent,126385000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,balanceSheet,inventory,889000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,overview,roa,0.129119730854069
|
||||||
|
|
||||||
|
2020-03-31,2020,1,overview,grossMargin,0.538812896328871
|
||||||
|
|
||||||
|
2020-03-31,2020,1,overview,bvps,296.323471350919
|
||||||
|
|
||||||
|
2020-03-31,2020,1,overview,roe,0.174295876869016
|
||||||
|
|
||||||
|
2020-03-31,2020,1,overview,rps,59.8862694864085
|
||||||
|
|
||||||
|
2020-03-31,2020,1,overview,currentRatio,3.65816516957376
|
||||||
|
|
||||||
|
2020-03-31,2020,1,overview,profitMargin,0.538812896328871
|
||||||
|
|
||||||
|
2020-03-31,2020,1,overview,piotroskiFScore,5.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,overview,bookVal,203659000000.0
|
||||||
|
|
||||||
|
2020-03-31,2020,1,overview,longTermDebtEquity,0.076068329904399
|
||||||
|
|
||||||
|
2020-03-31,2020,1,overview,revenueQoQ,0.132639863507526
|
||||||
|
|
||||||
|
2020-03-31,2020,1,overview,epsQoQ,0.0396659707724427
|
||||||
|
|
||||||
|
2019-12-31,2019,4,balanceSheet,totalLiabilities,74467000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,incomeStatement,revenue,46075000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,incomeStatement,epsDil,15.33
|
||||||
|
|
||||||
|
2019-12-31,2019,4,incomeStatement,netinc,10671000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,balanceSheet,sharesBasic,689687449.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,incomeStatement,eps,15.47
|
||||||
|
|
||||||
|
2019-12-31,2019,4,balanceSheet,ppeq,84587000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,incomeStatement,ebitda,14117000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,cashFlow,freeCashFlow,8375000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,cashFlow,issrepayDebt,-47000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,cashFlow,capex,-6052000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,incomeStatement,rnd,7222000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,incomeStatement,sga,8567000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,balanceSheet,investmentsCurrent,101177000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,cashFlow,payDiv,0.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,cashFlow,investmentsAcqDisposals,3370000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,balanceSheet,taxLiabilities,11860000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,cashFlow,ncff,-7326000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,incomeStatement,opinc,9266000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,incomeStatement,nonControllingInterests,0.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,balanceSheet,assetsNonCurrent,123331000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,balanceSheet,taxAssets,2887000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,cashFlow,issrepayEquity,-7297000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,cashFlow,ncfx,68000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,cashFlow,ncfo,14427000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,incomeStatement,grossProfit,25055000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,balanceSheet,debtCurrent,0.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,balanceSheet,retainedEarnings,152122000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,balanceSheet,liabilitiesNonCurrent,29246000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,cashFlow,sbcomp,2645000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,cashFlow,businessAcqDisposals,-2142000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,balanceSheet,liabilitiesCurrent,45221000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,balanceSheet,acctRec,25326000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,balanceSheet,cashAndEq,18498000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,balanceSheet,accoci,-1232000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,cashFlow,depamor,3413000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,balanceSheet,assetsCurrent,152578000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,incomeStatement,shareswa,689687449.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,balanceSheet,investments,114255000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,incomeStatement,prefDVDs,0.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,balanceSheet,intangibles,22603000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,incomeStatement,opex,15789000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,balanceSheet,inventory,999000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,balanceSheet,deposits,0.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,incomeStatement,ebt,10704000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,balanceSheet,investmentsNonCurrent,13078000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,balanceSheet,totalAssets,275909000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,balanceSheet,deferredRev,8182000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,incomeStatement,taxExp,33000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,balanceSheet,debt,14768000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,incomeStatement,costRev,21020000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,balanceSheet,acctPay,5561000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,cashFlow,ncf,2466000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,incomeStatement,netIncDiscOps,0.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,cashFlow,ncfi,-4703000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,balanceSheet,debtNonCurrent,14768000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,incomeStatement,ebit,10704000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,incomeStatement,netIncComStock,10671000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,incomeStatement,intexp,0.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,incomeStatement,consolidatedIncome,10671000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,balanceSheet,equity,201442000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,overview,grossMargin,0.543787303309821
|
||||||
|
|
||||||
|
2019-12-31,2019,4,overview,roa,0.131910509188086
|
||||||
|
|
||||||
|
2019-12-31,2019,4,overview,bookVal,201442000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,overview,bvps,292.077230478933
|
||||||
|
|
||||||
|
2019-12-31,2019,4,overview,profitMargin,0.543787303309821
|
||||||
|
|
||||||
|
2019-12-31,2019,4,overview,revenueQoQ,0.173108259496894
|
||||||
|
|
||||||
|
2019-12-31,2019,4,overview,rps,66.8056234266777
|
||||||
|
|
||||||
|
2019-12-31,2019,4,overview,roe,0.177925719651588
|
||||||
|
|
||||||
|
2019-12-31,2019,4,overview,currentRatio,3.374051878552
|
||||||
|
|
||||||
|
2019-12-31,2019,4,overview,piotroskiFScore,4.0
|
||||||
|
|
||||||
|
2019-12-31,2019,4,overview,longTermDebtEquity,0.073311424628429
|
||||||
|
|
||||||
|
2019-12-31,2019,4,overview,epsQoQ,0.201086956521739
|
||||||
|
|
||||||
|
2019-12-31,2019,0,cashFlow,issrepayEquity,-23161000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,balanceSheet,inventory,999000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,cashFlow,freeCashFlow,30972000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,balanceSheet,taxAssets,2887000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,balanceSheet,deposits,0.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,balanceSheet,debtNonCurrent,14768000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,balanceSheet,assetsNonCurrent,123331000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,incomeStatement,ebt,39625000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,incomeStatement,consolidatedIncome,34343000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,incomeStatement,nonControllingInterests,0.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,balanceSheet,investmentsNonCurrent,13078000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,incomeStatement,ebitda,51406000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,incomeStatement,opinc,34231000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,balanceSheet,totalAssets,275909000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,incomeStatement,ebit,39625000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,cashFlow,ncff,-23209000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,balanceSheet,deferredRev,8182000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,incomeStatement,epsDil,49.16
|
||||||
|
|
||||||
|
2019-12-31,2019,0,balanceSheet,taxLiabilities,11860000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,incomeStatement,taxExp,5282000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,balanceSheet,ppeq,84587000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,cashFlow,investmentsAcqDisposals,-4017000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,balanceSheet,debt,14768000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,incomeStatement,netIncComStock,34343000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,cashFlow,payDiv,0.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,incomeStatement,costRev,71896000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,incomeStatement,netinc,34343000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,balanceSheet,investmentsCurrent,101177000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,balanceSheet,acctPay,5561000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,incomeStatement,eps,49.59
|
||||||
|
|
||||||
|
2019-12-31,2019,0,incomeStatement,sga,28015000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,cashFlow,ncf,1797000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,balanceSheet,acctRec,25326000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,incomeStatement,intexp,0.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,balanceSheet,liabilitiesCurrent,45221000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,balanceSheet,cashAndEq,18498000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,incomeStatement,rnd,26018000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,cashFlow,businessAcqDisposals,-2515000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,balanceSheet,accoci,-1232000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,incomeStatement,netIncDiscOps,0.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,cashFlow,sbcomp,10794000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,cashFlow,depamor,11781000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,balanceSheet,equity,201442000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,balanceSheet,liabilitiesNonCurrent,29246000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,balanceSheet,assetsCurrent,152578000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,cashFlow,capex,-23548000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,balanceSheet,retainedEarnings,152122000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,incomeStatement,shareswa,689687449.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,balanceSheet,totalLiabilities,74467000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,balanceSheet,debtCurrent,0.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,balanceSheet,investments,114255000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,incomeStatement,revenue,161857000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,incomeStatement,grossProfit,89961000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,incomeStatement,prefDVDs,0.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,cashFlow,issrepayDebt,-268000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,cashFlow,ncfo,54520000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,balanceSheet,intangibles,22603000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,cashFlow,ncfi,-29491000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,cashFlow,ncfx,-23000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,incomeStatement,opex,55730000000.0
|
||||||
|
|
||||||
|
2019-12-31,2019,0,balanceSheet,sharesBasic,689687449.0
|
||||||
|
|
||||||
|
'
|
||||||
|
headers:
|
||||||
|
allow:
|
||||||
|
- GET, HEAD, OPTIONS
|
||||||
|
content-length:
|
||||||
|
- '11225'
|
||||||
|
content-type:
|
||||||
|
- text/csv
|
||||||
|
date:
|
||||||
|
- Sat, 06 Feb 2021 16:23:40 GMT
|
||||||
|
server:
|
||||||
|
- nginx/1.14.0 (Ubuntu)
|
||||||
|
vary:
|
||||||
|
- Accept, Cookie, Origin
|
||||||
|
x-frame-options:
|
||||||
|
- SAMEORIGIN
|
||||||
|
status:
|
||||||
|
code: 200
|
||||||
|
message: OK
|
||||||
|
version: 1
|
||||||
119
tests/fixtures/fundamentals_statements_with_as_reported.yaml
vendored
Normal file
119
tests/fixtures/fundamentals_statements_with_as_reported.yaml
vendored
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
interactions:
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept:
|
||||||
|
- '*/*'
|
||||||
|
Accept-Encoding:
|
||||||
|
- gzip, deflate
|
||||||
|
Authorization:
|
||||||
|
- Token 0000000000000000000000000000000000000000
|
||||||
|
Connection:
|
||||||
|
- keep-alive
|
||||||
|
Content-Type:
|
||||||
|
- application/json
|
||||||
|
User-Agent:
|
||||||
|
- tiingo-python-client 0.13.0
|
||||||
|
method: GET
|
||||||
|
uri: https://api.tiingo.com/tiingo/fundamentals/GOOGL/statements?startDate=2020-1-1&endDate=2020-4-1&asReported=true&format=json
|
||||||
|
response:
|
||||||
|
body:
|
||||||
|
string: '[{"date": "2020-02-04", "statementData": {"balanceSheet": [{"value":
|
||||||
|
45221000000.0, "dataCode": "liabilitiesCurrent"}, {"value": 11860000000.0,
|
||||||
|
"dataCode": "taxLiabilities"}, {"value": 25326000000.0, "dataCode": "acctRec"},
|
||||||
|
{"value": 18498000000.0, "dataCode": "cashAndEq"}, {"value": -1232000000.0,
|
||||||
|
"dataCode": "accoci"}, {"value": 152578000000.0, "dataCode": "assetsCurrent"},
|
||||||
|
{"value": 114255000000.0, "dataCode": "investments"}, {"value": 123331000000.0,
|
||||||
|
"dataCode": "assetsNonCurrent"}, {"value": 22603000000.0, "dataCode": "intangibles"},
|
||||||
|
{"value": 2887000000.0, "dataCode": "taxAssets"}, {"value": 999000000.0, "dataCode":
|
||||||
|
"inventory"}, {"value": 0.0, "dataCode": "deposits"}, {"value": 84587000000.0,
|
||||||
|
"dataCode": "ppeq"}, {"value": 13078000000.0, "dataCode": "investmentsNonCurrent"},
|
||||||
|
{"value": 275909000000.0, "dataCode": "totalAssets"}, {"value": 8182000000.0,
|
||||||
|
"dataCode": "deferredRev"}, {"value": 14768000000.0, "dataCode": "debt"},
|
||||||
|
{"value": 101177000000.0, "dataCode": "investmentsCurrent"}, {"value": 5561000000.0,
|
||||||
|
"dataCode": "acctPay"}, {"value": 0.0, "dataCode": "debtCurrent"}, {"value":
|
||||||
|
152122000000.0, "dataCode": "retainedEarnings"}, {"value": 74467000000.0,
|
||||||
|
"dataCode": "totalLiabilities"}, {"value": 29246000000.0, "dataCode": "liabilitiesNonCurrent"},
|
||||||
|
{"value": 14768000000.0, "dataCode": "debtNonCurrent"}, {"value": 687286090.0,
|
||||||
|
"dataCode": "sharesBasic"}, {"value": 201442000000.0, "dataCode": "equity"}],
|
||||||
|
"cashFlow": [{"value": -7326000000.0, "dataCode": "ncff"}, {"value": -47000000.0,
|
||||||
|
"dataCode": "issrepayDebt"}, {"value": 3413000000.0, "dataCode": "depamor"},
|
||||||
|
{"value": -6052000000.0, "dataCode": "capex"}, {"value": -7297000000.0, "dataCode":
|
||||||
|
"issrepayEquity"}, {"value": 68000000.0, "dataCode": "ncfx"}, {"value": 14427000000.0,
|
||||||
|
"dataCode": "ncfo"}, {"value": 2466000000.0, "dataCode": "ncf"}, {"value":
|
||||||
|
0.0, "dataCode": "payDiv"}, {"value": -4703000000.0, "dataCode": "ncfi"},
|
||||||
|
{"value": 2645000000.0, "dataCode": "sbcomp"}, {"value": 3370000000.0, "dataCode":
|
||||||
|
"investmentsAcqDisposals"}, {"value": -2142000000.0, "dataCode": "businessAcqDisposals"},
|
||||||
|
{"value": 8375000000.0, "dataCode": "freeCashFlow"}], "incomeStatement": [{"value":
|
||||||
|
46075000000.0, "dataCode": "revenue"}, {"value": 9266000000.0, "dataCode":
|
||||||
|
"opinc"}, {"value": 15.47, "dataCode": "eps"}, {"value": 687286090.0, "dataCode":
|
||||||
|
"shareswa"}, {"value": 0.0, "dataCode": "nonControllingInterests"}, {"value":
|
||||||
|
0.0, "dataCode": "prefDVDs"}, {"value": 10671000000.0, "dataCode": "netinc"},
|
||||||
|
{"value": 15789000000.0, "dataCode": "opex"}, {"value": 7222000000.0, "dataCode":
|
||||||
|
"rnd"}, {"value": 10704000000.0, "dataCode": "ebt"}, {"value": 8567000000.0,
|
||||||
|
"dataCode": "sga"}, {"value": 33000000.0, "dataCode": "taxExp"}, {"value":
|
||||||
|
15.33, "dataCode": "epsDil"}, {"value": 25055000000.0, "dataCode": "grossProfit"},
|
||||||
|
{"value": 21020000000.0, "dataCode": "costRev"}, {"value": 14117000000.0,
|
||||||
|
"dataCode": "ebitda"}, {"value": 0.0, "dataCode": "netIncDiscOps"}, {"value":
|
||||||
|
10704000000.0, "dataCode": "ebit"}, {"value": 10671000000.0, "dataCode": "netIncComStock"},
|
||||||
|
{"value": 0.0, "dataCode": "intexp"}, {"value": 10671000000.0, "dataCode":
|
||||||
|
"consolidatedIncome"}]}, "quarter": 4, "year": 2019}, {"date": "2020-02-04",
|
||||||
|
"statementData": {"balanceSheet": [{"value": 687286090.0, "dataCode": "sharesBasic"},
|
||||||
|
{"value": 84587000000.0, "dataCode": "ppeq"}, {"value": 101177000000.0, "dataCode":
|
||||||
|
"investmentsCurrent"}, {"value": 11860000000.0, "dataCode": "taxLiabilities"},
|
||||||
|
{"value": 123331000000.0, "dataCode": "assetsNonCurrent"}, {"value": 2887000000.0,
|
||||||
|
"dataCode": "taxAssets"}, {"value": 0.0, "dataCode": "debtCurrent"}, {"value":
|
||||||
|
152122000000.0, "dataCode": "retainedEarnings"}, {"value": 29246000000.0,
|
||||||
|
"dataCode": "liabilitiesNonCurrent"}, {"value": 45221000000.0, "dataCode":
|
||||||
|
"liabilitiesCurrent"}, {"value": 25326000000.0, "dataCode": "acctRec"}, {"value":
|
||||||
|
18498000000.0, "dataCode": "cashAndEq"}, {"value": -1232000000.0, "dataCode":
|
||||||
|
"accoci"}, {"value": 152578000000.0, "dataCode": "assetsCurrent"}, {"value":
|
||||||
|
114255000000.0, "dataCode": "investments"}, {"value": 22603000000.0, "dataCode":
|
||||||
|
"intangibles"}, {"value": 999000000.0, "dataCode": "inventory"}, {"value":
|
||||||
|
0.0, "dataCode": "deposits"}, {"value": 13078000000.0, "dataCode": "investmentsNonCurrent"},
|
||||||
|
{"value": 275909000000.0, "dataCode": "totalAssets"}, {"value": 8182000000.0,
|
||||||
|
"dataCode": "deferredRev"}, {"value": 14768000000.0, "dataCode": "debt"},
|
||||||
|
{"value": 5561000000.0, "dataCode": "acctPay"}, {"value": 74467000000.0, "dataCode":
|
||||||
|
"totalLiabilities"}, {"value": 14768000000.0, "dataCode": "debtNonCurrent"},
|
||||||
|
{"value": 201442000000.0, "dataCode": "equity"}], "cashFlow": [{"value": 30972000000.0,
|
||||||
|
"dataCode": "freeCashFlow"}, {"value": -268000000.0, "dataCode": "issrepayDebt"},
|
||||||
|
{"value": -23548000000.0, "dataCode": "capex"}, {"value": 0.0, "dataCode":
|
||||||
|
"payDiv"}, {"value": -4017000000.0, "dataCode": "investmentsAcqDisposals"},
|
||||||
|
{"value": -23209000000.0, "dataCode": "ncff"}, {"value": -23161000000.0, "dataCode":
|
||||||
|
"issrepayEquity"}, {"value": -23000000.0, "dataCode": "ncfx"}, {"value": 54520000000.0,
|
||||||
|
"dataCode": "ncfo"}, {"value": 10794000000.0, "dataCode": "sbcomp"}, {"value":
|
||||||
|
-2515000000.0, "dataCode": "businessAcqDisposals"}, {"value": 11781000000.0,
|
||||||
|
"dataCode": "depamor"}, {"value": 1797000000.0, "dataCode": "ncf"}, {"value":
|
||||||
|
-29491000000.0, "dataCode": "ncfi"}], "incomeStatement": [{"value": 0.0, "dataCode":
|
||||||
|
"prefDVDs"}, {"value": 49.16, "dataCode": "epsDil"}, {"value": 34343000000.0,
|
||||||
|
"dataCode": "netinc"}, {"value": 49.59, "dataCode": "eps"}, {"value": 51406000000.0,
|
||||||
|
"dataCode": "ebitda"}, {"value": 26018000000.0, "dataCode": "rnd"}, {"value":
|
||||||
|
28015000000.0, "dataCode": "sga"}, {"value": 34231000000.0, "dataCode": "opinc"},
|
||||||
|
{"value": 0.0, "dataCode": "nonControllingInterests"}, {"value": 89961000000.0,
|
||||||
|
"dataCode": "grossProfit"}, {"value": 687286090.0, "dataCode": "shareswa"},
|
||||||
|
{"value": 161857000000.0, "dataCode": "revenue"}, {"value": 55730000000.0,
|
||||||
|
"dataCode": "opex"}, {"value": 39625000000.0, "dataCode": "ebt"}, {"value":
|
||||||
|
5282000000.0, "dataCode": "taxExp"}, {"value": 71896000000.0, "dataCode":
|
||||||
|
"costRev"}, {"value": 0.0, "dataCode": "netIncDiscOps"}, {"value": 39625000000.0,
|
||||||
|
"dataCode": "ebit"}, {"value": 34343000000.0, "dataCode": "netIncComStock"},
|
||||||
|
{"value": 0.0, "dataCode": "intexp"}, {"value": 34343000000.0, "dataCode":
|
||||||
|
"consolidatedIncome"}]}, "quarter": 0, "year": 2019}]'
|
||||||
|
headers:
|
||||||
|
allow:
|
||||||
|
- GET, HEAD, OPTIONS
|
||||||
|
content-length:
|
||||||
|
- '6360'
|
||||||
|
content-type:
|
||||||
|
- application/json
|
||||||
|
date:
|
||||||
|
- Sat, 06 Feb 2021 16:34:49 GMT
|
||||||
|
server:
|
||||||
|
- nginx/1.14.0 (Ubuntu)
|
||||||
|
vary:
|
||||||
|
- Accept, Cookie, Origin
|
||||||
|
x-frame-options:
|
||||||
|
- SAMEORIGIN
|
||||||
|
status:
|
||||||
|
code: 200
|
||||||
|
message: OK
|
||||||
|
version: 1
|
||||||
@@ -226,3 +226,58 @@ class TestNews(TestCase):
|
|||||||
"""Fails because this API key lacks institutional license"""
|
"""Fails because this API key lacks institutional license"""
|
||||||
with self.assertRaises(RestClientError):
|
with self.assertRaises(RestClientError):
|
||||||
assert self._client.get_bulk_news(file_id="1", fmt="object")
|
assert self._client.get_bulk_news(file_id="1", fmt="object")
|
||||||
|
|
||||||
|
# FUNDAMENTALS ENDPOINTS
|
||||||
|
class TestFundamentals(TestCase):
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
self._client = TiingoClient()
|
||||||
|
|
||||||
|
@vcr.use_cassette('tests/fixtures/fundamentals_definitions.yaml')
|
||||||
|
def test_definitions(self):
|
||||||
|
definitions = self._client.get_fundamentals_definitions("GOOGL")
|
||||||
|
assert len(definitions) > 1
|
||||||
|
|
||||||
|
@vcr.use_cassette('tests/fixtures/fundamentals_definitions_csv.yaml')
|
||||||
|
def test_definitions_csv(self):
|
||||||
|
definitions = self._client.get_fundamentals_definitions("GOOGL",
|
||||||
|
fmt='csv')
|
||||||
|
assert len(definitions) > 1
|
||||||
|
|
||||||
|
@vcr.use_cassette('tests/fixtures/fundamentals_daily.yaml')
|
||||||
|
def test_daily(self):
|
||||||
|
daily = self._client.get_fundamentals_daily("GOOGL",
|
||||||
|
startDate='2020-1-1',
|
||||||
|
endDate='2020-4-1')
|
||||||
|
assert len(daily) > 1
|
||||||
|
|
||||||
|
@vcr.use_cassette('tests/fixtures/fundamentals_daily_csv.yaml')
|
||||||
|
def test_daily_with_csv(self):
|
||||||
|
daily = self._client.get_fundamentals_daily("GOOGL",
|
||||||
|
startDate='2020-1-1',
|
||||||
|
endDate='2020-4-1',
|
||||||
|
fmt='csv')
|
||||||
|
assert len(daily) > 1
|
||||||
|
|
||||||
|
@vcr.use_cassette('tests/fixtures/fundamentals_statements.yaml')
|
||||||
|
def test_statements(self):
|
||||||
|
statements = self._client.get_fundamentals_statements("GOOGL",
|
||||||
|
startDate='2020-1-1',
|
||||||
|
endDate='2020-4-1')
|
||||||
|
assert len(statements) > 1
|
||||||
|
|
||||||
|
@vcr.use_cassette('tests/fixtures/fundamentals_statements_with_as_reported.yaml')
|
||||||
|
def test_statements(self):
|
||||||
|
statements = self._client.get_fundamentals_statements("GOOGL",
|
||||||
|
startDate='2020-1-1',
|
||||||
|
endDate='2020-4-1',
|
||||||
|
asReported=True)
|
||||||
|
assert len(statements) > 1
|
||||||
|
|
||||||
|
@vcr.use_cassette('tests/fixtures/fundamentals_statements_csv.yaml')
|
||||||
|
def test_statements_with_csv(self):
|
||||||
|
statements = self._client.get_fundamentals_statements("GOOGL",
|
||||||
|
startDate='2020-1-1',
|
||||||
|
endDate='2020-4-1',
|
||||||
|
fmt='csv')
|
||||||
|
assert len(statements) > 1
|
||||||
|
|||||||
@@ -428,3 +428,85 @@ class TiingoClient(RestClient):
|
|||||||
return response.content.decode("utf-8")
|
return response.content.decode("utf-8")
|
||||||
else:
|
else:
|
||||||
return response.json()
|
return response.json()
|
||||||
|
|
||||||
|
# FUNDAMENTAL DEFINITIONS
|
||||||
|
# tiingo/fundamentals/definitions
|
||||||
|
def get_fundamentals_definitions(self, tickers=[], fmt='json'):
|
||||||
|
"""Return definitions for fundamentals for specified tickers
|
||||||
|
https://api.tiingo.com/documentation/fundamentals
|
||||||
|
|
||||||
|
Args:
|
||||||
|
tickers [string] : optional, either list or string
|
||||||
|
fmt (string): 'csv' or 'json'
|
||||||
|
"""
|
||||||
|
url = "tiingo/fundamentals/definitions"
|
||||||
|
params = {
|
||||||
|
'tickers': tickers,
|
||||||
|
'format': fmt
|
||||||
|
}
|
||||||
|
response = self._request('GET', url, params=params)
|
||||||
|
if fmt == 'json':
|
||||||
|
return response.json()
|
||||||
|
elif fmt == 'csv':
|
||||||
|
return response.content.decode("utf-8")
|
||||||
|
|
||||||
|
# FUNDAMENTAL DAILY
|
||||||
|
# tiingo/fundamentals/<ticker>/daily
|
||||||
|
def get_fundamentals_daily(self, ticker, fmt='json',
|
||||||
|
startDate=None, endDate=None):
|
||||||
|
"""Returns metrics which rely on daily price-updates
|
||||||
|
https://api.tiingo.com/documentation/fundamentals
|
||||||
|
|
||||||
|
# Dates are in YYYY-MM-DD Format.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
tickers [string] : List of unique Stock Tickers to search
|
||||||
|
startDate, endDate [date]: Boundaries of search window
|
||||||
|
fmt (string): 'csv' or 'json'
|
||||||
|
"""
|
||||||
|
url = 'tiingo/fundamentals/{}/daily'.format(ticker)
|
||||||
|
params = {
|
||||||
|
'startDate': startDate,
|
||||||
|
'endDate': endDate,
|
||||||
|
'format': fmt
|
||||||
|
}
|
||||||
|
response = self._request('GET', url, params=params)
|
||||||
|
if fmt == 'json':
|
||||||
|
return response.json()
|
||||||
|
elif fmt == 'csv':
|
||||||
|
return response.content.decode("utf-8")
|
||||||
|
|
||||||
|
# FUNDAMENTAL STATEMENTS
|
||||||
|
# tiingo/fundamentals/<ticker>/statements
|
||||||
|
def get_fundamentals_statements(self, ticker, asReported=False, fmt='json',
|
||||||
|
startDate=None, endDate=None):
|
||||||
|
"""Returns data that is extracted from quarterly and annual statements.
|
||||||
|
https://api.tiingo.com/documentation/fundamentals
|
||||||
|
|
||||||
|
# Dates are in YYYY-MM-DD Format.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
tickers [string] : List of unique Stock Tickers to search
|
||||||
|
startDate, endDate [date]: Boundaries of search window
|
||||||
|
asReported [bool]: get most-recent data (False) or data \
|
||||||
|
as it was reported on the release-date
|
||||||
|
(True)
|
||||||
|
fmt (string): 'csv' or 'json'
|
||||||
|
"""
|
||||||
|
if asReported:
|
||||||
|
asReported = 'true'
|
||||||
|
else:
|
||||||
|
asReported = 'false'
|
||||||
|
|
||||||
|
url = 'tiingo/fundamentals/{}/statements'.format(ticker)
|
||||||
|
params = {
|
||||||
|
'startDate': startDate,
|
||||||
|
'endDate': endDate,
|
||||||
|
'asReported': asReported,
|
||||||
|
'format': fmt
|
||||||
|
}
|
||||||
|
response = self._request('GET', url, params=params)
|
||||||
|
if fmt == 'json':
|
||||||
|
return response.json()
|
||||||
|
elif fmt == 'csv':
|
||||||
|
return response.content.decode("utf-8")
|
||||||
|
|||||||
Reference in New Issue
Block a user