Stata Code for Liquidity Adjusted (LCAPM) with Application of MGARCH

Acharya and Pedersen (2005) presented a theoretical model to explain asset prices with four types of liquidity risks, thereby modifying the single factor capital asset pricing model (CAPM) into liquidity adjusted capital asset pricing model (LCAPM). They argue that expected return on a security is based on:

  1. Return sensitivity of a portfolio or an asset with the market return
  2. Commonality in liquidity of a portfolio or an asset  with the market liquidity, 
  3. Return sensitivity of a portfolio or an asset  to market liquidity
  4. Liquidity sensitivity of a portfolio or an asset to market returns
The empirical method to test the model involves development of portfolios. The steps might vary with different flavors of the research design, however, generally the following steps are taken to test the model.

1. Estimate the measure of illiquidyt for each individual stocks. This can be done using a chosen illiquidity measure, such the Amihud (2002) measure of illiquidity, Hasbrouck (2002) measure, Chalmers and Kadlec (1998) measure of bid-ask spread etc.

2. Make a number of test portfolios: Returns of these portfolios will serve as dependent variable. These portfolios are created on the basis of illiquidity size, book to market etc. The idea is to capture different aspects of the returns and to see whether the given model explain variations in returns based on different characteristics. In statistical software such as Stata, R, or SAS, this is done pretty easily.

3. Innovations in illiquidity: Since illiquidity is found to be persistent, it is desirable to estimate innovations over time in illiquidity. 

4. Liquidity betas: From the innovations components derived in step 3, liquidity betas are estimated as a ratio of covariance to variance.

5. The model is tested using the portfolio returns from step 2 and liquidity betas from step 4. A simple cross-sectional regression such as Fama and McBeth (1973), or time-series regression on each portfolio can be applied.

The model can be tested with the assumption of unconditional or conditional time components. If we want to test the unconditional model, then the innovations in liquidity  of step 3 will be estimated using AR() process, where lag terms are identified with appropriate tests. And if we opt for conditional version of the model, then we shall use the multivariate GARCH (MGARCH) model with DVECH (diaognal variation). Therefore, the innovations in step 3 and hence betas in step 4 are estimated as conditional parameters. 

The Stata Code

We have developed a flexible Stata code that performs all of the above steps, with the application of MGARCH. The code can be modified for different methodologies, such as conditional and unconditional LCAPM, time series and cross-sectional regressions, and forming portfolios from the intersection of size, book-to-market, and illiquidity factors. 


We believe in getting a fair price for our efforts. The general pricing details for different codes are given at this page If you need to discuss details or need a customized price quote for your project, please contact at or

We respect privacy and confidentiality of our customers and their data. For complete details in this regard, read our privacy policy by clicking on the link 'Privacy Policy' tab. For other frequently asked questions (FAQs), click on the FAQ tab.