Assessing Solvency by Brute Force is Computationally Tractable

Similar documents
Algorithmic Differentiation of a GPU Accelerated Application

Liangzi AUTO: A Parallel Automatic Investing System Based on GPUs for P2P Lending Platform. Gang CHEN a,*

Financial Mathematics and Supercomputing

Stochastic Grid Bundling Method

Anne Bracy CS 3410 Computer Science Cornell University

Near Real-Time Risk Simulation of Complex Portfolios on Heterogeneous Computing Systems with OpenCL

Accelerating Financial Computation

Mark Redekopp, All rights reserved. EE 357 Unit 12. Performance Modeling

Tampere University of Technology. Kanniainen, Juho; Piché, Robert; Mikkonen, Tommi. Use of distributed computing in derivative pricing

Outline. GPU for Finance SciFinance SciFinance CUDA Risk Applications Testing. Conclusions. Monte Carlo PDE

The Dynamic Cross-sectional Microsimulation Model MOSART

Pricing Early-exercise options

Financial Risk Modeling on Low-power Accelerators: Experimental Performance Evaluation of TK1 with FPGA

HPC IN THE POST 2008 CRISIS WORLD

A. 11 B. 15 C. 19 D. 23 E. 27. Solution. Let us write s for the policy year. Then the mortality rate during year s is q 30+s 1.

Better decision making under uncertain conditions using Monte Carlo Simulation

Hedging Strategy Simulation and Backtesting with DSLs, GPUs and the Cloud

Least Squares Monte Carlo (LSMC) life and annuity application Prepared for Institute of Actuaries of Japan

NAG for HPC in Finance

An evaluation of the genome alignment landscape

PBA Reserve Workshop What Will PBA Mean to You and Your Software? Trevor Howes, FCIA, FSA, MAAA. Agenda. Overview to PBA project

Why know about performance

INSTITUTE AND FACULTY OF ACTUARIES. Curriculum 2019 SPECIMEN SOLUTIONS

In physics and engineering education, Fermi problems

Barrier Option. 2 of 33 3/13/2014

The Impact of Natural Hedging on a Life Insurer s Risk Situation

MATH/STAT 4720, Life Contingencies II Fall 2015 Toby Kenney

Modelling Anti-Terrorist Surveillance Systems from a Queueing Perspective

An Algorithm for Distributing Coalitional Value Calculations among Cooperating Agents

PRICING AMERICAN OPTIONS WITH LEAST SQUARES MONTE CARLO ON GPUS. Massimiliano Fatica, NVIDIA Corporation

Legend. Extra options used in the different configurations slow Apache (all default) svnserve (all default) file: (all default) dump (all default)

Stochastic Pricing. Southeastern Actuaries Conference. Cheryl Angstadt. November 15, Towers Perrin

Ultimate Control. Maxeler RiskAnalytics

COS 318: Operating Systems. CPU Scheduling. Jaswinder Pal Singh Computer Science Department Princeton University

Accelerated Option Pricing Multiple Scenarios

Proxy Function Fitting: Some Implementation Topics

arxiv: v1 [cs.dc] 14 Jan 2013

Valuation of Large Variable Annuity Portfolios: Monte Carlo Simulation and Benchmark Datasets

VALUATION OF VARIABLE ANNUITIES USING GRID COMPUTING AXA LIFE EUROPE HEDGING SERVICES (ALEHS) 05/06/2008

Innovation in the global credit

Chapter 5 - Annuities

Enhancing Singapore s Pension Scheme: A Blueprint for Further Flexibility

Actuarial Factors Documentation

Efficient Reconfigurable Design for Pricing Asian Options

Economic Capital Modeling

Subject CS2A Risk Modelling and Survival Analysis Core Principles

Solvency II Risk Management Forecasting. Presenter(s): Peter M. Phillips

Fundamentals of Actuarial Mathematics

SPEED UP OF NUMERIC CALCULATIONS USING A GRAPHICS PROCESSING UNIT (GPU)

IFRS17 System Implementation in Korea

FINANCIAL OPTIMIZATION

Multistage risk-averse asset allocation with transaction costs

Dynamic Replication of Non-Maturing Assets and Liabilities

A Branch-and-Price method for the Multiple-depot Vehicle and Crew Scheduling Problem

