Leverage R Code within .Net Environments (Running a CVaR Model in C# Applications)


A nifty .NET library, ‘R.NET‘, allows you to leverage previously written R scripts within your C# and other .NET applications. Experienced model developers often end up accumulating extremely useful R scripts which have been optimized to perform specific tasks. When you have a library of codes that you trust to perform operations as you expect, the knowledge that you can re-use the codes regardless of the development platform is invaluable. This is one of the benefits R.NET provides.

R.NET is just one of several method you can use to establish an interface between C# (.NET). The advantage of R. R.NET is that it enables the .NET Framework to ‘interoperate’ with the R statistical language in the same process (this is important because it prevents bulky code) . Also, the syntax is simple enough that anyone who has a little experience with both R and .NET products can pretty easily use it.Read More »

Using Multidimensional Linear Interpolation to find Economic Capital Rates

In banking, Economic Capital (EC), is an internal measure of capital required to absorb unexpected losses while remaining solvent at a targeted solvency level. It provides a common basis for comparing risk-adjusted profitability and relative economic value of lines of business and asset classes with varying degrees and sources of risk.  EC has various applications that include performance measurement, risk-adjusted pricing, capital allocation, capital adequacy and risk concentration management. EC can be allocated at either a loan, facility or line of business level.

Economic Capital is statistically/quantitatively determined and designed to be sensitive to changes in loan characteristics (risk factors) as a result of both systematic and idiosyncratic factors. Very often EC is calculated through the use of Monte Carlo Simulation – An analytical technique that involves performing a large number of random iterations, called simulations, to generate a statistical distribution of possible outcomes.  In finance, Monte Carlo simulations are used to value and analyze complex instruments, portfolios and investments by simulating the various sources of uncertainty affecting their value.Read More »