View source: R/information_share.R
information_shares | R Documentation |
This function computes the information shares according to the approach by Brandvold et al. (2015)
information_shares(dat, pi, opt_method = "nlminb")
dat |
is a dataframe where the first column contains the date in |
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 |
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
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
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.