F1 Acceleration for Montecarlo: financial algorithms on FPGA

Similar documents
High Performance and Low Power Monte Carlo Methods to Option Pricing Models via High Level Design and Synthesis

Accelerating Financial Computation

Barrier Option. 2 of 33 3/13/2014

Monte Carlo Simulations

Computational Finance

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

Pricing Early-exercise options

Financial Mathematics and Supercomputing

Accelerating Quantitative Financial Computing with CUDA and GPUs

Analytics in 10 Micro-Seconds Using FPGAs. David B. Thomas Imperial College London

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

2.1 Mathematical Basis: Risk-Neutral Pricing

Stochastic Grid Bundling Method

HIGH PERFORMANCE COMPUTING IN THE LEAST SQUARES MONTE CARLO APPROACH. GILLES DESVILLES Consultant, Rationnel Maître de Conférences, CNAM

Computational Finance in CUDA. Options Pricing with Black-Scholes and Monte Carlo

GPU-Accelerated Quant Finance: The Way Forward

Efficient Reconfigurable Design for Pricing Asian Options

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

Monte Carlo Methods for Uncertainty Quantification

Efficient Reconfigurable Design for Pricing Asian Options

Design of a Financial Application Driven Multivariate Gaussian Random Number Generator for an FPGA

History of Monte Carlo Method

Optimal Search for Parameters in Monte Carlo Simulation for Derivative Pricing

Definition Pricing Risk management Second generation barrier options. Barrier Options. Arfima Financial Solutions

Hardware Accelerators for Financial Mathematics - Methodology, Results and Benchmarking

Monte Carlo Option Pricing

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

Valuation of performance-dependent options in a Black- Scholes framework

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

Valuation of Asian Option. Qi An Jingjing Guo

MATH4143: Scientific Computations for Finance Applications Final exam Time: 9:00 am - 12:00 noon, April 18, Student Name (print):

King s College London

Advanced Topics in Derivative Pricing Models. Topic 4 - Variance products and volatility derivatives

Asian Option Pricing: Monte Carlo Control Variate. A discrete arithmetic Asian call option has the payoff. S T i N N + 1

Calibrating to Market Data Getting the Model into Shape

Pricing Variance Swaps under Stochastic Volatility Model with Regime Switching - Discrete Observations Case

Domokos Vermes. Min Zhao

Accelerating Reconfigurable Financial Computing

Reconfigurable Acceleration for Monte Carlo based Financial Simulation

Accelerated Option Pricing Multiple Scenarios

Parallel Multilevel Monte Carlo Simulation

Ultimate Control. Maxeler RiskAnalytics

Monte-Carlo Pricing under a Hybrid Local Volatility model

HyPER: A Runtime Reconfigurable Architecture for Monte Carlo Option Pricing in the Heston Model

An Energy Efficient FPGA Accelerator for Monte Carlo Option Pricing with the Heston Model

The Use of Importance Sampling to Speed Up Stochastic Volatility Simulations

New GPU Pricing Library

Implementing hybrid PDE solvers

Stochastic Volatility

Towards efficient option pricing in incomplete markets

Financial Risk Management

EFFICIENT MONTE CARLO ALGORITHM FOR PRICING BARRIER OPTIONS

Numerical Methods in Option Pricing (Part III)

Modeling Path Dependent Derivatives Using CUDA Parallel Platform

Computer Exercise 2 Simulation

Computer Exercise 2 Simulation

List of Abbreviations

1.1 Basic Financial Derivatives: Forward Contracts and Options

MATH6911: Numerical Methods in Finance. Final exam Time: 2:00pm - 5:00pm, April 11, Student Name (print): Student Signature: Student ID:

Remarks on stochastic automatic adjoint differentiation and financial models calibration

Financial derivatives exam Winter term 2014/2015

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

Computational Finance Improving Monte Carlo

Optimizing Modular Expansions in an Industrial Setting Using Real Options

GRAPHICAL ASIAN OPTIONS

- 1 - **** d(lns) = (µ (1/2)σ 2 )dt + σdw t

1. In this exercise, we can easily employ the equations (13.66) (13.70), (13.79) (13.80) and

King s College London

Multi-level Stochastic Valuations

NEWCASTLE UNIVERSITY SCHOOL OF MATHEMATICS, STATISTICS & PHYSICS SEMESTER 1 SPECIMEN 2 MAS3904. Stochastic Financial Modelling. Time allowed: 2 hours

MASM006 UNIVERSITY OF EXETER SCHOOL OF ENGINEERING, COMPUTER SCIENCE AND MATHEMATICS MATHEMATICAL SCIENCES FINANCIAL MATHEMATICS.

Applications of Dataflow Computing to Finance. Florian Widmann

2 f. f t S 2. Delta measures the sensitivityof the portfolio value to changes in the price of the underlying

The Binomial Lattice Model for Stocks: Introduction to Option Pricing

Monte Carlo Methods in Finance

The Binomial Lattice Model for Stocks: Introduction to Option Pricing

A Moment Matching Approach To The Valuation Of A Volume Weighted Average Price Option

Algorithmic Differentiation of a GPU Accelerated Application

Monte Carlo Methods in Structuring and Derivatives Pricing

Efficient Random Number Generation and Application Using CUDA

Numerical schemes for SDEs

