aggregate_merge_bictoincharts_data: Aggregate and merge time series data downloaded from...

View source: R/aggregate_merge_data_bitcoincharts.R

aggregate_merge_bictoincharts_dataR Documentation

Aggregate and merge time series data downloaded from bitcoincharts

Description

This function aggregates and merges time series data downloaded from bitcoincharts

Usage

aggregate_merge_bictoincharts_data(
  data_list,
  level_of_aggregation = "minutes",
  aggregate_every = 15
)

Arguments

data_list

is a list containing the dataframes of several time series data downloaded from bitcoincharts

level_of_aggregation

can be 'seconds', 'minutes' or 'hours'

aggregate_every

defines how many intervals to aggregate (depends on level_of_aggregation)

Details

This function aggregates and merges time series data downloaded from bitcoincharts and provided to the function as a list. It returns a list containing the dataframe with the merged price data according to the desired level of aggregation at the intraday level, as well as a dataframe with the merged daily data returns.

Value

results a list containing the merged intraday bitcoin prices (an xts object) and their daily returns (an xts object)

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)

## End(Not run)


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