1. Find a set of return data from
a set of price/rate data: = P2/P1 - 1 or Ln(P2) - Ln(P1)
2. Calculate mean = AVERAGE(return data)
3. Calculate stdev = STDEV(return data)
4. Calculate VaR (99% confidence level) = mean - 2.33*stdev, should
be negative.
5. today value = latest price/rate data
6. tomorrow worst case = today value* (1 + VaR)
note: daily data of one asset
If a portfolio of assets,
The steps:
1. Collect historical daily data for asset A prices and calculate
the daily return.
2. Collect historical daily date for asset B prices and calculate
the daily return.
3. Generate covariance matrix for asset A and B.
4. Calculate portfolio variance and standard deviation. In Excel,
it can be done using MMULT(MMULT(TRANSPOSE(value),covariance)
5. Calculate VaR at 99% confidence level as 2.326 multiply by
standard deviation.
6. Tomorrow's worst value = Today's value - VaR
以上是如何在excel中处理var模型的计算。要点在于计算方法的学习。同样,在stata中也可以作同样的处理操作,然而对于矩阵的计算,matlab更为强大一些。