Dear all,

As a complete novice in (VB) programming, I apologize if my problems are ridiculously trivial, but here goes...

Context: I am simulating a CIR process and use the projected rates to determine structured products returns, analyze credit risk etc. The simulation and analysis run just fine, but now I would like to return a matrix where the row dimension equals a preset amount of parameters used in a sensitivity analysis, and the column dimension equals the scope (different perturbations on the variable as defined by the row-index) of the sensitivity analysis (also set to 5).

Problems:
1) For “MatrSens” and “newPar”, type mismatch and subscript out of range (for MatrSens) errors occur. MatrSens should represent a 5 by 5 matrix with the parameter perturbations for the sensitivity analysis, and newPar the 5 by 5 matrix with the new parameter values.

2) As I call 2 other modules (which work fine on their own) within the project, and use variables throughout the whole project, I would like to declare them as public, but for some reason, it doesn’t work out in my case. For instance, the formulas in the “diffusion” procedure make use of sigma and theta, but the values in the diffusion procedure for these variables are “empty”.

Please Login or Register  to view this content.