Model efficiency is an important area of model management,

Stochastic Analysis Of Long Term Multiple-Decrement Contracts

St. Paul Teachers Retirement Fund Association

Asset Liability Management An Integrated Approach to Managing Liquidity, Capital, and Earnings

The CMI Mortality Projections Model

Lecture 8: Skew Tolerant Design (including Dynamic Circuit Issues)

Efficient Algorithms for Flood Risk Analysis

Scaling SGD Batch Size to 32K for ImageNet Training

An Empirical Study of Optimization for Maximizing Diffusion in Networks

Preparing for Solvency II Theoretical and Practical issues in Building Internal Economic Capital Models Using Nested Stochastic Projections

ACTL5105 Life Insurance and Superannuation Models. Course Outline Semester 1, 2016

Sensitivity Analysis and Worst-Case Analysis Making use of netting effects when designing insurance contracts

PARELLIZATION OF DIJKSTRA S ALGORITHM: COMPARISON OF VARIOUS PRIORITY QUEUES

Michael Clive Gibson Resume

Modelling, Estimation and Hedging of Longevity Risk

CSCI 1951-G Optimization Methods in Finance Part 00: Course Logistics Introduction to Finance Optimization Problems

Predicting the Success of a Retirement Plan Based on Early Performance of Investments

Multistate Demography with R? Samir K.C. World Population Program - IIASA

Many-core Accelerated LIBOR Swaption Portfolio Pricing

w w w. I C A o r g

Presented by: Debbie Munoz Jesse Pittman Scott Willrich. February 15, 2018

Aleš Ahčan Darko Medved Ermanno Pitacco Jože Sambt Robert Sraka Ljubljana,

Unparalleled Performance, Agility and Security for NSE

Session 70 PD, Model Efficiency - Part II. Moderator: Anthony Dardis, FSA, CERA, FIA, MAAA

St. Paul Teachers Retirement Fund Association

Jacob: What data do we use? Do we compile paid loss triangles for a line of business?

June 7, The Hartford Financial Services Group, Inc. Smith Barney Annuity & Life Risk Management Seminar

Martingale Pricing Theory in Discrete-Time and Discrete-Space Models

CS224W: Social and Information Network Analysis Jure Leskovec, Stanford University

for Finance Python Yves Hilpisch Koln Sebastopol Tokyo O'REILLY Farnham Cambridge Beijing

Dynamic Solvency Test

msg.ilis Standard software for central data management for actuarial calculations

A GENERALISATION OF THE SMITH-OLIVIER MODEL FOR STOCHASTIC MORTALITY

SECOND EDITION. MARY R. HARDY University of Waterloo, Ontario. HOWARD R. WATERS Heriot-Watt University, Edinburgh

Volunteer Computing in the Clouds

Speeding Up Exact Solutions of Interactive Dynamic Influence Diagrams Using Action Equivalence

Revenue Management Under the Markov Chain Choice Model

Hedging Longevity Risk using Longevity Swaps: A Case Study of the Social Security and National Insurance Trust (SSNIT), Ghana

The Effect of Interventions to Reduce Fertility on Economic Growth. Quamrul Ashraf Ashley Lester David N. Weil. Brown University.

Efficient Reconfigurable Design for Pricing Asian Options

Pakes (1986): Patents as Options: Some Estimates of the Value of Holding European Patent Stocks

Optimal decumulation into annuity after retirement: a stochastic control approach

Dynamic Programming: An overview. 1 Preliminaries: The basic principle underlying dynamic programming

Real-Time Market Data Technology Overview

Babu Banarasi Das National Institute of Technology and Management

CUDA-enabled Optimisation of Technical Analysis Parameters

Transcription:

O T Y H E H U N I V E R S I T F G Assessing Solvency by Brute Force is Computationally Tractable (Applying High Performance Computing to Actuarial Calculations) E D I N B U R M.Tucker@epcc.ed.ac.uk Assessing Solvency by Brute Force is Computationally Tractable 1

Overview - about us - motivation - optimisation - progress - where to next? Assessing Solvency by Brute Force is Computationally Tractable 2

