[R-SIG-Finance] Getting historical stock prices from irregular tickers in Quantmod package

Joshua Ulrich josh.m.ulrich at gmail.com
Thu Jul 10 13:52:09 CEST 2014


On Thu, Jul 10, 2014 at 6:45 AM, Berk Orbay <berkorbay at gmail.com> wrote:
> I have a problem and could not find any mention of it anywhere (maybe I
> overlooked a term). When using Quantmod's getSymbols function I am having
> trouble to get details on the tickers. To illustrate,
>
> getSymbols("XU030",src="google")
> XU030
>
> works fine to get historical prices but when the symbol becomes IST::KOZAA-E
>
> https://www.google.com/finance/historical?q=IST%3A%3AKOZAA-E&ei=kXq-U_PpFs-uwAPt9YCYCg
>
> getSymbols("IST::KOZAA-E",src="google")
>
> is also fine but since I cannot write IST::KOZAA-E to console I cannot
> reach the historical prices.
>
> I can use ^GSPC from Yahoo but the package deletes ^ when importing.
>
> Is there any way to get info from weird symbols?
>
Use backticks (see the "Names and Identifiers" section of ?Quotes).
Or set auto.assign=FALSE in getSymbols and assign it to a new name.

> head(Cl(`IST::KOZAA-E`))
           IST::KOZAA-E.Close
2013-06-17               3.67
2013-06-18               3.62
2013-06-19               3.65
2013-06-20               3.34
2013-06-21               3.26
2013-06-24               2.91

Best,
--
Joshua Ulrich  |  about.me/joshuaulrich
FOSS Trading  |  www.fosstrading.com



More information about the R-SIG-Finance mailing list