Do you need to code if you want to work in risk management?
Risk managers are an often overlooked, and definitely unappreciated, part of a typical financial institution. They are usually ignored, at least until something goes wrong which they are often unfairly blamed for.
Essentially risk management involves getting data, analysing it, and making decisions based on the results. The first two parts of that process usually require someone to write some code. But risk managers rarely have the luxury of large teams of dedicated technologists which a front office managing director can call upon. They have to be highly resourceful, and do more with less. Often much of the grunt work has to be done in house. To do this well requires knowledge of an esoteric set of coding languages and tools.
You might think getting the data is the easy part. Far from it. It’s the dream of every risk manager to work in a bank or fund with a single integrated database of positions and market price data, with a beautiful GUI that allows them to model global or desk level risk with a few clicks. But I doubt such a database exists.
In my first job, as an investment bank trader, our risk was calculated using a hodge podge of spreadsheets with embedded VBA code, bespoke C++ and Java written by our risk quants, and various pieces of third party software. Things have improved since then, but not as much as you might expect. It is the nature of finance that it loves to produce innovative products. But the boring back end infrastructure to keep up with innovation is often slow to arrive. Even now, risk managers will frequently find themselves working with a mixture of ad-hoc datasets for newer products, internal systems for well established markets, and third party solutions for vanilla instruments.
To pull in data from disparate sources a good risk manager will probably need some knowledge of VBA (to get data out of spreadsheet formulas), and SQL (necessary to access classic ‘big iron’ legacy databases). It’s also helpful to know ‘glue’ languages like PHP, Perl or Python which can be used to write scripts to automate the tiresome task of collecting data.
Eventually all the data you need will be available in one place, perhaps a data warehouse or Hadoop cluster. You are now ready to produce reports for the various stakeholders who require them.
But modern risk management is way beyond calculating the few option greeks that were in the risk reports I was using as a trader in the early 2000’s. New regulations like FRTB call for more granular and sophisticated reports, which often involve performing data intensive simulations or monte-carlo analysis. At the same time the number of discrete assets that need to be modelled is larger than ever, so risk managers need to be masters of ‘big data’.
The favourite open source languages of data scientists, R and Python, are popular choices; as is the commercial product Matlab. However these aren’t particularly good at dealing with very large amounts of data, and the flexibility they offer may be overkill for standardised reports where robustness and speed are more important.
As an alternative, Apache Spark can be used to manage large datasets stored across clusters. Spark offers APIs for R and Python, but also for Scala (the language Spark is built in). Alternatively if robustness is preferred to flexibility, then a ‘works out of the box’ solution like SAS visual analytics or Tableau may be a better option.
Good risk managers who can code will always be in demand. High level coding skills will also make you more desirable if you want to move into a front office role. Several of the risk managers I have worked with are now hedge fund PMs, and another has even started his own fund.
Robert Carver has worked with many fine risk managers, on the sell side as a derivatives trader at Barclays Capital, and on the buy side as head of fixed income at quantitative hedge fund AHL. Now he trades his own capital, and is acutely aware of the value of risk management. He is the author of ‘Leveraged Trading’, 'Systematic Trading' and 'Smart Portfolios'.