Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: programming for coskewness and cokurtosis
From
Roberto Ferrer <[email protected]>
To
[email protected]
Subject
Re: st: programming for coskewness and cokurtosis
Date
Sat, 08 Mar 2014 09:14:44 -0430
You should probably read -help rolling-. The spelling is Stata, not STATA.
On March 8, 2014 12:07:33 AM GMT-04:30, [email protected] wrote:
>Dear STATA experts
>
>Greeting all. I have data of stock return and market return in
>following format
>
>month A B C
>..................................... Market
>1 7.2 10.4 3.6
>................................... 4.5
>2 6.5 8.9 4.4
>................................... 5.6
>................. ....... ....... ......
>................................... ......
>
>I want to estimate coskewness and cokurtosis by:
>
>1. Start first data set with data record # 1-60 of stock A
>2. Regress stock return with Market Return, with equation Rit = a + b
>(Rmt) with 60 data records
>3. Calculate residual "e" of month #1 by e = r(1) - a - b (Rmt(1)),
>and repeat for month 2-60
>4. Calculate "em" of month #1 by em(1) = the different between market
>return of month 1 and average of market return of month 1-60, and
>repeat for month 2-60
>5. Calculate CSK of month 61 =
>Average{(e)*em)^2}/{SQRT(Average(e^2))*Average(em)^2)} of month 1-60
>6. Calculate CKT of month 61 =
>Average{(e)*em)^3}/{SQRT(Average(e^2))*Average(em)^3)} of month 1-60
>7. Save "month", "Stock Name", "r", "CSK", "CKT", "e", "em" of month 61
>8. Move data time window to t+1 (data record # 2-61) and repeat step 2-
>7
>9. Keep doing until all data of stock A and start for stock B until all
>stock
>
>If STATA can do this, could you please give me some hint on how to?
>Thank you very much in advance for your kind help.
>*
>* For searches and help try:
>* http://www.stata.com/help.cgi?search
>* http://www.stata.com/support/faqs/resources/statalist-faq/
>* http://www.ats.ucla.edu/stat/stata/
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/