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)
Adding mean and sd to estpost / esttabHello everyone I want to add two extra columns for mean and standard deviation to my correlation ma…
Wage increase for quarterly data in GermanyHello everyone! I have a huge dataset with 270864 observations on gross hourly wage split into diffe…
Having issues with GcrobustvarDear scholars, I am having some issues using Gcrobustvar estimator for causality. After loading the …
Xtabond2 for system GMM. Please help me for codingHello to everyone, I am searching in terms of the effect of the uncertainty on the saving and in one…
Converting results from percentage point to percentHello STATALISTERS, I am estimating the effects of a program using the fixed effects model in which …
Subscribe to:
Post Comments (Atom)
0 Response to Invalid Syntax r(198)
Post a Comment