R script for fetching sp500 prices