Dear Professor Attaullah,

I am using Stata 14. The data type of my research is panel data (unbalanced), the time period is 22 years, 5084 firms. One of my explanatory variables requires measuring stock liquidity using Corwin and Schultz (2012) and Pastor and Stambaugh.

There is SAS programming which builds formulas. I wonder whether there is similar programming in Stata.

Therefore, I kindly ask you please to guide me on how to calculate Corwin and Schultz (2012) and Pastor and Stambaugh liquidity measures using Stata.

Thank you in advance.