zpp_general: Compute the general version of the ZPP

View source: R/zpp.R

zpp_generalR Documentation

Compute the general version of the ZPP

Description

This function computes the general version of the ZPP by simulating a number of trajectories (total number is given by scenarios) over n.days time-steps, given an estimated GARCH model

Usage

zpp_general(
  prices,
  mean.model = list(armaOrder = c(0, 0)),
  variance.model = list(garchOrder = c(1, 1)),
  distribution.model = "norm",
  n.days = 250,
  scenarios = 20000
)

Arguments

prices

is a numeric vector containing the prices series

mean.model

is a list specifying the ARMA order for ugarchspec

variance.model

is a list containing the variance model specification for ugarchspec

distribution.model

is the conditional density to use for the innovations. See ugarchspec for details

n.days

is the number of time-steps

scenarios

is the total number fo trajectories

Value

zpp is the estimated ZPP

Examples

btc_data<-dat<-bitcoinity_download(currency="USD", data_type="price",
               exchange="coinbase",time_length = "2y")
prices<-btc_data$avg
zpp<-zpp_general(prices)
zpp

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