I'd like to calculate credit risk by single asset of a portfolio. For this purpose I have to summarize the total loan position by client. Having this number I start to "transfer" the loan amount to the each assets limited to the asset value of the position. The loan transfer will only take place until the full amount of the loan has been transferred.
Has anybody an idea how this could be done by QV script?
Thank you in advance