Hi,
I have panel data, permno is my panel variable. I want to create covariance between returns and lag_returns for each permno and store the values in a new column. I have data of 1 year for each panel variable. I don't want to get 1 covariance figure for each permno. Instead, for a given permno and date, I want to calculate covariance for the values till that specific date.
For example, if permno=10001 and date=date=19900111, my covariance figure should be cov (returns, lag_returns) for the period date=19900102-19900111
Thank you
Related Posts with How to calculate a running covarance and store the values?
No standard errors reported for some variables when using xtlsdvcHello, I am trying to use xtlsdvc to correct for the bias in the dynamic panel model. However, I d…
Gravity Equation for Trade | Merging panel datasetsHi all, I have a dataset from CEPII (gravdata.dta) which I have cleaned up to contain only specific…
Interpretation stata resultsHello, I'm doing a master thesis on the effect of CSR contracting on CSR performance. My model is b…
ppmlhdfe and ppml provide different fitted valuesHello, I am running a gravity model thus from (Yotov2016) Code: ppml trade EXPORTER_TIME_FE* IMPORT…
finding duplicate values between two variablesDear all, I am using Stata 15 and for my panel data I have director IDs (Director_ID) and the CEO I…
Subscribe to:
Post Comments (Atom)
0 Response to How to calculate a running covarance and store the values?
Post a Comment