How to Download Stocks on Schedule Using R


Introduction

In order to assess stocks before buying them or to evaluate performance of stocks that you might own, you have to be able to download data about the stocks regularly. This post demonstrates how to schedule stock downloads using R.

Downloading Stocks

To download stock history, we use the package, tidyquant, together with a couple of helper packagesm namely pacman and yaml. The pacman package provides a convenient way of ensuring that the required packages are installed, and if they have not been installed, install them from CRAN. This code will load the packages.

#next line is just to