realizedLoss: Calcuate Realized Loss

Description Usage Arguments Value See Also

View source: R/backtest.R

Description

This generic function is an internal function used by backtest to calculate realized loss given various types of dataset.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
realizedLoss(data, TimeLen, ...)

## S3 method for class 'portfolioData'
realizedLoss(data, TimeLen, ...)

## S3 method for class 'optionsData'
realizedLoss(data, TimeLen, V0 = NULL, ...)

## S3 method for class 'stocksData'
realizedLoss(data, TimeLen, V0 = NULL, ...)

Arguments

data

an object of structured dataset.

TimeLen

the time horizon the losses are defined over, in days.

...

arguments to be passed to or from methods.

V0

the total value the losses are defined upon.

Value

A matrix of realized losses.

See Also

backtest


zhangkd5/riskCalc documentation built on May 4, 2019, 10:16 p.m.