Sample Path Large Deviations and Optimal Importance Sampling for Stochastic Volatility Models

Math Computational Finance Double barrier option pricing using Quasi Monte Carlo and Brownian Bridge methods

Handbook of Financial Risk Management

Accelerated Variance Reduction Methods on GPU

The Evaluation of American Compound Option Prices under Stochastic Volatility. Carl Chiarella and Boda Kang

Math 623 (IOE 623), Winter 2008: Final exam

Contents Critique 26. portfolio optimization 32

Math Computational Finance Barrier option pricing using Finite Difference Methods (FDM)

S4199 Effortless GPU Models for Finance

MATH3075/3975 FINANCIAL MATHEMATICS TUTORIAL PROBLEMS

Math 416/516: Stochastic Simulation

stratification strategy controlled by CPUs, to adaptively allocate the optimal number of simulations to a specific segment of the entire integration d

Assignment - Exotic options

HPC IN THE POST 2008 CRISIS WORLD

Evaluation of Asian option by using RBF approximation

AMH4 - ADVANCED OPTION PRICING. Contents

Selection and implementation of high-performance. platforms in nance: The end-user's point of view. Manchester, January University of Manchester

Numerix Pricing with CUDA. Ghali BOUKFAOUI Numerix LLC

Pricing Dynamic Guaranteed Funds Under a Double Exponential. Jump Diffusion Process. Chuang-Chang Chang, Ya-Hui Lien and Min-Hung Tsay

Transcription:

F1 Acceleration for Montecarlo: financial algorithms on FPGA Presented By Liang Ma, Luciano Lavagno Dec 10 th 2018

Contents Financial problems and mathematical models High level synthesis Optimization Accelerators on Amazon web services

Financial products Bank deposit Various debits Bond Stocks Derivatives

Options A contract A right to buy or sell an instrument at a given price on certain date in the future Expiration date T Stock price, S t, t (0, T) Strike price, K, specified in the contract Call option To buy the instrument at K Put option To sell the instrument at K

Options Execution Call option To buy the instrument at K Put option To sell the instrument at Example Take call option as an example if S T > K Profit: S T K else Profit: 0

Options Option types European vanilla option Execute at date T P call = max(s T K, 0) P put = max(k S T, 0) American vanilla option Execute before date T European barrier option Execution condition: stock price must stay within the preset barriers Asian option Compute the payoff price with the average stock price Option price

Option pricing model Black-Scholes model ds = rsdt + σsdz Itӧ Lemma S(t + t) = e r 1 2 σ2 t+σε t

Option pricing model Heston model ds = rsdt + VSdz 1 dv = κ(θ V)dt + σ V VSdz 2

Solution Monte Carlo Method Stochastic process Random numbers Time dependent differential equations Preset time partition: t 0 = 0, t 1, t 2, t m, t M = T Path simulation: S 0 = S t0, S 1, S 2, S m = S tm, S M = S tm Large amount of paths (N) in total to achieve convergent result

Solution Random numbers Mersenne-Twister Algorithm Box-Muller transformation

Algorithm B-S model Heston model

Performance on CPU Model Option F1 CPU [s] Blcak-Scholes Model European vanilla option 3.56 Asian option 3.88 Heston Model European vanilla option 5.16 European barrier option 1.25

Acceleration on GPU Model Option Nvidia GTX 950 [ms] Blcak-Scholes Model Heston Model European vanilla option Power [W] Nvidia Tesla P100 [ms] 11.15 84 2.4 170 Asian option 11.17 84 2.11 170 European vanilla option European barrier option 26.3 91 4.31 181 26.13 87 4.33 180 Power [W] Device Process [nm] CUDA cores Frequency [GHz] Power [W] Nvidia GTX 950 28 640 0.9 75 Nvidia Tesla P100 16 3584 1.2 250

Acceleration on FPGA High level synthesis (HLS) is a design methodology at the system level or algorithm level, to design the hardware system. As the design abstraction from the gate level to RTL, the migration from RTL to HLS makes the design more productive and easy to be maintained and verified High level synthesis (HLS) is a design methodology at the system level or algorithm level, to design the hardware system. As the design abstraction from the gate level to RTL, the migration from RTL to HLS makes the design more productive and easy to be maintained and verified.

Software design Modular desing

Architecture General modules Datapath

Architecture PRNG Mersenne Twister algorithm

Architecture Optimization on the PRNG BRAM partition

Architecture Step simulation Critical cycle in orange

Architecture Step simulation optimization Pipelining of multi-cycle step simulations

Architecture Step simulation optimization Step simulation source code

Architecture Path simulation parallelization Unroll of loops

Architecture Path simulation parallelization Parallel independent compute units

Architecture Path simulation parallelization Dataflow optimization

Performance Implementation on AWS F1 TEMPORARY RESULT, UPDATE AS SOON AS THE NEW DATA PREPARED Model Option F1 FPGA [ms] Power[W] Blcak-Scholes Model Heston Model European vanilla option 3.2 80 Asian option 3.21 80 European vanilla option European barrier option 6.35 85 6.33 85

Conclusion Modular design of Monte Carlo methods applied to the stock option pricing problems Implementation on state-of-the-art FPGAs Various hardware architecture optimizations using high level synthesis. Performance and resource utilization Comparable performance with respect to state of the art GPU implementations (and of course with respect to CPUs), with a very significant energy saving.