Skip to contents

The average USD market price across major bitcoin exchanges.

Usage

bitcoin

Format

A data frame with 1354 rows and 2 variables:

date

POSIXct,POSIXt (TZ: "UTC") from 2019-01-02 to 2023-10-28

price

The average USD market price across major bitcoin exchanges

Source

<https://www.blockchain.com/explorer/charts/market-price>

Examples

# \donttest{
if (!requireNamespace("ggplot2", quietly = TRUE)) utils::install.packages(
  "ggplot2", repos = "https://cloud.r-project.org", quiet = TRUE
)

ggplot2::ggplot(bitcoin, ggplot2::aes(x = date, y = price)) +
  ggplot2::geom_line()


result <- suppressWarnings(
  fastcpd.garch(diff(log(bitcoin$price[200:500])), c(1, 1), beta = "BIC")
)
#> Registered S3 method overwritten by 'quantmod':
#>   method            from
#>   as.zoo.data.frame zoo 
#> Residual calculation failed.
summary(result)
#> 
#> Call:
#> fastcpd.garch(data = diff(log(bitcoin$price[200:500])), order = c(1, 
#>     1), beta = "BIC")
#> 
#> Change points:
#> 191 
#> 
#> Cost values:
#> -330.4159 -191.976 
bitcoin$date[result@cp_set + 200]
#> [1] "2013-04-11 UTC"
plot(result)

# }