About Us - who we are - Mark Tucker - 14 years at Aegon - currently writing software for real-time systems for military aircraft - Mark Bull - 15 years in EPCC - on OpenMP steering board - EPCC - 25 years within University of Edinburgh s School of Physics - UK s leading High Performance Computing centre - run ARCHER, UK s national academic supercomputer - services to businesses consultancy training by-the-hour hire of high performance machines - what we are doing - applying HPC to profitability and reserving calculations - perform large volume of calculations in reasonable time scales Assessing Solvency by Brute Force is Computationally Tractable 3

Motivation 1: Annuity Disinvestments - estimate the amount of cash needed each month - payments to annuitants - investment expenses (as proportion of reserves held) need to know reserves at each step - effectively, profitability with - one basis for calculating reserves - another basis for projecting - industry-standard software on PCs - separate data set for each cohort - performance (for largest data set of each type) Policy Number of Run Policies Type Policies Time per Second Immediate Annuities 126,000 35 hrs 1.0 Reversionary Annuities 19,000 13.5 hrs 0.4 major bottleneck is calculating reserves Assessing Solvency by Brute Force is Computationally Tractable 4

Motivation 2: Brute Force Annuity Reserves - Solvency II thousands of scenarios - based on (ex)aegon s modelling actuary s interpretation B 0 B 1 B 2 B 3 B 4 S 1 S 2 S 3 S 4 - B t is reserve on best-estimate basis at time t - 1000 scenarios at each future monthly time step S t is 5 th worst scenario at time t, i.e. 1-in-200 reserve - require additional capital = v t max(s t B t, 0) t>0 - beyond contemplation? - time for largest set of IA s is 12.6m core hours ( 1440 core years) - still more than 1 year when using 250 quad-core PCs - to obtain results in under a week, need more than 75000 CPU cores into the realms of Top 500 supercomputer Assessing Solvency by Brute Force is Computationally Tractable 5

Optimisation: Techniques Performance Gain Change Algorithm Parallelisation Serial Optimisation Use Libraries Tune Compiler Options Change Hardware Implementation Effort Assessing Solvency by Brute Force is Computationally Tractable 6

Optimisation: Implementation - change hardware - until recently, standard practise in life offices - now have more cores per chip (cores no longer getting faster) need to embrace parallel processing - changing from i5 s to Xeon s can still lead to small gain speedup of 1.8 by moving from desktop PC to server - change compiler switches - requires some knowledge of target hardware - use modern compiler can benefit from modern hardware - need source code not always possible in packages which auto-generate code speedup of 3.8 by selecting appropriate compiler options - use libraries - none exist - optimise serial code - replace calls to power function with repeated multiplication - simplify loop nests and other arithmetical steps not always possible in packages which auto-generate code speedup of 12.4 from changes to serial code Assessing Solvency by Brute Force is Computationally Tractable 7

Optimisation: Implementation 2 - parallelisation - use OpenMP - de-facto standard - shared memory / threaded API - standards exist for C, C++ and Fortran aimed at calculation-intensive codes - built into modern compilers portable - minimal changes to sequential code - helps if code being parallelised is well written - split loop over policies across multiple threads each thread running on different core - some benefit in tuning the parallelisation parameters - speedup of 45.8 using 48 cores (nearly 96% efficient) - change the algorithm - work smarter - not harder Assessing Solvency by Brute Force is Computationally Tractable 8

