Random Thoughts On Market Risk Aggregation
Now that I’ve got PV numbers being calculated I need to look at aggregation. The obvious choice in this is to look at SQL Server 2008 Analysis Services. There are a few old MSDN articles that talk about Real-time OLAP, and I’m sure I could try using ROLAP for T and MOLAP for T-1. But I think there is a better way for real-time. Specifically as I’ve blogged about sometime ago there are numerous products that offer cube style functionality in-memory, and for real-time risk (RTR) I think this is the path I need to follow. It’s also clear that I need a scalable solution, which probably means I need to leverage a distributed cache – but we’re getting ahead of ourselves thinking about caches. Let’s first consider how we are going to build an aggregation framework to support real time MDX/XMLA queries.
If you look at a OLAP cube its fundamentals are dimensions and measures. So the initial Proof Of Concept for the aggregation engine is to build an appropriate hierarchical tree structure that holds the dimensions and measures. Reduce contention to a minimum and see if we can load the “cube” with 5-10K per second update of position/risk data. Then look to at hook for aggregation engines off the cube, leveraging an appropriate notification mechanism. Aggregation engines need to be attachable in a dynamic way so that only the aggregations that are in use and in play, otherwise the calculations will overwhelm the application. Finally, we need to see if our public API allows us to handle MDX queries. If I get this far I suspect I’ll be doing well 🙂 The final obvious hurdle is to move to a distributed environment. More to come.
Sidebar: Convention-based auto-registration extension for Unity