md_stock_adjust
adjusts the open, high, low and close stock prices for split and dividend.
md_stock_adjust(dt, adjust = FALSE, forward = TRUE, ...)
a list/dataframe of time series datasets that didnt adjust for split or dividend.
whether to adjust the OHLC prices, defaults to FALSE. If it is NULL, return the original data; if it is FALSE, create close_adj or change_pct column if not exist; if it is TRUE, adjust all open, high, low, close columns. The adjustment is based on the cumulative products of close/close_prev.
forward adjust or backward adjust, defaults to TRUE.
Additional parameters.
# \donttest{
data("dt_banks")
dtadj1 = md_stock_adjust(dt_banks, adjust = FALSE)
dtadj2 = md_stock_adjust(dt_banks, adjust = TRUE)
# }