Recurrence Algorithm: Motivation - level single life annuities - summation: ä x = v t tp x t=0 - recurrence: ä x = 1 + v p x ä x+1 - solution: assume q x = 1 for x > 120 and work backwards - level reversionary annuities - summation: ä x y = v t tq x t p y t=0 - recurrence: ä x y = v p x p y ä x+1 y+1 + v q x p y ä y+1 - combine with recurrence relation for single life to give the pair ä x y = v p x p y ä x+1 y+1 + v q x p y ä y+1 ä y = 1 + v p y ä y+1 - use matrix notation ) ( ) ( ) ( (äx y = v 0 0 0 0 px p y q x p y + v ä y 0 1 1 0 p y ) (äx+1 y+1 ä y+1 ) Assessing Solvency by Brute Force is Computationally Tractable 9

Recurrence Algorithm: Theory - general case r x,t = v f t W x,t,f c x,t + v t W x,t,1 r x+1,t Tucker and Bull, Algorithmic Finance (2014), 3:3-4, 143-161. - based on time-inhomogeneous Markov chain - chain is formed by survival states of the lives involved - x = vector of ages of lives on which the policy depends - r x,t = vector of reserves required depending on the state of the lives - f [0, 1] = fraction through step where cashflows occur - v t = time-varying interest rate (independent of the number of lives) - W x,t,g = stochastic matrix of survivorship - c x,t = vector of cash flows depending on the state of the lives - variable interest and variable/improving mortality rate at each step - computational complexity: for s outstanding time steps - summation: O(s 2 ) - recurrence: O(s) Assessing Solvency by Brute Force is Computationally Tractable 10

Recurrence Algorithm: Implementation - works for all (non-unit linked) policies with determinable cash flows - our use of annuities is purely because they provided our motivation - stochastic matrix is straightforward to obtain - two states: annuities (level and increasing), endowments,... - third state: assurances (term and whole life),... - extends to any number of lives using tensor products - can ignore states which only ever lead to zero cash flows - example: level, two life, last survivor annuity gp x g p y g p x g q y g q x g p y g q x g q y - W x,t,g = 0 gp x 0 gq x 0 0 gp y gq y 0 0 0 1 g {f, 1} - c x,t = ( 1 1 1 0 ) T ( T - r x,t a (LS) x,y a x a y 0) where indicates generality of timing Assessing Solvency by Brute Force is Computationally Tractable 11

Recurrence Algorithm: Processing Time - processing times (per policy) for single life annuities 1.50E-02 1.25E-02 Average Time per Policy (seconds) 1.00E-02 7.50E-03 5.00E-03 2.50E-03 0.00E+00 360 420 480 540 600 660 720 780 840 900 960 1020 Number of Projection Steps Summation Recurrence speedup of 100 from use of recurrence Assessing Solvency by Brute Force is Computationally Tractable 12

Recurrence Algorithm: Complexity - processing times (per policy) for simple annuities 5.0E-05 4.0E-05 Average Time per Policy (seconds) 3.0E-05 2.0E-05 1.0E-05 0.0E+00 360 420 480 540 600 660 720 780 840 900 960 1020 Number of Projection Steps Single Life Reversionary clear evidence of linearity over number of steps Assessing Solvency by Brute Force is Computationally Tractable 13

Optimisation: Reward Observed Speedup 100 Change Algorithm Parallelisation 10 Serial Optimisation 1 Tune Compiler Options Change Hardware 1 10 100 Estimated Man-Days Assessing Solvency by Brute Force is Computationally Tractable 14

Progress: Annuity Disinvestments - speedup (Immediate Annuities) Optimisation Pols Per Sec None 1.0 Increase Level of Compiler Optimisation 3.8 Manually Optimise Interpolation Routine 6.3 Manually Optimise Reserving Calculation 17 Remove Calls to Power Function 47 Implement Recurrence Algorithm 4,600 Change to Multi-Core Platform 8,600 OpenMP Parallelisation (48 threads on 48 cores) 390,000 - now limited by time taken to read data from disk - conclusion: write your own parallel code Assessing Solvency by Brute Force is Computationally Tractable 15

Progress: Brute Force Annuity Reserves - have 1000 runs with one scenario at each future step - 1000 tranches, each with 780 future steps - representative portfolio of 500,000 annuities type SL RA JL LS number of policies 300,000 100,000 50,000 50,000 - one machine with two 8-core chips acts as single 16-core shared memory machine - timing (per tranche) - one scenario at each future monthly step for representative portfolio type SL RA JL LS overall wall-clock time (sec) 81.5 45.2 23.4 26.1 actual wall-clock time 3 mins estimated wall-clock time for all 1000 scenarios 50 hours total CPU time 800 core hours - conclusion: write your own parallel code Assessing Solvency by Brute Force is Computationally Tractable 16

I/O Considerations - performance of disinvestments is limited by time taken to read data - policy data 56.5MB for 500k annuity policies - assumptions (per tranche) - 110MB for mortality tables - 2 sexes, 40 YoB s, 120 ages, 780 future time steps - 5.5MB for each of interest rate / inflation rate / investment exp pct - combine all assumptions for each tranche into one file - overall input - one 56.5MB file to be read 1000 times - one thousand 126MB files, each to be read once likely to require to sustained input of 1GB per sec - output reserves at each future step 1 file per tranche - one thousand 18KB files to be written once - post-processing step - read results and populate arrays - perform 780 sorts, each on 1000 elements - output 5 th largest at each step - time is insignificant Assessing Solvency by Brute Force is Computationally Tractable 17

Future Work: Continuation - other policy types - implement policy which requires 3 states? - implement highly optimised code for common cases? - implement the general case (cash flows defined by user)? - other CPU-based machines - same machine as used for disinvestments - four 12-core CPUs which can be used as single 48-core SMP - runtime should drop to around 17 hours (wall-clock) estimator for runtime using hardware available within life offices - use one hundred of nodes of ARCHER - ARCHER can be rented by the hour see www.epcc.ed.ac.uk not beyond reach of commercial entities - each node has two 12-core CPUs runtime should drop to around 20 minutes (wall-clock) indicative cost at 10p per core hour 80 c.f. 1m using commercial software...... if you could run it on ARCHER Assessing Solvency by Brute Force is Computationally Tractable 18

Future Work: Other Technologies - Intel s Xeon-Phi chip - 60 cores, each with 4-way multi-threading effectively 240 cores on single chip - performance (with non-actuarial codes) is not spectacular don t expect to drop to 1 hour expect this to be no worse than about 24 hours - GPUs - a few thousand cores per chip, but each core is slower than CPU - researched in other scientific areas over past few years generally around 50 to 60 times faster than CPUs one GPU might be able to do all 1000 scenarios in one hour - small cluster of GPUs is relatively inexpensive option could do several brute force runs over lunch Assessing Solvency by Brute Force is Computationally Tractable 19

Future Work: Other Tasks - bases - dynamically generated (rather than read from file) either can someone let us know how the bases are created? or can someone give us real scenario info? - other tasks - alternative interpretation (per conference, Royal Soc Edin, Apr2014) - 10 6 scenarios for first year - 10 3 nested scenarios to the end of the projection require clarification - do the bases within each nesting differ? - what is the interesting output from this setup? - assessing the accuracy of approximations - for a given set of bases, we know the correct answer can see how close we can get by sub-sampling - approach the correct answer by increasing the number of scenarios might be able to do 100 the number of scenarios 1 - each scenario uses the number of data points 100 - might be able to guide the regulations Assessing Solvency by Brute Force is Computationally Tractable 20

Future Work: Other Problems - approximations - assume that all cash flows happen in advance - prudent - increases speed can assess which simplifications/approximations are worth making - pricing - profitability of 1000 model points on each of 1000 bases a few seconds fully interactive - sensitivity analysis - effect of changes to interest/mortality on reserve/profitability have small enough changes to perform numerical differentiation - your ideas - what would you do with a program which runs this quickly? Assessing Solvency by Brute Force is Computationally Tractable 21

Questions & Discussion - thank you for listening Assessing Solvency by Brute Force is Computationally Tractable 22

Prepared Answer: Upper Bound on Run Times - for the 16-core SMP type SL RA JL LS number of policies 300,000 100,000 50,000 50,000 time excl i/o (sec) 78.57 42.09 20.15 22.9 time for 50000 pols 13.095 21.045 20.15 22.9 lives 1 2 2 2 non-zero entries in W x,t,g 1 3 1 5 - linear regression gives runt ime = 5.5125 + 6.895 lives + 0.6875 nonzeroes R 2 = 0.9972 - fitted times: type SL RA JL LS time for 50000 pols 13.095 21.365 19.99 22.74 not unreasonable - can estimate the upper bound on run time for any policy type no real benefit in producing code for all types of policy Assessing Solvency by Brute Force is Computationally Tractable 23

Prepared Answer: The Shape of Our Synthetic Data - shape is that of cohort of recent retirees - single life - all policies incepted in year preceding valuation date - age at inception U(57, 67) - roughly 73% males - roughly 81% monthly payments, remainder annual - amount of each payment is s where ln s N(5.0, 1.47 2 ) - annual escalation rate is roughly rate 0% 3% 4.25% 5% proportion of pols 95% 3.5% 1% 0.5% - reversionary annuity / joint life / last survivor - same major characteristics as single life - age difference U( 4, 4) maximum difference is 4 years, with no regard to which is older - effect of ages is to create long outstanding terms run times are not unrepresentative Assessing Solvency by Brute Force is Computationally Tractable 24