Dear all,
I have a panel dataset containing monthly exchange rate returns of 121 currencies over the period 1998-2010. Further, I have another panel dataset containing individual firms use of foreign currencies in international transactions. I would like to combine both datasets in order to obtain an estimate of the firm's exposure to exchange rate changes, dependent upon the relative use of foreign currencies. Therefore I would like to use Modern Portfolio Theory to calculate portfolio variance. Portfolio variance is typically being calculated as a function of correlations of the portfolio’s assets, for all combinations of assets. Here, obviously the assets are the currencies.
So the datasets look as following:
firmid year weight_currency currency
1 2000 0.10 EUR
1 2000 0.20 USD
.... ... .... ....
and
year month USD/EUR ...... XOF/EUR
2000 1 ..... .....
2000 2
...
2000 12
Some returns are missing here.
I would like to work with matrices and apply the following formula W*S*W', with S being the variance-covariance matrix of exchange rate returns and W representing the weights of each currency in a particular firm's portfolio of currencies used. I would like to estimate S for each year in my panel individually. Therefore, W*S*W' is calculated per id-year combination.
Does anyone have an idea on how to proceed best to tackle this issue? I have come across the mvport package (varrets command) to calculate the variance-covariance matrix, but it is not possible to do this on a year basis.
Many thanks in advance.
Elisabeth
PS. fyi, I requested the Stata forum administrator to change my nickname into my full name just now.
I have a panel dataset containing monthly exchange rate returns of 121 currencies over the period 1998-2010. Further, I have another panel dataset containing individual firms use of foreign currencies in international transactions. I would like to combine both datasets in order to obtain an estimate of the firm's exposure to exchange rate changes, dependent upon the relative use of foreign currencies. Therefore I would like to use Modern Portfolio Theory to calculate portfolio variance. Portfolio variance is typically being calculated as a function of correlations of the portfolio’s assets, for all combinations of assets. Here, obviously the assets are the currencies.
So the datasets look as following:
firmid year weight_currency currency
1 2000 0.10 EUR
1 2000 0.20 USD
.... ... .... ....
and
year month USD/EUR ...... XOF/EUR
2000 1 ..... .....
2000 2
...
2000 12
Some returns are missing here.
I would like to work with matrices and apply the following formula W*S*W', with S being the variance-covariance matrix of exchange rate returns and W representing the weights of each currency in a particular firm's portfolio of currencies used. I would like to estimate S for each year in my panel individually. Therefore, W*S*W' is calculated per id-year combination.
Does anyone have an idea on how to proceed best to tackle this issue? I have come across the mvport package (varrets command) to calculate the variance-covariance matrix, but it is not possible to do this on a year basis.
Many thanks in advance.
Elisabeth
PS. fyi, I requested the Stata forum administrator to change my nickname into my full name just now.
Comment