How to use R behind a proxy to get data from Yahoo.Finance and Quandl

Home Forums Quantitative Methods and Programming How to use R behind a proxy to get data from Yahoo.Finance and Quandl

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1453
    Vasily Nekrasov
    Participant

    If you are connected to the Internet via proxy server, you will experience inconvenience working with R. In particular, by default you will neither be able to download the data, nor even install packages from web.

    To circumvent this inconvenience, start R with key –internet2 , i.e. Rgui.exe –internet2
    Now you can install the libraries and get data from yahoo finance by means of quantmod.

    However, if you use Quandl (which relies on curl) it won’t help.
    In this case you need to know the parameter of you proxy-server (ask you system administrator or have a look at http://wpad/wpad.dat).

    Sys.setenv(http_proxy="http://your_http_proxy:port") 
    Sys.setenv(https_proxy="https://your_https_proxy:port")   
    library(httr)
    set_config(config(ssl_verifypeer = 0L))
    #11078

    One can also figure out the proxy configuration as follows:
    1) run command prompt (cmd) as administrator
    2) netsh winhttp show proxy

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.