Description Usage Arguments Details Value Examples
Fill missing values for a return time-series
1 | fill_na_ret(x, rpl = 0)
|
x |
xts with returns |
rpl |
value to replace missing values |
Missing values at the beginning of the time-series are persevered. Only the missing values after a non-missing value are replaced. E.g., the series NA, NA, 1, 5, NA, 7 would be replaced with NA, NA, 1, 5, 0, 7.
x
with NAs replaced by rpl
1 2 | fill_na_ret(x)
fill_na_ret(x, median(x, TRUE))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.