As it was mentioned earlier, an algorithm to estimate VaR of the portfolio is based on Credit Metrics approach provided by J.P.Morgan [3]. Credit Migration Likelihood matrix and the Table of Recovery rates in case of default were provided by National Rating Agency of Russia and Moody's Investors Service respectively.(Figure 3 and Table 6) While one-year forward zero rates,which can be found in Table 7, were randomly generated from beta distribution by shifting parameters. According to Credit migration liklihood matrix, in one year credit ratings of our companies might migrate to 23 possible states, and therefore the value of the portfolio might change. Twenty three possible present values of each of the 3 bonds in year 2020 were calculated and discounted one year back, so that they are represented in today's money.  Results are provided in Table 8. Note that there are no values of bonds in case of default, those are calculated by means of randomly generated recovery rates by using values from Table 6 as parameters of the beta distribution. In order to analyze the joint credit migration behavior of our portfolio of bonds, Asset value model of Credit Metrics was applied. According to this model, the process that drives change in credit rating of the company is it's asset value. The assumption is that there are certain thresholds of asset returns so that whenever asset value of a company in one year crosses that threshold, credit rating of the firm changes. But to find those thresholds for each company it is required to model the individual distributions of asset returns of every firm. For that purpose, stock returns of Lukoil, Gazprom and Norilsk Nickel were analyzed. Daily closing prices of stocks from 03.01.2006 to 22.02.2019 were provided by Yahoo Finance. 

3.1. Determining stock returns distribution

Spearman's linear correlation coefficients reveal positive correlation between each pair of log-returns. Magnitudes of linear correlations are as follows: 0.8131511 between Lukoil and Gazprom, 0.6947848 between Lukoil and Norilsk Nickel, and 0.6998833 between Gazprom and Norilsk Nickel.