Dear all,
For my master thesis, I would like as a first step to run a Fama-French three factor regression, and compute idiosyncratic volatility for every common stock as the standard deviation of one, three, six, or twelve months of daily error term.
For this, I downloaded permno, date, and return of stocks from CRSP and daily FF 3 factors. I dropped all missing values of return (unbalanced time series data)and merged both datasets based on date.
I created a variable for time :
egen time = group(date)
label variable time "Date Identifier"
My data looks like this :
Array
I declared a time series dataset with a panel variable (permno) :
tsset permno time, generic
I want to save the error terms for each stock every day so that I can later create a loop to compute standard deviation of that error term based on 1,3,6,12 months of daily data. How can I do that ?
I know I can have an output of factor loadings and rmse for every stock by running :
statsby _b[MktRF] _b[SMB] _b[HML] rmse = e(rmse), by(permno) saving(try reg.dta, replace): regress excessretx MktRF SMB HML
but again I would be losing the time dimension that I need to compute monthly idiosyncratic volatility of every stock.
Related Posts with Error terms for Time Series Regression with a Panel Variable
Multi level modelling cross level analysisI want to examine the effect of educational attainment(xvar) on prejudice(yvar) (both 1. level varia…
'invalid name' error in logit MLE programIf anyone can help it would be great. I'm trying to do a logistic MLE. I've written an ado with the …
Fama MacBeth model - factor loadings: asreg with fmb omits coefficientsDear all, I would like to get the loadings of various factors (i.e. their beta coefficients) influe…
Difference between reg vce cluster (id) AND reg robust cluster (id)Hello everyone, I am using panel data and running a model with the Least Squares Dummy Variables Mo…
xtmelogit CodeI am using stata v 11, and trying this code , xtmelogit N1 i.HW3 i.m18n i.Bm11 i.V212 i.Vm445 i.Mn14…
Subscribe to:
Post Comments (Atom)
0 Response to Error terms for Time Series Regression with a Panel Variable
Post a Comment