Traditionally standard deviation has been considered as the main risk measure of an asset portfolio. The relevance of VaR analysis is widely recognized as an instrument for market risk quantification for investment decisions, asset allocation. Based on common practice VaR is estimated on 10-day basis and using 99 % confidence interval. More accurate VaR estimation requires identifying the optimal VaR parameters. Our paper documents that historical VaR has some limitation for high volatile stock markets. We conduct empirical analysis of statistical tests of VaR estimation with frequency tests, magnitude tests, independence and autocorrelation tests for the Russian stock market. We propose an original algorithm for optimal VaR specification in terms of accuracy of VaR estimates. We used historical and semi parametric VaR (EWMA VaR and volatility adjusted VaR). For each method we consider 16 VaR specifications (which are different combinations of time horizons-120, 250, 500 and 1000 trading days, and confidence intervals-90 %, 95 %, 99 %, 99,5 %). We consider the unstable Russian stock market with two main Russian indexes-MICEX and RTS. Backtesting different VaR specifications show that annual 99 % VaR prevails over other VaR specifications for the Russian stock indices. The significance level of confidence 1-5 % are optimal on various time horizons. VaR with our method of algorithmically defined parameters is more effective than commonly used estimation procedure.