md_stock_adjust adjusts the open, high, low and close stock prices for split and dividend.

md_stock_adjust(dt, source, adjust = "split", adjfactor = NULL)



a list/dataframe of time series datasets that didnt adjust for split or dividend.


the available data sources are 'yahoo' ( and '163' (


adjust the OHLC prices for split (default), or dividend (both split and dividend). If it is NULL, return the original data. For the yahoo data, the original data already adjust for split, and use the 'close_adj' column to adjust; for the 163 data, the original doesnot adjust any factors, and use the splits, dividends and issues to adjust.


adjust factors, including splits and dividends. Defaults to NULL, which will load adjust factors from source. It can also download from md_stock when type set as adjfactor.


# \donttest{ dt = md_stock('600547', source = '163', date_range = 'max', type = 'history', adjust = NULL)
#> 1/1 600547
ds = md_stock('600547', source = '163', date_range = 'max', type = 'adjfactor')
#> 1/1 600547
dtadj = md_stock_adjust(dt, source = '163', adjust = 'dividend', adjfactor = ds) # }