(年化)夏普比率

R 投資組合分析入門

Kris Boudt

Professor, Free University Brussels & Amsterdam

績效基準比較

ch_2_video_2.003.png

R 投資組合分析入門

績效基準比較

ch_2_video_2.004.png

R 投資組合分析入門

風險—報酬取捨

ch_2_video_2.006.png

R 投資組合分析入門

風險—報酬取捨

ch_2_video_2.007.png

R 投資組合分析入門

風險—報酬取捨

ch_2_video_2.008.png

R 投資組合分析入門

風險—報酬取捨

ch_2_video_2.009.png

R 投資組合分析入門

風險—報酬取捨

ch_2_video_2.010.png

R 投資組合分析入門

風險—報酬取捨

ch_2_video_2.011.png

R 投資組合分析入門

資本配置線

ch_2_video_2.013.png

R 投資組合分析入門

資本配置線

ch_2_video_2.014.png

R 投資組合分析入門

資本配置線

ch_2_video_2.015.png

R 投資組合分析入門

資本配置線

ch_2_video_2.016.png

R 投資組合分析入門

夏普比率

ch_2_video_2.018.png

R 投資組合分析入門

夏普比率

ch_2_video_2.019.png

R 投資組合分析入門

夏普比率

ch_2_video_2.020.png

R 投資組合分析入門

夏普比率

ch_2_video_2.021.png

R 投資組合分析入門

績效統計實作

library(PerformanceAnalytics)
sample_returns <- c(-0.02, 0.00, 0.00, 0.06, 0.02, 0.03, -0.01, 0.04)

ch_2_video_2.024.png

R 投資組合分析入門

績效統計實作

library(PerformanceAnalytics)
sample_returns <- c(-0.02, 0.00, 0.00, 0.06, 0.02, 0.03, -0.01, 0.04)
mean(sample_returns)

ch_2_video_2.025.png

R 投資組合分析入門

績效統計實作

library(PerformanceAnalytics)
sample_returns <- c(-0.02, 0.00, 0.00, 0.06, 0.02, 0.03, -0.01, 0.04)
mean.geometric(sample_returns)

ch_2_video_2.026.png

R 投資組合分析入門

績效統計實作

library(PerformanceAnalytics)
sample_returns <- c(-0.02, 0.00, 0.00, 0.06, 0.02, 0.03, -0.01, 0.04)
StdDev(sample_returns)

ch_2_video_2.027.png

R 投資組合分析入門

績效統計實作

library(PerformanceAnalytics)
sample_returns <- c(-0.02, 0.00, 0.00, 0.06, 0.02, 0.03, -0.01, 0.04)
(mean(sample_returns)-0.004)/StdDev(sample_returns)

ch_2_video_2.028.png

R 投資組合分析入門

月度績效年化

Screenshot 2019-08-21 at 11.00.36.png

  • 算術平均:月平均 * 12
  • 幾何平均($R_i$ 為月報酬):
    • $[(1+R_1)\cdot(1+R_2)\cdot...\cdot(1+R_T)]^{12/T} -1$
  • 波動度:月波動度 * sqrt(12)
R 投資組合分析入門

績效統計實作

library(PerformanceAnalytics)
sample_returns <- c( -0.02, 0.00, 0.00, 0.06, 0.02, 0.03, -0.01, 0.04)


ch_2_video_2.036.png

R 投資組合分析入門

績效統計實作

library(PerformanceAnalytics)
sample_returns <- c( -0.02, 0.00, 0.00, 0.06, 0.02, 0.03, -0.01, 0.04)
Return.annualized(sample_returns, scale = 12, geometric = FALSE)

ch_2_video_2.037.png

R 投資組合分析入門

績效統計實作

library(PerformanceAnalytics)
sample_returns <- c( -0.02, 0.00, 0.00, 0.06, 0.02, 0.03, -0.01, 0.04)
Return.annualized(sample_returns, scale = 12, geometric = TRUE)

ch_2_video_2.038.png

R 投資組合分析入門

績效統計實作

library(PerformanceAnalytics)
sample_returns <- c( -0.02, 0.00, 0.00, 0.06, 0.02, 0.03, -0.01, 0.04)
Std.Dev.annualized(sample_returns, scale = 12)

ch_2_video_2.039.png

R 投資組合分析入門

績效統計實作

library(PerformanceAnalytics)
sample_returns <- c( -0.02, 0.00, 0.00, 0.06, 0.02, 0.03, -0.01, 0.04)
Return.annualized(sample_returns, scale = 12)/
    Std.Dev.annualized(sample_returns, scale = 12)

ch_2_video_2.040.png

R 投資組合分析入門

一起來練習吧!

R 投資組合分析入門

Preparing Video For Download...