Skip to content
All library documents

Simulating Returns with a Single-Factor Model

Article Quant Q&A · Author: user3742038

Summary

The document sets out a proposed simulation of monthly stock returns using a one-factor model. Asset excess returns are described as a mispricing term plus factor exposure times factor excess returns, with an idiosyncratic noise vector. The scenario sets mispricing to zero, assigns factor loadings across a stated range, and specifies annual assumptions for the risk-free rate, factor return, and idiosyncratic volatility. It also assumes the noise covariance matrix is diagonal, implying no cross-asset noise covariance.

The author’s R attempt draws factor returns and noise, constructs a loading matrix, and combines the components. However, the excerpt contains no answer or validation, so it does not establish that the implementation is correct. In particular, the described dimensions and distributions must align: factor returns should be shared across assets for each period, and the noise should have the intended asset-by-time structure and covariance. Annual-to-monthly conversion and whether inputs are arithmetic or log returns also need consistent treatment. The example is a setup for a simulation question, not evidence of simulated results.

Key ideas

  • A single-factor model separates asset excess returns into alpha, factor exposure, and idiosyncratic noise.
  • Factor loadings map each factor return into the returns of individual assets.
  • A diagonal noise covariance assumption excludes cross-sectional correlation in idiosyncratic shocks.
  • Simulation dimensions must reflect the number of assets and time periods.
  • Annual assumptions require consistent conversion before generating monthly data.

Tags

Full text
# Generating financial data


# Generating financial data












I am trying to generate monthly stock data using a one-factor model:

$$R_{a,t} = \alpha + BR_{b,t}+\epsilon_{t}$$

The description says:

$R_{a,t}$ is the excess asset returns vector, $\alpha$ is the mispricing coefficients vector, $B$ is the factor loadings matrix, $R_{b,t}$ is the vector of excess returns on the factor portfolios, $R_{b}-N(\mu_{b},\sigma_{b})$, and $\epsilon_{t}$ is the vector of noise, $\epsilon - N(0,\sum_{e})$, which is independent with respect to the factor portfolios.

For our simulations, we assume that the risk-free rate follows a normal distribution, with an annual average of 2% and a standard deviation of 2%. We assume that there is only one factor (K=1), whose annual excess return has an annual average of 8% and a standard deviation of 16%. The mispricing $\alpha$ is set to zero and the factor loadings, B, are evenly spread between 0.5 and 1.5. Finally, the variance-covariance matrix of noise, $\sum_{\epsilon}$, is assumed to be diagonal, with elements drawn from a uniform distribution with support [0.10,0.30], so that the cross-sectional average annual idiosyncratic volatility is 20%.

Using the information provided here I try to generate the data:

```
alpha <- 0 #mispricing index is set to 0

B <- matrix(runif(1000,min=0.5,max=1),100,10) #factor loadings matrix is evenly spread between 0.5 and 1.5

R <- rnorm(100,mean=8/12,sd=16/sqrt(12)) #factor with annual excess return of 8% and standard deviation of 16%

epsilon <- rnorm(100, mean=0,sd=runif(10,min=0.1,max=0.30)) #error term with mean 0 and standard deviation drawn from a uniform distribtion
```

Then I generate the data:

```
data <- alpha + B*R + epsilon
```

My question is: is this the correct way to do it or am I missing something?

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.