Compounding Monthly Returns into Quarterly Returns
Summary
The document explains how to aggregate ordinary monthly returns into quarterly returns. For each quarter, add one to every monthly return, multiply those gross returns together, and subtract one. This captures the effect of sequential returns; simply summing monthly percentage returns would not generally give the compounded quarterly result. The method applies to factor portfolios, industry portfolios, and risk-free returns when each series contains monthly simple returns.
The response illustrates grouping observations by calendar year and quarter, and also shows a package-based workflow that converts price-like index series into quarterly returns. Its example demonstrates the calculation but does not address missing months, irregular dates, or alternative conventions for assigning observations to quarters. The central formula is independent of R, while the package examples are conveniences for handling data and time periods.
Key ideas
- Quarterly simple return is the product of the quarter’s monthly gross returns minus one.
- Adding monthly simple returns is not equivalent to compounding them.
- Group observations by year and quarter before applying the product calculation.
- Price or index series can also be converted to quarterly returns using a returns aggregation function.
Tags
Full text
# Compound the monthly returns to make them quarterly
# Compound the monthly returns to make them quarterly
How can someone make the Kenneth French library data returns quarterly from monthly? Since they are not loq returns, then you need to compound returns rather than summing them up. I want to make the returns of the SML, HML, the industry portfolio and the risk free that he uses, as quarterly returns. Does anybody know how you can deal with such a problem in R?
## Answer by Enrico Schumann (score 3, accepted)
https://quant.stackexchange.com/a/53934
You add 1 to every monthly return of a given quarter, take the product of those returns, and then subtract 1.
In R (without any package): Suppose `r` are the monthly returns, and `dt` are the timestamps.
```
r <- rep(0.01, 12)
dt <- seq(from = as.Date("2020-1-1"),
to = as.Date("2020-12-1"),
by = "1 month")
tapply(r,
paste(as.POSIXlt(dt)$year + 1900, quarters(dt)),
FUN = function(x) prod(x + 1) - 1)
## 2020 Q1 2020 Q2 2020 Q3 2020 Q4
## 0.0303 0.0303 0.0303 0.0303
```
If you prefer the convenience of packages:
```
library("NMOF") ## for function 'French'
library("PMwR") ## for function 'returns'
P <- French(dest.dir = tempdir(),
dataset = "F-F_Research_Data_Factors_CSV.zip",
weighting = "value", frequency = "monthly",
price.series = TRUE)
head(P)
## Mkt-RF SMB HML RF
## 1926-06-30 1.000000 1.0000000 1.000000 1.000000
## 1926-07-31 1.029600 0.9770000 0.971300 1.002200
## 1926-08-31 1.056781 0.9633220 1.011997 1.004706
## 1926-09-30 1.060586 0.9506061 1.012099 1.007016
## 1926-10-31 1.026223 0.9509864 1.017260 1.010239
## 1926-11-30 1.052186 0.9490844 1.013700 1.013371
returns(P, t = as.Date(row.names(P)), period = "quarterly")
## Mkt-RF SMB HML RF
## 1926-09-30 0.0605859 -0.04939385 0.0120987 0.00701632
## 1926-12-31 0.0180728 -0.00200016 0.0013818 0.00912759
## 1927-03-31 0.0425284 -0.02248889 0.0526542 0.00812182
## 1927-06-30 0.0344638 0.02324739 0.0394452 0.00812182
## 1927-09-30 0.1457918 -0.07356559 -0.0548306 0.00792060
## 1927-12-31 0.0411792 0.05924812 -0.0563754 0.00681538
```
(disclosure: I am the maintainer of packages NMOF and PMwR.)Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.