2 Financial time-series and asset-pricing

  • If the sample data consists of the asset values observed over time (\(t=1,~2,~3,...,T\)) these are known as time-series or historical data

  • Univariate time-series is focused on a single asset, whereas multivariate time-series involves two or more assets observed at the same time points or time intervals

  • Different assets in various markets, such as stock exchanges, foreign exchange markets, money markets, cryptocurrency markets, commodity markets or precious metals markets (for istance oil or gold), are typically valued by their prices

  • However, it is preferable to analyze returns rather than prices because returns provide a standardized measure of investment performance, allowing for easier comparison across different asset types, regardless of their price levels, scales or units

  • Returns are the percentage changes in the asset values from the current period \(t\) (such as a day, month, or year) to the previous period \(t-1\) (previous day, month, or year), reflecting the profits or losses (positive or negative returns) more clearly

Simple returns (also known as arithmetic returns) are calculated using the formula \[\begin{equation} R_t=\dfrac{P_t-P_{t-1}}{P_{t-1}}~~~~~~~~~~~t=2,3,\dots,T \tag{2.1} \end{equation}\] where \(P_t\) is current closing price and \(P_{t-1}\) is lagged closing price

Note: return for the first observation is always missing and it is often replaced with zero, assuming that the price has not changed compared to the period before \(t=1\)

Compound returns (also known as continuously compounded or log returns) are calculated using the formula \[\begin{equation} r_t=\underbrace{log(P_t)-log(P_{t-1})}_{\text{first difference of the logs}}=\Delta log(P_t)=log\bigg(\dfrac{P_t}{P_{t-1}}\bigg)~~~~~~~~~~~t=2,3,\dots,T \tag{2.2} \end{equation}\] where log(·) is the natural log function
Note: it is costummary to use closing prices, instead of opening prices, as they reflect the asset value after a full day of trading and they are observed right before the most liquid and active part of the day when market closes, while opening prices are influenced by overnight news and pre-market activity.

  • Replacing the first missing return with zero is practical for two reasons: \((1)\) it keeps all observations in the sample, and \((2)\) over a long time horizon returns have an approximately zero mean (sometimes returns are centered by demeaning process to ensure the mean is exactly zero)

  • Although returns \(R_t\) and \(r_t\) reflect a relative change, they are not multiplied with \(100\) for easier computation later, but the final results are interpreted as percentages (\(\%\))

  • Unlike simple returns, log returns can be easily aggregated, i.e. by summing one-period log returns over \(k\) periods we get multi-period log return

\[\begin{equation} r_t(k)=r_t+r_{t-1}+r_{t-2}+\cdots + r_{t-k+1}=\sum_{j=0}^{k-1}r_{t-j} \tag{2.3} \end{equation}\]

  • For instance, summing daily returns from Monday to Friday yields the weekly return, summing daily returns from the first to the last day of the month gives the monthly return, summing monthly returns from January to December results in the annual return, etc.

  • By rewriting a simple return formula (2.1) as \(R_t=\dfrac{P_t}{P_{t-1}}-1\), the connection between two types of returns is straightforward

\[\begin{equation} \begin{aligned} r_t&=log(1+R_t) \\ R_t&=e^{r_t}-1 \end{aligned} \tag{2.4} \end{equation}\]

  • According to (2.4), nothing is lost by using log returns instead of simple returns, but the additivity of log returns is a crucial property for statistical modeling, making log returns more convenient

  • In empirical studies weekly, daily or even intraday returns are most prevalent (instead of monthly, quarterly or annual returns) for several reasons:

  1. capturing market fluctuations and price dynamics more accurately when prices are observed in shorter time intervals (weeks, days, hours, minutes or seconds), as markets usually react very quickly to incoming events, published news or sentiment changes

  2. using more observations due to higher granularity

  3. developing short-term investment strategies

  4. improving algorithmic trading

  • In RStudio log returns can be computed in different ways and aggregated at different levels (Table 2.1)
TABLE 2.1: RStudio packages and commands for computing log returns
Package Command Description
stats (base R) diff(log()) generating first differences of the logs
quantmod dailyReturn() computing daily log returns from prives
quantmod weeklyReturn() computing weekly log returns from prices
quantmod quarterlyReturn() computing monthly log returns from prices
quantmod monthlyReturn() computing monthly log returns from prices
quantmod annualReturn() computing annual log returns from prices
PerformanceAnalytics Return.calculate() calculating simple or log returns
PerformanceAnalytics Return.centered() calculating centered returns