help crashversion 1.1

Title

crash - Calculate stock crash risk measures (NCSKEW and DUVOL)

Syntax

crash [using]

[, SAVEpath(string) SHEETnames(string)

MARKETvars(string) MINweeks(integer) clear]

Description

crash calculates two measures of stock crash risk - Negative Coefficient of
Skewness (NCSKEW) and Down-to-Up Volatility (DUVOL) - following the methodology
described in Chen, Hong, and Stein (2001) and Kim, Li, and Zhang (2011a,b).

The command processes individual stock return data and market return data from
Excel files, performs necessary data transformations, estimates regressions to
calculate residual returns, and finally computes the crash risk measures.

Options

using specifies the path to the Excel file containing stock and market return data.
If not specified, the command will look for the data in the current directory.

SAVEpath(string) specifies the directory where results will be saved.
Default is the current working directory.

SHEETnames(string) specifies the names of Excel sheets containing
individual stock returns (first N-1 sheets) and market returns (last sheet).
Default is "Sheet1 Sheet2 Sheet3 Sheet4 Sheet5".

MARKETvars(string) specifies the variable names for market identifier
and market returns. Default is "market Wrettmv".

MINweeks(integer) specifies the minimum number of trading weeks required
for a stock-year observation to be included in the analysis. Default is 30.

clear clears the memory before executing the command.

Remarks

The command expects the Excel file to have the following structure:

- First N-1 sheets: Individual stock returns data with variables:

Stkcd (stock code), date (date), Wkret (weekly return), Wrettmv (value-weighted return)

- Last sheet: Market returns data with variables:

date (date), market (market identifier), Wrettmv (market return)

The command will keep only observations where market equals 1 or 4.

Examples

Calculate crash risk measures using default settings:

cd "E:\益友学术\鼎园会计142期\report"

cap mkdir "E:/益友学术/鼎园会计142期/report/result/"

crash using returns.xlsx, savepath(./result/)

Calculate crash risk measures with custom settings:

cap mkdir "E:/益友学术/鼎园会计142期/report/results/"

crash using returns.xlsx, savepath(./results/) sheetnames(Sheet1 Sheet2 Sheet3 Sheet4 Market) minweeks(40) clear

Process a file with only one individual stock sheet:

cap mkdir "E:/益友学术/鼎园会计142期/report/results2/"

cd "E:\益友学术\鼎园会计142期\report\results2"

crash using returns.xlsx, savepath(./results2/) sheetnames(Individual Market)

Stored results

The command saves the following datasets:

- crash_dataset.dta: Merged individual and market return data

- crashrisk.dta: Intermediate data with residual returns

- stock_crash_risk.dta: Final dataset with NCSKEW and DUVOL measures

The command also exports the results to stock_crash_risk.xlsx.

Authors

Wu Lianghai

School of Business, Anhui University of Technology(AHUT), Ma'anshan, China

agd2010@yeah.net

Wu Hanyan

School of Economics and Management, Nanjing University of Aeronautics and Astronautics(NUAA), China

2325476320@qq.com

Ding Ming

School of Business, Anhui University of Technology(AHUT), Ma'anshan, China

dingming0417@163.com

References

Chen, J., Hong, H., & Stein, J. C. (2001). Forecasting crashes: Trading volume,
past returns, and conditional skewness in stock prices. Journal of Financial Economics, 61(3), 345-381.

Kim, J. B., Li, Y., & Zhang, L. (2011a). CFOs versus CEOs: Equity incentives and crashes.
Journal of Financial Economics, 101(3), 713-730.

Kim, J. B., Li, Y., & Zhang, L. (2011b). Corporate tax avoidance and stock price crash risk:
Firm-level analysis. Journal of Financial Economics, 100(3), 639-662.

Also see

Online: import excel, merge, regress, egen