Is it possible to download stock-data countrywise with quantmod package for R ?

Hi, I'm wondering if it's possible to download equities countrywise.

Let's say i want all data from the Finnish market.

All Finnish stock symbols ends with .HE, so what I want is

getSymbols("all stocks that ends with .HE", ...)

Thanks !


2 Answers 2


I don't have perfect solution for above problem, I but can help you out with the alternative. As far as my information you can't download the data country wise. I was also looking for the same. You should have all the symbols first in place. I have prepared a small code which loop through the all available symbols and get historical data from Yahoo.

startDate = "2000-01-01"
thePath = " * "

for (ii in theInstruments){
  data = getSymbols(Symbols = ii, 
                    src = "yahoo", 
                    from = startDate, 
                    auto.assign = FALSE)
  colnames(data) = c("open","high","low","close","volume","adj.")

Regarding symbols that you can easily download from exchange and save it, It's a one time job. Rest you can use the above code to get the data life long. I have created database using above code only.


A way is to loop through a list of symbols.

lisym <- c("ELI1V.HE", "KRA1V.HE")
ELI1V <- get("ELI1V.HE")

or prepare the symbol names in csv file n loop thru it.

lisym <- readLines("stocks.csv")


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.