计算机科学 ›› 2018, Vol. 45 ›› Issue (5): 291-294.doi: 10.11896/j.issn.1002-137X.2018.05.050

• 交叉与前沿 • 上一篇    下一篇

基于历史模拟法的风险价值算法在GPU上的实现和优化

张劼,文敏华,林新华,孟德龙,陆豪   

  1. 上海清算所 上海200001,上海交通大学高性能计算中心 上海200240,上海交通大学高性能计算中心 上海200240,上海交通大学高性能计算中心 上海200240,上海清算所 上海200001
  • 出版日期:2018-05-15 发布日期:2018-07-25
  • 基金资助:
    本文受NVIDIA GLOBAL CENTER OF EXCELLENCE,NVIDIA GPU全球卓越中心项目资助

Implementation and Optimization of Historical VaR on GPU

ZHANG Jie, WEN Min-hua, Jame LIN, MENG De-long and LU Hao   

  • Online:2018-05-15 Published:2018-07-25

摘要: 风险价值(Value at Risk,VaR)是风险管理的基本工具,可对现有头寸的下行风险提供量化衡量方法。基于历史模拟法的VaR(Historical VaR)是最流行的计算方法之一,被广泛应用于世界各大金融机构。对金融产品进行实时或准实时的VaR计算,对于及时规避金融风险具有重要意义。由于金融产品日益复杂,产品数量持续增长,现有CPU计算平台上的计算能力已经难以满足VaR的性能需求。为解决这一问题, 在GPU上使用CUDA 对Historical VaR的计算代码进行了实现和优化。通过改进排序算法、基于Multi-stream 隐藏通讯时间、解耦数据依赖并实现细粒度并行等优化方法,CUDA版本的VaR计算性能比优化后的CPU单核性能提升了42.6倍,为快速计算超大数量债券的VaR提供了有效的解决方案。以上优化方法也可以为金融领域内其他算法的GPU化提供思路。

关键词: 风险价值,Historical VaR,CUDA,风险管理

Abstract: Value at Risk(VaR) is a fundamental tool for risk management,providing a quantitative measure of the downside risks to existing positions.Historical VaR is one of the most popular methods of VaR calculation,which is widely used in many financial institutions in the world.Real time or quasi-real-time VaR calculation for financial pro-ducts is quite important to avoid financial risks in time.Due to the increasing complexity and increasing number of financial products,the computational capability of existing CPU platforms has not been able to meet the requirements of risk management for computing speed.To solve this problem,the historical VaR method was implemented and optimized on GPU by using CUDA.By improving the sorting algorithm,overlapping the communication time using Multi-stream,decoupling the data dependency and implementing the fine-grained parallel optimization method,42.6x speedup is achieved when it is compared with the performance of the single core CPU,which provides solution for fast VaR calculation of large amount of bonds.The optimization methods of this paper can also be referenced by other financial algorithms on GPU.

Key words: Value at risk,Historical VaR,CUDA,Risk management

[1] Group of Thirty.Derivatives:Practices and Principles.http://group30.org/images/uploads/publications/G30_Derivatives-PracticesandPrinciples.pdf.
[2] ZHANG B,OOSTERLEE C W.Option pricing with COS me-thod on graphics processing units[C]∥IEEE International Symposium on Parallel & Distributed Processing,2009(IPDPS 2009).IEEE,2009:1-8.
[3] DANG D M,CHRISTARA C C,JACKSON K R.An efficient graphics processing unit-based parallel algorithm for pricing multi-asset American options[J].Concurrency and Computation:Practice and Experience,2012,24(8):849-866.
[4] BURKE N,RAU-CHAPLIN A,VARGHESE B.Computing probable maximum loss in catastrophe reinsurance portfolios on multi-core and many-core architectures[J].Concurrency and Computation:Practice and Experience,2016,28(3):836-847.
[5] ABBAS-TURKI L A,VIALLE S,LAPEYRE B,et al.Pricing derivatives on graphics processing units using Monte Carlo si-mulation[J].Concurrency and Computation:Practice and Expe-rience,2014,26(9):1679-1697.
[6] FATICA M,PHILLIPS E.Pricing American bonds with least squares Monte Carlo on GPUs[C]∥Proceedings of the 6th Workshop on High Performance Computational Finance.ACM,2013:5.
[7] WESTON S,SPOONER J,RACANIRE S,et al.Rapid computation of value and risk for derivatives portfolios[J].Concurrency and Computation:Practice and Experience,2012,24(8):880-894.
[8] ZHANG N,MAN K L,XIE D.Computing Value at Risk inOpenCL on the Graphics Processing Unit[J].Lecture Notes in Electrical Engineering,2015,9:71-78.
[9] WOOD T.Applications of GPUs in computational finance[D].Amsterdam:Universiteit van Amsterdam,2010.

No related articles found!
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!