首页 > 解决方案 > chart.CumReturns 函数的“几何”参数

问题描述

我需要解释函数的几何参数的作用chart.CumReturns。该论点的帮助说:

利用几何链接 (TRUE) 或简单/算术链接 (FALSE) 来聚合回报,默认为 TRUE

我的数据由简单的回报而不是日志回报组成。我想这也有影响。

关于几何链接和算术链接之间的区别的任何帮助,我将不胜感激。

PS我可能应该回到金融101...

标签: rperformanceanalytics

解决方案


geometric参数指定如何累积各个收益。

让我们看看使用这两种方法如何累积一年的月度收益:

library(PerformanceAnalytics)

data(edhec)
x <- edhec["2008", "Funds of Funds"]
x

# Funds of Funds
# 2008-01-31        -0.0272
# 2008-02-29         0.0142
# 2008-03-31        -0.0262
# 2008-04-30         0.0097
# 2008-05-31         0.0172
# 2008-06-30        -0.0068
# 2008-07-31        -0.0264
# 2008-08-31        -0.0156
# 2008-09-30        -0.0618
# 2008-10-31        -0.0600
# 2008-11-30        -0.0192
# 2008-12-31        -0.0119

# When geometric = TRUE, this is how cumulative returns are computed:
cumprod(1 + x) - 1
# Funds of Funds
# 2008-01-31    -0.02720000
# 2008-02-29    -0.01338624
# 2008-03-31    -0.03923552
# 2008-04-30    -0.02991611
# 2008-05-31    -0.01323066
# 2008-06-30    -0.01994069
# 2008-07-31    -0.04581426
# 2008-08-31    -0.06069956
# 2008-09-30    -0.11874832
# 2008-10-31    -0.17162342
# 2008-11-30    -0.18752825
# 2008-12-31    -0.19719667

# When geometric = FALSE, this is how cumulative returns are computed:
cumsum(x)

#           Funds of Funds
# 2008-01-31        -0.0272
# 2008-02-29        -0.0130
# 2008-03-31        -0.0392
# 2008-04-30        -0.0295
# 2008-05-31        -0.0123
# 2008-06-30        -0.0191
# 2008-07-31        -0.0455
# 2008-08-31        -0.0611
# 2008-09-30        -0.1229
# 2008-10-31        -0.1829
# 2008-11-30        -0.2021
# 2008-12-31        -0.2140

当几何为真时,收益的累积收益n计算为 cr = 1 * (1 + i1)(1 + i2)...(1+in) - 1。如果您假设原始投资(此处为 1 美元)与任何投资收益一起再投资,您将使用此选项。这与您在储蓄账户中赚取的复利相同。

当几何为假时,返回的累积回报n计算为 cr = i1 + i2 + ... + in。如果您假设您在每个间隔开始时投资(例如)1 美元,并且您在每个间隔内获得的投资回报不会投资于下一个间隔,您可以使用此选项,您只需在下一个间隔再次投资原始的 1 美元。

顺便说一句,请注意“简单”和“复利”之间的区别——你指的是“简单回报”,这可以解释为简单利息是如何随着时间的推移而积累的。此链接可能有助于构成财务 101 审查的一部分:https ://www.investopedia.com/ask/answers/042315/what-difference-between-compounding-interest-and-simple-interest.asp 。


推荐阅读