使用R(I' m R新手)。我安装了stockPortfolio和quadProg软件包。
我试图运行returns <- getReturns(names(stocks), freq="week")
但是我收到了错误:
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") : cannot open: HTTP status was '404 Not Found'
如何排除故障并解决此问题。
答案 0 :(得分:1)
尝试使用以下命令:
returns <- getReturns(stocks, freq="week")
现在不应该给出错误。