# NOT RUN {
# NOT RUN {
# Load data
data("data_efficient_portfolios_returns")
# Prepare data
v_port <- data_efficient_portfolios_returns[,2]
v_bench <- data_efficient_portfolios_returns[,1]
v_rf <- v_bench
# Compute the Reward-to-Variablity Ratio as in Sharpe (1966)
f_SR(v_port, v_rf, "", 0.95)
# Compute the Sharpe ratio as in Sharpe (1994)
f_SR(v_port, v_bench, "S", 0.95)
# Compute the modified Sharpe ratio as in Favre and Galeano (2002) and Gregoriou and Gueyie (2003)
f_SR(v_port, v_bench, "FG-GG", 0.95)
# Compute the modified Sharpe ratio as in Bali et al. (2013)
f_SR(v_port, v_bench, "BBD", 0.95)
# }
# }
Run the code above in your browser using DataLab