averagereturn: Average (log) return of a time series of prices

Description Usage Arguments Value Examples

View source: R/summary_stats.R

Description

This function generates a time series of log-returns and while requiring as an input a time series of prices. In the end, the return scaled to an annual return by multplying it by 252.

Usage

1
averagereturn(backtest)

Arguments

backtest

A data frame or a matrix containing time series of prices. If there are several prices provided, only the first one will be used.

Value

A numeric output giving the average annualized return as a decimal number.

Examples

1
2

MatthiasSpeicher/gryffindorrobo documentation built on Dec. 27, 2019, 2:15 a.m.