I am trying to extract income statements from Google using quantmod. It works perfectly fine with US stocks but I ran into trouble when I tried non-US stocks (e.g. stocks from Hong Kong). For example:
#US stocks: (no issues here)
library(quantmod)
getFin("AAPL") #Get financial statement for Apple, symbol ="AAPL"
head(viewFin(AAPL.f, "IS", "Q"))
# HK stocks:
getFin('0005:HKG') #Get financial statement for HSBC , symbol ="0005.HKG"
viewFin(0005:HKG.f, "IS", "Q")
The following error appears if I use a Hong Kong stock
Error in inherits(x, "financials") : object 'HKG.f' not found
How do I get around this problem ? Thanks in Advance