Simple function of quantmod not working anymore

前端 未结 1 1463
孤城傲影
孤城傲影 2021-02-13 16:56

I am turning in my thesis tomorow and I\'m getting a very bizzare error message with quantmod which I never had during the last weeks while working with this package. I can\'t m

1条回答
  •  孤独总比滥情好
    2021-02-13 17:04

    For some reason, yahoo does not currently provide that data. You can see on the yahoo website that it currently says "Historical quote data is unavailable for the specified date range."

    I do not know ifthis is temporary or permanent, but I would guess that it is temparary because as you noted, "^NDX" still works. Since today is a holiday in the United States, it is possible that Yahoo is doing maintenance.

    If it becomes available before it is too late for you, I would suggest saving the data either with save or with FinancialInstrument:::saveSymbols.common so that you could load it back using getSymbols(*, src='FI')

    If it's not up by the time you need it, you have a couple alternatives that may or may not suit your needs. You could use getSymbols.FRED to get the closing values of the index since 1886

    getSymbols("DJIA", src='FRED')
    

    Or, you could use the DIA ETF which is actually tradeable and is a decent proxy for the index

    getSymbols("DIA", src='yahoo')
    

    0 讨论(0)
提交回复
热议问题