Hi all,
I am writing my Bachelor thesis which is about how total payout policy (dividends + share repurchases) is affected during a crisis period in which I will be comparing the Financial Crisis to the COVID crisis. Sample includes all firms in the economy excluding some based on their SIC codes (utilities & financial companies).
I am trying to create a variable which measures the volatility (the standard deviation) of Cash Flow and Percentage Returns in the last 2 years, at each observation, for each company in the data set.
OIBD is Operating Income Before Depreciation, taken as Cash Flow. For example the data looks like the following:
My struggle comes from finding the code that measures the standard deviation and how to specifically tell STATA to not calculate the standard deviation once a new company begins in the dataset.
I would really appreciate any sort of help.
Thank you,
Viktor Christian
I am writing my Bachelor thesis which is about how total payout policy (dividends + share repurchases) is affected during a crisis period in which I will be comparing the Financial Crisis to the COVID crisis. Sample includes all firms in the economy excluding some based on their SIC codes (utilities & financial companies).
I am trying to create a variable which measures the volatility (the standard deviation) of Cash Flow and Percentage Returns in the last 2 years, at each observation, for each company in the data set.
OIBD is Operating Income Before Depreciation, taken as Cash Flow. For example the data looks like the following:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str6 datacqtr str70 Company float PercentageReturns double OIBD "2000Q3" "AAR CORP" . 14.565 "2000Q4" "AAR CORP" -.07777778 15.974 "2001Q1" "AAR CORP" .3108434 17.247 "2001Q2" "AAR CORP" .029411735 16.581 "2001Q3" "AAR CORP" .21857142 10.469 "2001Q4" "AAR CORP" -.5222743 5.513 "2002Q1" "AAR CORP" -.0920245 5.722 "2002Q2" "AAR CORP" .54594594 5.503 "2002Q3" "AAR CORP" -.458042 3.967 "2002Q4" "AAR CORP" -.1129032 10.646 "2003Q1" "AAR CORP" -.1909091 12.037 "2003Q2" "AAR CORP" .011235998 4.095 "2003Q3" "AAR CORP" .78 . "2003Q4" "AAR CORP" .3058676 . "2004Q1" "AAR CORP" .23518164 . "2004Q2" "AAR CORP" -.25851393 . "2004Q3" "AAR CORP" .11691024 13.27 "2004Q4" "AAR CORP" .27757013 15.754 "2005Q1" "AAR CORP" -.18434528 16.36 "2005Q2" "AAR CORP" .4385651 16.39 "2005Q3" "AAR CORP" .0972568 16.872 "2005Q4" "AAR CORP" .1897727 22.416 "2006Q1" "AAR CORP" .20869146 25.406 "2006Q2" "AAR CORP" -.04859737 28.198 "2000Q2" "ADC TELECOMMUNICATIONS INC" . 216.5 "2000Q3" "ADC TELECOMMUNICATIONS INC" -.490313 211.7 "2000Q4" "ADC TELECOMMUNICATIONS INC" -.3187135 119.2 "2001Q1" "ADC TELECOMMUNICATIONS INC" -.4842918 -112.6 "2001Q2" "ADC TELECOMMUNICATIONS INC" -.3462051 -18.1 "2001Q3" "ADC TELECOMMUNICATIONS INC" -.073319726 -44.1 "2001Q4" "ADC TELECOMMUNICATIONS INC" .07252742 -32.8 "2002Q1" "ADC TELECOMMUNICATIONS INC" -.2028689 -56.1 "2002Q2" "ADC TELECOMMUNICATIONS INC" -.5372751 -75.2 "2002Q3" "ADC TELECOMMUNICATIONS INC" -.1222222 -28.3 "2002Q4" "ADC TELECOMMUNICATIONS INC" .4556962 . "2003Q1" "ADC TELECOMMUNICATIONS INC" .03478263 . "2003Q2" "ADC TELECOMMUNICATIONS INC" -.07983198 . "2003Q3" "ADC TELECOMMUNICATIONS INC" .17351595 . "2003Q4" "ADC TELECOMMUNICATIONS INC" .3680934 20.1 "2004Q1" "ADC TELECOMMUNICATIONS INC" -.28896475 18.4 "2004Q2" "ADC TELECOMMUNICATIONS INC" -.04 14.6 "2004Q3" "ADC TELECOMMUNICATIONS INC" -.0791667 24.8 "2004Q4" "ADC TELECOMMUNICATIONS INC" .1628959 19.9 "2005Q1" "ADC TELECOMMUNICATIONS INC" -.11673149 50.6 "2005Q2" "ADC TELECOMMUNICATIONS INC" 10.51542 48.7 "2005Q3" "ADC TELECOMMUNICATIONS INC" -.3324407 46.6 "2000Q2" "ALPHARMA INC -CL A" . 45.206 "2000Q3" "ALPHARMA INC -CL A" -.018072288 57.76 "2000Q4" "ALPHARMA INC -CL A" -.2822086 45.056 "2001Q1" "ALPHARMA INC -CL A" -.2537892 64.883 "2001Q2" "ALPHARMA INC -CL A" -.16768484 41.608 "2001Q3" "ALPHARMA INC -CL A" .05688073 42.673 "2001Q4" "ALPHARMA INC -CL A" -.0815972 14.437 "2002Q1" "ALPHARMA INC -CL A" -.4593573 42.98 "2002Q2" "ALPHARMA INC -CL A" .18741257 55.277 "2002Q3" "ALPHARMA INC -CL A" -.434629 67.887 "2002Q4" "ALPHARMA INC -CL A" .24062496 64.814 "2003Q1" "ALPHARMA INC -CL A" .5054576 51.283 "2003Q2" "ALPHARMA INC -CL A" .20468485 56.636 "2003Q3" "ALPHARMA INC -CL A" -.13888891 41.629 "2003Q4" "ALPHARMA INC -CL A" .08064514 51.2 "2004Q1" "ALPHARMA INC -CL A" -.024378126 27.139 "2004Q2" "ALPHARMA INC -CL A" .04436509 37.934 "2004Q3" "ALPHARMA INC -CL A" -.10693358 24.741 "2004Q4" "ALPHARMA INC -CL A" -.07326412 73.202 "2005Q1" "ALPHARMA INC -CL A" -.27315637 41.863 "2005Q2" "ALPHARMA INC -CL A" .174513 45.63 "2005Q3" "ALPHARMA INC -CL A" .7187284 45.606 "2005Q4" "ALPHARMA INC -CL A" .14636104 54.09 "2000Q2" "UNITED DOMINION INDUSTRIES" . 81.687 "2000Q3" "UNITED DOMINION INDUSTRIES" .3933823 72.141 "2000Q4" "UNITED DOMINION INDUSTRIES" -.4854881 70.606 "2000Q2" "AMC ENTERTAINMENT INC -OLD" . 25.335 "2000Q3" "AMC ENTERTAINMENT INC -OLD" -.6410257 31.057 "2000Q4" "AMC ENTERTAINMENT INC -OLD" 1.2857143 30.602 "2001Q1" "AMC ENTERTAINMENT INC -OLD" .77 15.828 "2001Q2" "AMC ENTERTAINMENT INC -OLD" .8361582 30.46 "2001Q3" "AMC ENTERTAINMENT INC -OLD" -.1923077 56.678 "2001Q4" "AMC ENTERTAINMENT INC -OLD" .14285715 29.244 "2002Q1" "AMC ENTERTAINMENT INC -OLD" .13666667 37.766 "2002Q2" "AMC ENTERTAINMENT INC -OLD" .04105569 42.161 "2002Q3" "AMC ENTERTAINMENT INC -OLD" -.4788732 58.649 "2002Q4" "AMC ENTERTAINMENT INC -OLD" .19594593 49.05 "2003Q1" "AMC ENTERTAINMENT INC -OLD" -.020339025 51.148 "2003Q2" "AMC ENTERTAINMENT INC -OLD" .3194925 67.401 "2003Q3" "AMC ENTERTAINMENT INC -OLD" .1713287 55.713 "2003Q4" "AMC ENTERTAINMENT INC -OLD" .13507466 70.532 "2004Q1" "AMC ENTERTAINMENT INC -OLD" .009204468 37.528 "2004Q2" "AMC ENTERTAINMENT INC -OLD" .0013029067 76.58 "2004Q3" "AMC ENTERTAINMENT INC -OLD" .24528304 47.761 "2000Q2" "AMERICAN AIRLINES GROUP INC" . 811 "2000Q3" "AMERICAN AIRLINES GROUP INC" .23640662 879 "2000Q4" "AMERICAN AIRLINES GROUP INC" .19885278 393 "2001Q1" "AMERICAN AIRLINES GROUP INC" -.10379586 309 "2001Q2" "AMERICAN AIRLINES GROUP INC" .02875857 277 "2001Q3" "AMERICAN AIRLINES GROUP INC" -.4702464 -367 "2001Q4" "AMERICAN AIRLINES GROUP INC" .1650993 -675 "2002Q1" "AMERICAN AIRLINES GROUP INC" .18430497 -388 "2002Q2" "AMERICAN AIRLINES GROUP INC" -.3616055 -263 "2002Q3" "AMERICAN AIRLINES GROUP INC" -.7520759 -273 end
I would really appreciate any sort of help.
Thank you,
Viktor Christian

Comment