return_rate: Return rate

Description Usage Arguments

Description

Return rate

Usage

1
return_rate(stock.price, type = "raw", days = NA)

Arguments

stock.price

Vector of a stock price series, time level could be 1day, 1hour or 1min.

type

Value of type muste be one of 'raw','day' and 'year'. When type equals to 'raw' then calculate the total return rate, when type equals to 'day' then calculate daily return rate, when type equals to year then calculate annual return rate.

days

Time span of day of the input stock data. If type is set to 'day' or 'year', this value must given.


purplezippo/quantler documentation built on May 15, 2019, 4:27 p.m.