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)
Geographical dataDear Statalist, I have a time series on road accidents that happened in a particular region. Each a…
Vlookup unable to installHi everyone, I have been trying to install vlookup by typing in Code: findit vlookup search vlo…
bayes: mlogit - errorHello everyone, I have the following vector (A) with 73 observations: A | Freq. Percent Cum. -----…
How to plot the difference between two marginsplot?Hi, I have two marginsplot for the same model for two different groups, but I would like to have a …
Panel data rolling between country standard deviation by yearHi Statalist member. This is probably a pretty easy question to answer but I did not find a proper …
Subscribe to:
Post Comments (Atom)
0 Response to Invalid Syntax r(198)
Post a Comment