add_adj_price | R Documentation |
Add adjusted prices to dividens to an xts object
add_adj_price(x, symbol, start_date, end_date)
x |
xts object (data frames will be converted to xts) |
symbol |
the symbol of the company |
start_date |
The start date of the query. Date is a string that needs to be in yyyy-mm-dd format |
end_date |
The end date of the query. Date is a string that needs to be in yyyy-mm-dd format |
xts object with adjusted prices
start_d <- "2022-01-01"
end_d <- "2023-01-01"
symbol <- 2222
get_company_records(start_date = start_d, end_date = end_d, company_symbol = symbol) |>
df_to_xts() |>
add_adj_price(symbol = symbol, start_date = start_d, end_date = end_d)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.