Learn R Programming

bootTimeInference (version 0.1.0)

bootTimeInference: calculate bootstrap inference

Description

calculate bootstrap inference

Usage

bootTimeInference(ret, b, M, Delta_null = 0)

Arguments

ret
refers to a returns matrix (columns = 2)
b
blocksize to use. Choose the optimal blocksize by blockSizeCalibrate
M
number of bootstrap resamples (see Eq. 9 in vignette)
Delta_null
refers to null hypothesis, where Delta means the difference in sharpe ratio

Value

a list with estimated difference in sharpe ratio and p-value of the test with Delat_null as null hypothesis

Examples

Run this code
## Not run: 
# DATA <- bootTimeInference:::ret.hedge
# opt <- blockSizeCalibrate(DATA, b_vec = c(1,2,4,6,8,10), K = 5000)
# bootTimeInference(DATA, b = opt$b.optimal, M = 4999)
# ## End(Not run)
DATA <- bootTimeInference:::ret.hedge
# small example, please choose an appropiate K (see vignette)
opt <- blockSizeCalibrate(DATA, b_vec = c(1,2,4,6), K = 10)
bootTimeInference(DATA, b = opt$b.optimal, M = 4999)

Run the code above in your browser using DataLab