Test A-IRB approach for credit rating Basel II or Basel III framework would allow qualified financial institutions to apply their own rating systems for credit risks, such as advanced internal ratings-based approach (A-IRB). The equations of required capital play a big role in it. With full-fledged facility of SAS, an automatic selection system can be built by its’ macros, SQL syntax and function compiler. I just ran a simple experiment based on a standard seven-level grading system, toward a data set with a varying PD and the fixed EAD, LGD and maturity.First 1000 rating structures were simulated. SAS's seeds are used to memorize the structures (Liang has an interesting ...
Use MongoDB as a JSON factory MongoDB is a persistent data store for JSON formatted data, which seems like an ideal middleware between the data tier software and the web. With MongoDB, Javascript's Map/Reduce functionality makes many trivial jobs particularly easy, such as translate an object to an array. For example, we can produce a bubble plot with Highcharts.js and the SASHEP.IRIS dataset in SAS very quickly.Step 1: push SAS dataset toward MongoDBFirst, let's push the SASHEP.IRIS dataset from SAS to MongoDB using thesas2mongo macro.%sas2mongo(data = sashelp.iris, dbname = demo, collname = iris, tmpfolder = c:\tmp, mongofolder =c:\mongodb\bin);Step 2: make the JSON fileUnder the MongoDB shell, we could use Javascript'smap function to transform data ...
A SAS macro that exports data to MongoDB MongoDB is possibly the most popular NoSQL data store. To bypass schema and constraint, I feel quite convenient to implement MongoDB as buffer to accompany current RDBMS .Also it is straightforward to use MongoDB and other tools (MEAN) to build some simple web apps for statistics presentation.Neither SAS nor 10gen so far published any SAS-MongoDB driver. However, the table-like dataset in SAS can be transformed to CSV by PROC EXPORT or DATA Step. MongoDB has a nice API mongoimport that easily accepts CSV formatted data. I write a macro in SAS below to transport data from SAS to MongoDB. The speed is quite fast.****************(1) MODULE-BUILDING ...
Play Basel II Accord with SAS (1): capital requirement Basel II Accord, revised by Basel Committee on Banking Supervision (BCBS) and adopted by more than 100 nations, regulates the commercial banks’ capital against risks. Major US banks are under the transition window to fully comply it (2008-2011) [Ref. 1]. I am especially interested in exploring Basel II by SAS codes.Basel II Accord provides the detailed requirements by its three ‘pillars’. Pillar 1 is about the minimal capital requirement and tries to hold the total capital at 8% of risk-weighted assets. Paragraph 272 gives the equations to calculate the capital requirement for a loan with its risk factors, such as ...
Bubble plot by SAS and Highcharts.js Bubble plot is a nice data visualization choice for three dimensional numeric variables. It seems quite popular on web and documents. Static plotting by SASSince SAS 9.3, PROC SGPLOT provides a bubble statement, which makes a bubble plot easy. For example, the dataset SASHELP.CLASS can be quickly projected onto a bubble plot.proc sgplot data = sashelp.class; title 'bubble plot by sashelp.class'; bubble x = weight y = height size = age / group = sex transparency = 0.5; yaxis grid;run;Dynamic plotting by SAS and Highcharts.jsFor the show-off on web, an interactive bubble plot above will be much more attractive. First we ...