download_sp500_hist_data: Download all the S&P historical data it use the...

Description Usage Arguments

View source: R/historical_data.R

Description

Download all the S&P historical data it use the get_one_ticker function to all the S&P500 tickers

Usage

1
2
3
4
5
download_sp500_hist_data(folder_to_save, start_date = "1900-01-01",
  end_date = Sys.Date(), mas = c(50, 100, 200), emas = c(3, 5, 7,
  14), keepma = T, keepema = T, addmacd = T, addrsi = T,
  remove_nas = T, calc_diff = T, add_boilinger = T,
  add_macd_cross = T)

Arguments

folder_to_save

Path of the folder where data should be save

start_date

The first date of the historical data

end_date

The last date of the data

mas

List of the simple moving averages to calculate

emas

List of the exponentional moving averages to calculate

keepma

Logical value if it is F it will delete the actual ma values

keepema

Logical value if it is F it will delete the actual ema values

addmacd

Calculate macd nFast=12, nSlow=26,nSig=9

addrsi

Add relativ sthrength index n=14

remove_nas

Remove all na values after calculating every sma, ema, rsi, etc

calc_diff

If it false it does not calculate the sma and ema

add_boilinger

Adding the diff from the boilinger bands

add_macd_cross

Adding if the macd is crossed


misrori/getrich documentation built on Jan. 3, 2021, 7:21 p.m.