LR_cp: Function to compute Left risk measure.

View source: R/my_functions.R

LR_cpR Documentation

Function to compute Left risk measure.

Description

Function to compute Left risk measure.

Usage

LR_cp(data, FT, ov)

Arguments

data

A (T x N) matrix or data.frame containing the N time series over period T

FT

Window size.

ov

umber of different days for two consecutive time windows.

Value

A (N x T) data.frame containing the LR_cp measure for the N time series over time windows

Examples



LR <- LR_cp(sample.data, FT= 1290, ov = 125)
df <- as.data.frame(matrix(unlist(LR), nrow = length(LR), ncol = ncol(sample.data)))
colnames(df) <- c(paste("tw", rep(1:16)))
plot(df[,1], pch=19, col=asset.label$label, ylab="LR_cp", xlab="ETFs")



INFOSET documentation built on April 4, 2025, 2:27 a.m.