Learn R Programming

SharpeR (version 1.4.0)

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 sr reannualize(object, new.ope = NULL, new.epoch = NULL)

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

Value

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

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.

Author

Steven E. Pav shabbychef@gmail.com

See Also

sr

sropt

Other sr: as.sr(), confint.sr(), dsr(), is.sr(), plambdap(), power.sr_test(), predint(), print.sr(), se(), sr, sr_equality_test(), sr_test(), sr_unpaired_test(), sr_vcov(), summary.sr

Other sropt: as.sropt(), confint.sr(), dsropt(), is.sropt(), pco_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