Return.convert: Convert coredata content from one type of return to another

Description Usage Arguments Author(s) See Also Examples

View source: R/Return.convert.R

Description

This function takes an xts object, and using its attribute information, will convert information in the object into the desired output, selected by the user. For example, all combinations of moving from one of 'discrete', 'log', 'difference' and 'level', to another different data type (from the same list) are permissible.

Usage

1
2
3
4
5
6
Return.convert(
  R,
  destinationType = c("discrete", "log", "difference", "level"),
  seedValue = NULL,
  initial = TRUE
)

Arguments

R

an xts object

destinationType

one of 'discrete', 'log', 'difference' or 'level'

seedValue

a numeric scalar indicating the (usually initial) index level or price of the series

initial

(default TRUE) a TRUE/FALSE flag associated with 'seedValue', indicating if this value is at the begginning of the series (TRUE) or at the end of the series (FALSE)

Author(s)

Erol Biceroglu

See Also

Return.calculate

Examples

1
# TBD

PerformanceAnalytics documentation built on Feb. 6, 2020, 5:11 p.m.