Dear All,
I would like to caluculate Value at Risk on each banks on each time.
I already finished to calculate "Expected Return Vector" and "Variance-Covariance Matrix" on each time useing "mvport" function maded by Alberto Dorantes.
But I cannot make "Portfolio Vector" each banks on each time from my panel data.
Panel Date like below.
I want to extract several Portfolio Vector(1*3) on each time and each bank from panel data.
I tried it useing "mkmat" function with "if" or "by()", but failed.
My purpose is to add Value at Risk on my panel date as below using "Expected return vector" and "Variance-Covariance Matrix" caluclated sepalately.
How I can do it?
Please advice me if you have good idea.
Regards
Shun Otani
I would like to caluculate Value at Risk on each banks on each time.
I already finished to calculate "Expected Return Vector" and "Variance-Covariance Matrix" on each time useing "mvport" function maded by Alberto Dorantes.
But I cannot make "Portfolio Vector" each banks on each time from my panel data.
Panel Date like below.
Time | Bank | Equity | Bond | Deposit&Cash |
2010 | A Bank | 0.2 | 0.5 | 0.3 |
2011 | A Bank | 0.1 | 0.6 | 0.3 |
2012 | A Bank | 0.1 | 0.5 | 0.4 |
: | : | : | : | : |
2010 | B Bank | 0.3 | 0.4 | 0.3 |
2011 | B Bank | 0.4 | 0.5 | 0.1 |
: | : | : | : | : |
: | : | : | : | : |
I tried it useing "mkmat" function with "if" or "by()", but failed.
My purpose is to add Value at Risk on my panel date as below using "Expected return vector" and "Variance-Covariance Matrix" caluclated sepalately.
How I can do it?
Please advice me if you have good idea.
Time | Bank | Equity | Bond | Deposit&Cash | Value at Risk |
2010 | A Bank | 0.2 | 0.5 | 0.3 | XXX |
2011 | A Bank | 0.1 | 0.6 | 0.3 | YYY |
2012 | A Bank | 0.1 | 0.5 | 0.4 | ZZZ |
: | : | : | : | : | : |
2010 | B Bank | 0.3 | 0.4 | 0.3 | AAA |
2011 | B Bank | 0.4 | 0.5 | 0.1 | BBB |
: | : | : | : | : | : |
: | : | : | : | : | : |
Shun Otani