Bookmark and Share

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]

st: Simple Equation in Stata


From   Degas Wright <[email protected]>
To   [email protected]
Subject   st: Simple Equation in Stata
Date   Thu, 6 Jan 2011 14:38:51 -0500

Dear Statalist,

I am analyzing volatility and stock returns in a panel dataset. So, I am
trying to figure out how to write a simple equation in Stata my data looks
like:

Ticker    Vol  Wt    Date              VAR
1            3    .30    30Dec2001      9
1            2    .30     30Nov2001      4
2            4    .40     30Dec2001     16
2            3     .40    30Nov2001      3

10          5      .10  30Dec2001       25
10          3      .10   30Nov2001      9



My equation that I am trying to write is:

gen IC = (VAR(ticker 10) - (wt^2(ticker 1) * Var(ticker 1)+ wt^2(ticker 2) -
wt^2(ticker i)*(wt^2(ticker i) ) / Vol(ticker 10) * Vol(ticker i)

Where i=ticker 1,2...10, etc
So I am attempting to generate a IC term for each ticker, unique to that
month.

I have searched the manuals and the FAQs and did not come across how to
address this simple equation. Any assistance is greatly appreciated.

Thank you,

Degas Wright

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index