rc_pd: Compute the realized covariance of an xts object containing...

View source: R/positive_definite_realized_covariances.R

rc_pdR Documentation

Compute the realized covariance of an xts object containing bitcoin intraday prices and regularize them if not positive definite

Description

This function computes the realized covariance of an xts object containing bitcoin intraday prices and regularize them if not positive definite

Usage

rc_pd(price_xts)

Arguments

price_xts

is a xts object containing intraday bitcoin prices (2 series or more)

Details

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)

Value

final_rc a list containing the (potentially regularized) realized covariances

References

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

Examples

## 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)


deanfantazzini/bitcoinFinance documentation built on June 12, 2024, 4:10 p.m.