Backtesting VaR models

The value at risk (VaR) measures the maximum loss a financial asset can experience in n days with a given probability α. There are several methods to calculate VaR. The reliability of these models is usually an empirical question. Backtesting procedures are used by comparing realized returns and VaR generated by different models. Most of these procedures rely on the analysis of the hit sequence or VaR violations.  Commonly used VaR backtesting procedures include the likelihood-ratio test by Kupiec (1995), the Markov tests by Christoffersen (1998), and the duration-based test by Christoffersen and Pelletier (2004). 


Our Stata Code

We have developed easy to use yet robust code for backtesting VaR models. The code needs just a basic understanding of Stata. Further, our comments on each line of code make the application of the code not only easy, but also help the users to understand the process more clearly.


What is included in the code

The code package includes the following;
1. A sample dataset
2. Static and rolling window calculations
3. Conventional VaR based on the unconditional (historical) standard deviation
4. Modified VaR of Cornish-Fisher
5. VaR based on a GARCH(1,1) model
6. VaR 95% based on a EGARCH(1,1) model
7. Unconditional coverage test
8. Independence test
9. Conditional coverage test

We can also help by modifying the codes to match your research questions and hypotheses.



The full package is available for $ 299 (USD). If only parts of the package are required, then each part is available for $99. For example, you might be interested just in the calculation of VaR using GARCH(1,1). Therefore, you shall pay $99 and get the example dataset with the code that calculates VaR using GARCH(1,1) method. Payment can be made using any of the following methods.


   Wise bank transfer (preferred due to low transaction costs).

  Any major crypto currency

For further details, please contact us at:


See our full list of completed projects

Project Code: P59



Christoffersen, P. F. 1998. Evaluating interval forecasts. International Economic Review 39: 841

Christoffersen, P. F., and D. Pelletier. 2004. Backtesting value-at-risk: A duration-based approach. Journal of Financial Econometrics 2: 84–108. 

Kupiec, H. 1995. Techniques for verifying the accuracy of risk measurement models. No. 95-24, 
Finance and Economics Discussion Series, Board of Governors of the Federal Reserve System