Hi: I'm using R to start learning about quantitative finance. I'm good at R, just learning finance. Some stocks on the TSX have periods in their names, usually indicating that it's a class B share, for example. The usual functions to download stock data seem to crash on these characters. Thoughts?

#load library
#these work
getSymbols('AQN', src='yahoo')
#These don't
getSymbols('ATD.B', src='yahoo')
  • $\begingroup$ Aren't you looking for ATD-B.TO? $\endgroup$ Jan 30, 2017 at 21:44

1 Answer 1


I believe your symbol ATD.B is returning not found. In Yahoo a dot usually precedes the Exchange (eg. AQN.TO refers to Algonquin, Toronto Exchange). A minus sign (or dash) precedes the class: e.g. RDS-B refers to Royal Dutch, class B. So Try using ATD-B or ATD-B.TO instead of ATD.B.

  • $\begingroup$ HI: OK, that works for most except there are a few securities that are still causing problems. $\endgroup$
    – spindoctor
    Jan 31, 2017 at 14:14
  • $\begingroup$ For example, securities that are labelled "-UN.TO" are choking on this. But when I go to the Yahoo Finance website, they do just fine. Examples: BBU-UN.TO and NVU-UN.TO. It seems like these are both real estate trusts. Thoughts? $\endgroup$
    – spindoctor
    Jan 31, 2017 at 14:15
  • $\begingroup$ Interestingly enough I was unable to download a history .csv file for BBU-UN even through manual web site lookup (although I was able to get yesterday's quote). Maybe a problem with Yahoo? Or they just don't have history for these stocks? $\endgroup$
    – nbbo2
    Jan 31, 2017 at 16:32

Your Answer

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

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