View source: R/positive_definite_realized_covariances.R
rc_pd | R Documentation |
This function computes the realized covariance of an xts object containing bitcoin intraday prices and regularize them if not positive definite
rc_pd(price_xts)
price_xts |
is a xts object containing intraday bitcoin prices (2 series or more) |
This function computes the realized covariance of an xts object containing bitcoin intraday prices and regularize them if not positive definite, as done in Hautsch, N., L. Kyj, and R. Oomen (2012)
final_rc a list containing the (potentially regularized) realized covariances
Hautsch, N., L. Kyj, and R. Oomen (2012). A blocking and regularization approach to high-dimensional realized covariance estimation. Journal of Applied Econometrics, 27, 625–645
## Not run:
library(highfrequency)
localbtcMXN <-bitcoincharts_single_download(name = "localbtcMXN.csv.gz")
btcdeEUR <-bitcoincharts_single_download(name = "btcdeEUR.csv.gz")
krakenEUR <-bitcoincharts_single_download(name = "krakenEUR.csv.gz")
localbtcINR <-bitcoincharts_single_download(name = "localbtcINR.csv.gz")
coinbaseUSD <-bitcoincharts_single_download(name = "coinbaseUSD.csv.gz")
data5<-list(localbtcMXN =localbtcMXN, btcdeEUR=btcdeEUR, krakenEUR=krakenEUR,
localbtcINR=localbtcINR, coinbaseUSD=coinbaseUSD)
data_clean<-aggregate_merge_bictoincharts_data(data_list=data5)
cleaned.rc <- rc_pd(data_clean$price_ts)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.