information_shares: Computes the information shares according to the approach by...

View source: R/information_share.R

information_sharesR Documentation

Computes the information shares according to the approach by Brandvold et al. (2015)

Description

This function computes the information shares according to the approach by Brandvold et al. (2015)

Usage

information_shares(dat, pi, opt_method = "nlminb")

Arguments

dat

is a dataframe where the first column contains the date in Y-m-d format, while the remaining columns the cryptocurrency prices from different exchanges

pi

is a vector containing the activity shares of all exchanges. The activity share is defined as the fraction of trades that happened on a single exchange, or simply, the probability that a trade took place on that exchange. See Brandvold et al. (2015) for details.

opt_method

is a character string specifying the optimization algorithm for inner loop optimization with the auglag function from the alabama package. Default is "nlminb".

Details

This function computes the information shares according to the approach by Brandvold et al. (2015) and returns a dataframe with information shares (first column) and the parameters PSI (second column) which represent the covariances between the fundamental news component and the idiosyncratic component for each exchange

Value

fin_est is a dataframe with information shares (first columns) and the parameters PSI (second columns) which are the covariances between the fundamental news component and the idiosyncratic component for each exchange

Examples

data_file<-system.file("extdata", "btcusd_IS.csv", package = "bitcoinFinance")
dat<-read.csv(file = data_file,header = TRUE,sep = ";",dec = ".")

#Vector of activity shares based on trading volumes and trades frequency
pivector<-c(0.33,0.06,0.48,0.11,0.02)
information_shares(dat,pi=pivector, opt_method="nlminb")

# Robustness check:
# Vector of activity shares for simplicity set to 1/n for all 5 exchanges
# n<-ncol(dat)-1
# pivector<-c(rep(1/n,n))
# information_shares(dat,pi=pivector, opt_method="nlminb")

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