Learn R Programming

SharpeR (version 0.1306)

reannualize: Change the annualization of a Sharpe ratio.

Description

Changes the annualization factor of a Sharpe ratio statistic, or the rate at which observations are made.

Usage

reannualize(object, new.ope = NULL, new.epoch = NULL)

## S3 method for class 'sr': reannualize(object, new.ope = NULL, new.epoch = NULL)

## S3 method for class 'sropt': reannualize(object, new.ope = NULL, new.epoch = NULL)

Arguments

object
an object of class sr or sropt.
new.ope
the new observations per epoch. If none given, it is not updated.
new.epoch
a string representation of the epoch. If none given, it is not updated.

Value

  • the input object with the annualization and/or epoch updated.

See Also

sr

sropt

Other sr: as.sr, as.sr.data.frame, as.sr.default, as.sr.lm, as.sr.xts, confint.sr, confint.sropt, dsr, is.sr, power.sr_test, print.sr, print.sropt, se, se.sr, sr, sr_equality_test, sr_test

Other sropt: as.sropt, as.sropt.default, as.sropt.xts, confint.sr, confint.sropt, dsropt, is.sropt, power.sropt_test, sropt, sropt_test

Examples

Run this code
# compute a 'daily' Sharpe
mysr <- as.sr(rnorm(253*8),ope=1,epoch="day")
# turn into annual
mysr2 <- reannualize(mysr,new.ope=253,new.epoch="yr")

# for sropt
ope <- 253
zeta.s <- 1.0
df1 <- 10
df2 <- 6 * ope
rvs <- rsropt(1,df1,df2,zeta.s,ope,drag=0)
roll.own <- sropt(z.s=rvs,df1,df2,drag=0,ope=ope,epoch="yr")
# make 'monthly'
roll.monthly <- reannualize(roll.own,new.ope=21,new.epoch="mo.")
# make 'daily'
roll.daily <- reannualize(roll.own,new.ope=1,new.epoch="day")

Run the code above in your browser using DataLab