ror: Accounting rolling returns

Description Usage Arguments Value Examples

Description

Accounting rolling rate of returns (years, months, days)

Usage

1
2
3
4
5
ror_y(xts, k)

ror_m(xts, k)

ror_d(xts, k)

Arguments

xts

time series dataset produced by xts. Should be satisfied "ymd" term of index(xts).

k

an integer vector.

Value

xts about returns dataset.

Examples

1
2
3
4
5
6
7
ror_y(sample_index2, 1)
ror_m(sample_index2, 1)
ror_d(sample_index2, 1)

ror_y(sample_index2, 2)
ror_m(sample_index2, 15)
ror_d(sample_index2, 50)

lovetoken/useful.lovetoken documentation built on June 14, 2019, 3:21 p.m.