Hi everyone,
I was wondering if I could get help to figure out the problem with one of my commands. I have been over it several times, and it would be great to get another opinion! My commands are written to find the first order serial covariance of the returns (Which are found using transaction prices of stocks, variable = close). The covariance is used to calculate the bid-ask spread using the Roll model in Finance.
The command I am having problem with is:
forvalues i = 1/`N'{
quietly correlate return lreturn if ticker_new==`i', covariance
replace cov_returns = r(cov_12) if ticker_new==`i'
}
You can find the rest of the do-file below
Thank you for your time and help!
Sarika
Array
Related Posts with Invalid Syntax r(198)
Help with Summary stats dummy variableHello all, I'm looking to see if there is a command that I can easily get the summary stats. BA_St…
xtabond2 panel data helpDear all, I am doing my undergraduate dissertation on the relationship between natural resource ren…
using factor score as dependend variableHi all, I tried to run an OLS regression (using reg) with a factor score as dependent variable. But…
FE Logit model does not converge, whereas RE probit does, misspecification?I have given Panel data and want to investigate on the determinants of collateral incidence, binary …
Engle-Granger HelpHi, everyone, I'm trying to perform Engle-Granger 2-step procedure. However, I did not find an appr…
Subscribe to:
Post Comments (Atom)
0 Response to Invalid Syntax r(198)
Post a Comment