How to get financials of firms listed at TESA in quantmod?

662 views Asked by At

I'm trying to retrieve financials for firms listed at Tel Aviv Stock Exchange, e.g.: LUMI (Bank Leumi), by quantmod using source=yahoo.

Here is the error I get:

getFin("LUMI",src="yahoo") Error in thead[x]:thead[x + 1] : NA/NaN argument

I also tried:

getFin("LUMI.TA",src="yahoo") Error in thead[x]:thead[x + 1] : NA/NaN argument

It seems that getFin does not work for foreign firms, any lead?

1

There are 1 answers

1
dragon On BEST ANSWER

First query: Check if the symbol you are searching in Google Finance has financials (as a link/tab) under the Company tab on the left.

getFin/getFinancials is essentially query searching for this through the API configuration.

Also, note that yahoo is overridden by google even after assigning src = "yahoo". Check ?getFin in the console to confirm. It says under the description in help: Download Income Statement, Balance Sheet, and Cash Flow Statements from Google Finance.

If the company's financial statements are not recorded under the U.S. Securities and Exchange Commission, check here: SEC: Enter Company Symbol under Fast Search to see if the European company has filings under the SEC.

For example NVS - Novartis works, unlike LUMI or Nestlé (NSRGY).

library(quantmod)
myData <- new.env()
class(myData)
ls(myData)
NVS <- getFinancials('NVS',  env = myData, src = "yahoo", auto.assign=TRUE)
viewFinancials(NVS.f, type= 'IS', period = 'Q') #Options `type=c('BS','IS','CF'), period=c('A','Q')`

Output from: viewFinancials(NVS.f, type= 'IS', period = 'Q') (Truncated output data for view purposes).

> viewFinancials(NVS.f, type= 'IS', period = 'Q')
Quarterly Income Statement for NVS

                                                 2014-12-31 2014-09-30 2014-06-30
Revenue                                            13354.00   13300.00   26980.00
Other Revenue, Total                                     NA         NA         NA
Total Revenue                                      13354.00   13300.00   26980.00
Cost of Revenue, Total                              4416.00    4421.00    8508.00
Gross Profit                                        8938.00    8879.00   18472.00
Selling/General/Admin. Expenses, Total              3965.00    3565.00    7463.00
Research & Development                              2537.00    2161.00    4388.00

You can get what you need off the BS, IS, or CF by doing the following:

> NVS_Q <- viewFinancials(NVS.f, type= 'IS', period = 'Q')
Quarterly Income Statement for NVS
> Revenue2014_12_31 <- NVS_Q[1,1]
> Revenue2014_12_31
[1] 13354