1

I am trying to replicate Boons et al. (JFE, 2020) in R. First, I have a panel dataset with firm- and month-level variations in stock returns. Then, I have an inflation dataset that has times-series variations only. I regress the excess returns on the residual of inflation ARMA(1,1). That is:

R_{i,t}=a+β_{i,t}∗u_{t}+ε_{i,t}

{i} stands for firm, and {t} is month. Excess returns (R_{i,t}) are different each firm and month. In contrast, u_{t} is a residual of inflation ARMA (1,1) and has time-series variations only. Now, I want β_{i,t} to have both firm-level and time-series variations.

I ran a simple OLS regression as follows:

ols<-lm(ret~res, data=data)

where ret stands for R_{i,t} and res indicates u_{t}.

However, coefficients only have 597 values, showing only time-series variations and no firm-level variations. Screenshot of results: ols How can I obtain β_{i,t} that is different for each firm and month?

Progman
  • 16,827
  • 6
  • 33
  • 48
Liz An
  • 11
  • 2
  • 2
    Can you provide a [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with your data (or example data) and any code you've written so far? – jrcalabrese Nov 26 '22 at 21:28
  • You can find arma modeling functions easily by searching withe the obvious terms. – IRTFM Nov 27 '22 at 03:18
  • I already did ARMA. u is the ARMA residual, which is already calculated. I now need to regress R on u. – Liz An Nov 27 '22 at 17:35

0 Answers0