Usage
periodReturn(x,
period='monthly',
subset=NULL,
type='arithmetic',
leading=TRUE,
...)dailyReturn(x, subset=NULL, type='arithmetic',
leading=TRUE, ...)
weeklyReturn(x, subset=NULL, type='arithmetic',
leading=TRUE, ...)
monthlyReturn(x, subset=NULL, type='arithmetic',
leading=TRUE, ...)
quarterlyReturn(x, subset=NULL, type='arithmetic',
leading=TRUE, ...)
annualReturn(x, subset=NULL, type='arithmetic',
leading=TRUE, ...)
yearlyReturn(x, subset=NULL, type='arithmetic',
leading=TRUE, ...)
allReturns(x, subset=NULL, type='arithmetic',
leading=TRUE)
Arguments
x
object of state prices, or an OHLC type object
period
character string indicating time period. Valid entries are
‘daily’, ‘weekly’,
‘monthly’, ‘quarterly’, ‘yearly’. All
are accessible from wrapper functions described below.
Defaults to monthly returns (same as monthlyReturn)
subset
an xts/ISO8601 style subset string
type
type of returns: arithmetic (discrete) or log (continuous)
leading
should incomplete leading period returns be returned
…
passed along to to.period