ABSTRACT
Risk measures, such as value-at-risk and expected shortfall, are widely used to keep track of the risk at which a financial portfolio is exposed. This analysis is not only a key part of the daily operation of financial institutions worldwide, but it is also strictly enforced by regulators. While nested Monte Carlo simulations are the most flexible approach that can even deal with portfolios containing complicated derivatives, they traditionally suffer from a high computational complexity. This limits their application at certain intervals of time, mostly daily, by temporarily keeping the composition of the portfolio static.
In this work, we bring together for the first time nested Monte Carlo simulations with the real-time continuous risk measurement of complex portfolios that dynamically change their composition during intraday operation. By combining the development productivity offered by Python, state-of-the-art mathematical optimizations, and the high performance capabilities offered by PyOpenCL targeting heterogeneous computing systems, our new approach reaches a throughput between 16 and 191 trading orders per second per computing node, which corresponds to the worst-case and best-case scenarios respectively.
We have also made use of the Jupyter Notebook, as an interactive interface in an interdisciplinary research environment.
- 2014. Project Jupyter. Online. (2014). Retrieved October 10, 2017 from http://jupyter.org/Google Scholar
- 2017. Git. Online. (2017). Retrieved October 10, 2017 from https://git-scm.com/Google Scholar
- Achim Basermann, Melven Röhrig-Zöllner, and Joachim Illner. 2015. Performance and Productivity of Parallel Python Programming: A Study with a CFD Test Case. In Proceedings of the 5th Workshop on Python for High-Performance and Scientific Computing (PyHPC '15). ACM, 2:1--2:10. Google ScholarDigital Library
- Barbara Chapman, Gabriele Jost, and Ruud van der Pas. 2007. Using OpenMP: Portable Shared Memory Parallel Programming (Scientific and Engineering Computation). The MIT Press.Google Scholar
- Jon Danielsson. 2011. Financial Risk Forecasting. Wiley.Google Scholar
- Sascha Desmettre, Ralf Korn, Javier Alejandro Varela, and Norbert Wehn. 2016. Nested MC-Based Risk Measurement of Complex Portfolios: Acceleration and Energy Efficiency. Risks 4, 4 (2016). http://www.mdpi.com/2227-9091/4/4/36Google Scholar
- Matthew F. Dixon, Thomas Bradley, Jike Chong, and Kurt Keutzer. 2012. Monte Carlo-Based Financial Market Value-at-Risk Estimation on GPUs. In GPU Computing Gems (jade ed.), Wen-Mei W. Hwu (Ed.). Vol. 2. Morgan Kaufmann, Chapter 25, 337--353. Google ScholarCross Ref
- Shayne Fletcher and Christopher Gardner. 2009. Financial Modelling in Python. Wiley Publishing.Google Scholar
- Python Software Foundation. 2017. The Python Tutorial. Online. (2017). Retrieved October 10, 2017 from https://docs.python.org/3/tutorial/Google Scholar
- Yves Hilpisch. 2014. Python for Finance: Analyze Big Financial Data (1st ed.). O'Reilly Media, Inc.Google Scholar
- Lee Howes and Aaftab Munshi. 2015. The OpenCL Specification. online. (Jan 2015). https://www.khronos.org/registry/cl/specs/opencl-2.1.pdfGoogle Scholar
- John C. Hull. 2012. Options, Futures, And Other Derivatives (8th ed.). Pearson.Google Scholar
- Intel. 2014. OpenCL Design and Programming Guide for the Intel Xeon Phi Coprocessor. Online. (2014). Retrieved October 10, 2017 from https://software.intel.com/en-us/articles/opencl-design-and-programming-guide-for-the-intel-xeon-phi-coprocessor?language=ruGoogle Scholar
- Adriaan Joubert and L.C.G. Rogers. 1997. Fast, accurate and inelegant valuation of American options. In Proceedings of the Numerical Methods Workshop at the Isaac Newton Institute, April 1995, L.C.G. Rogers and D. Talay (Eds.). Cambridge University Press, 88--92. http://www.statslab.cam.ac.uk/~chris/papers/aj2.pdf Google ScholarCross Ref
- Vadim Kartoshkin and Timothy Mattson. 2011. Tutorial: OpenCL - Introduction for HPC Programmers. (Mar 2011). https://software.intel.com/en-us/articles/tutorial-opencl-introduction-for-hpc-programmers last access: 31 Aug 2017.Google Scholar
- Andreas Klöckner, Nicolas Pinto, Yunsup Lee, Bryan Catanzaro, Paul Ivanov, and Ahmed Fasih. 2012. PyCUDA and PyOpenCL: A Scripting-based Approach to GPU Run-time Code Generation. Parallel Comput. 38, 3 (mar 2012), 157--174. Google ScholarDigital Library
- Christoph Lassner. 2016. PyMP. Online. (2016). Retrieved October 10, 2017 from https://github.com/classner/pympGoogle Scholar
- Alexander J. McNeil, RÃidiger Frey, and Paul Embrechts. 2005. Quantitative Risk Management: Concepts, Techniques, and Tools. Princeton University Press, Princeton and Oxford.Google Scholar
- Amit Mehta, Max Neukirchen, Sonja Pfetsch, and Thomas Poppensieker. 2012. Managing market risk: Today and tomorrow. McKinsey Working Papers on Risk 32. McKinsey & Company. http://www.mckinsey.com/business-functions/risk/our-insights/managing-market-risk-today-and-tomorrowGoogle Scholar
- Attilio Meucci. 2005. Risk and Asset Allocation. Springer, Berlin Heidelberg. Google ScholarCross Ref
- Attilio Meucci. 2010. Factors on Demand: Building a Platform for Portfolio Managers, Risk Managers and Traders. Risk 23, 7 (2010), 84--89. https://ssrn.com/abstract=1565134Google Scholar
- J. P. Morgan and Reuters. 1996. RiskMetrics: RiskMetrics Technical Document. Technical Report 4th ed. New York.Google Scholar
- Basel Committee on Banking Supervision. 2010. Basel III: A global regulatory framework for more resilient banks and banking systems. Technical Report. Bank for International Settlements. http://www.bis.org/publ/bcbs189.pdf (rev June 2011).Google Scholar
- David A. Patterson and John Hennessy. 2009. Computer Organization and Design (4 ed.). Morgan Kaufmann.Google Scholar
- James Reinders. 2012. An Overview of Programming for Intel Xeon processors and Intel Xeon Phi coprocessors. Intel, Online. (2012). Retrieved October 10, 2017 from http://download.intel.com/newsroom/kits/xeon/phi/pdfs/overview-programming-intel-xeon-intel-xeon-phi-coprocessors.pdfGoogle Scholar
- Javier Alejandro Varela and Norbert Wehn. 2017. Near Real-Time Risk Simulation of Complex Portfolios on Heterogeneous Computing Systems with OpenCL. In Proceedings of the 5th International Workshop on OpenCL (IWOCL 2017). ACM, New York, NY, USA, 2:1--2:10. http://doi.acm.org/10.1145/3078155.3078161Google ScholarDigital Library
- Peter Vincent, Freddie Witherden, Brian Vermeire, Jin Seok Park, and Arvind Iyer. 2016. Towards Green Aviation with Python at Petascale. In SC16: International Conference for High Performance Computing, Networking, Storage and Analysis. 1--11. https://doi.org/10.1109/SC.2016.1Google ScholarDigital Library
Index Terms
- Real-Time Financial Risk Measurement of Dynamic Complex Portfolios with Python and PyOpenCL
Recommendations
Near Real-Time Risk Simulation of Complex Portfolios on Heterogeneous Computing Systems with OpenCL
IWOCL '17: Proceedings of the 5th International Workshop on OpenCLHigh-performance computing systems are highly required nowadays in financial risk analysis and management, which has become a key process at the core of financial institutions. Risk metrics such as portfolio value-at-risk and expected shortfall are ...
Sovereign credit ratings, market volatility, and financial gains
The reaction of EU bond and equity market volatilities to sovereign rating announcements (Standard & Poor's, Moody's, and Fitch) is investigated using a panel of daily stock market and sovereign bond returns. The parametric volatilities are defined ...
How Do Financial Firms Manage Risk? Unraveling the Interaction of Financial and Operational Hedging
This paper investigates how firms manage risk by examining the relationship between financial and operational hedging using a sample of bank holding companies. Risk management theory holds that capital market imperfections make cash flow volatility ...
Comments