make_returns: Assets – An Asset has type: Time -> Time -> Return

Description Usage Arguments Details Value

View source: R/asset.R

Description

An asset is identified with an accumulator. It takes an increment and returns the asset's percent change over that increment.

Usage

1

Arguments

x

a vector of prices

Details

An asset should in addition have as an attribute 'dates' the vector of dates over which it is defined. If left as 'NULL' it is assumed to be valid for any date. Compute absolute returns of an asset

Computes the absolute returns of an asset given its prices over some regular period, that is \frac{x_k - x_{k-1}}{x_{k-1}}.

Value

a vector of absolute returns


ryanholbrook/investmentsim documentation built on Nov. 5, 2019, 5:10 a.m.