This function allow to change the base risk factor covariance matrix according to a change of base currency, the function also update the mapping.table and ask the user to provide new names for the new fx base risks.
changeBaseCurrency(cov.mat, mapping.table, target.currency, mapping.name)
matrix value corresponding to the covariance matrix of base risk factors. This matrix should have an attribute named "base.currency" indicating the actual base currency in which the covariance matrix is expressed.
S3 object of class mappingTable that should be coherent with the cov.mat
.
character value of length one indicating the new base currency, this should exists
in the mapping.table
.
data.frame indicating the mapping towards new name in the covariance matrix and in the mapping.table for the new fx rate with two columns:
old.name
: the names of the old risk factors in the covariance matrix.
new.name
: the new names of these risk factors.
a list with two named fields:
cov.mat
: the new covariance matrix.
mapping.table
the new mapping.table.