Antoine Savine, Brian Huge and Hans-Jorgen Flyger
Global Derivatives 2015 Talk
We identify some of the most delicate challenges of a practical implementation of AAD for exotics, xVA and capital requirement calculations, and explain the solutions.
Danske Bank earned the In-House System of the Year 2015 Risk award after implementing AAD in its regulatory systems.
The practical implementation of AAD is explained in words, mathematics and code in our book with Wiley (2018):
Modern Computational Finance: AAD and Parallel Simulations
60 Years Birthday, 30 Years of Ground Breaking Innovation: A Tribute to Bruno...Antoine Savine
- Dupire's work from 1992-1996 defined modern finance by establishing conditions for absence of arbitrage, respect of initial yield curves, and respect of initial call prices.
- Dupire showed that models must respect market prices of options through calibration, demonstrating a necessary and sufficient condition for a wide class of diffusion models.
- Dupire's implied volatility formula expresses the implied variance as an average of local variances weighted by probability and gamma, linking market prices to underlying volatility.
Le fait d'ajouter plus d'informations (description, mots-clés, catégorie) permet de rendre votre contenu plus facile à trouver. Plus vous ajoutez des informations, plus votre contenu est facile à trouver.
The document summarizes the Booth multiplication algorithm, which provides an efficient procedure for multiplying binary integers represented in two's complement form. It illustrates the algorithm through an example of multiplying 2 x -4. The algorithm involves making a Booth table with the multiplier and multiplicand, then examining the bits in each cycle to determine whether to add, subtract, or shift the partial product without modification according to specific rules. After four cycles representing the four bit numbers, the final product is stored in the last rows of the U and V registers.
60 Years Birthday, 30 Years of Ground Breaking Innovation: A Tribute to Bruno...Antoine Savine
- Dupire's work from 1992-1996 defined modern finance by establishing conditions for absence of arbitrage, respect of initial yield curves, and respect of initial call prices.
- Dupire showed that models must respect market prices of options through calibration, demonstrating a necessary and sufficient condition for a wide class of diffusion models.
- Dupire's implied volatility formula expresses the implied variance as an average of local variances weighted by probability and gamma, linking market prices to underlying volatility.
Le fait d'ajouter plus d'informations (description, mots-clés, catégorie) permet de rendre votre contenu plus facile à trouver. Plus vous ajoutez des informations, plus votre contenu est facile à trouver.
The document summarizes the Booth multiplication algorithm, which provides an efficient procedure for multiplying binary integers represented in two's complement form. It illustrates the algorithm through an example of multiplying 2 x -4. The algorithm involves making a Booth table with the multiplier and multiplicand, then examining the bits in each cycle to determine whether to add, subtract, or shift the partial product without modification according to specific rules. After four cycles representing the four bit numbers, the final product is stored in the last rows of the U and V registers.
This document describes the floating point addition algorithm and provides two examples of performing floating point addition in binary. The algorithm involves 4 steps: 1) Convert the numbers to normalized binary, 2) Compare the exponents and match the larger one, 3) Add the significant bits, and 4) Normalize and round the sum if needed. The examples show applying this algorithm to add 0.5 and 0.4375, yielding 0.9375, and to add 10.01101 x 21 and 0.00101101 x 22, yielding 1.01100001 x 22.
This document discusses latches and flip-flops. It describes the SR latch, gated SR latch, D latch, and gated D latch. It also covers edge-triggered flip-flops including the SR, D, and JK flip-flops. The key uses of flip-flops are for data storage, data transfer, counting, and frequency division in digital circuits and sequential logic.
This document discusses combinational logic circuits. It begins with an outline of topics including Boolean algebra, decoders, encoders, and multiplexers. It then provides details on each of these topics. For decoders, it explains their function to decode an input value and provide an output. It provides truth tables for 2-to-4 and 3-to-8 decoders and shows how they can be constructed from logic gates. For encoders, it describes their inverse function of encoding inputs. Priority encoders and their truth tables are also covered. Finally, multiplexers are defined as using address bits to select a single input data line to output. Methods for constructing larger multiplexers from smaller ones are presented.
This document discusses sequential logic circuits and various types of flip flops. It defines sequential logic circuits as circuits whose outputs depend not only on present inputs but also past inputs. Several types of flip flops are described including SR, Clocked SR, JK, T, and D flip flops. The document provides details on the logic symbol, truth table, and logic circuit for SR and JK flip flops. It also discusses clock signals and provides examples of determining the output for various flip flop types given input waveforms.
DC-DC converters are essential components that transform direct current from one voltage level to another, enabling compatibility between electronic components. There are several types of DC-DC converters, including buck converters (which step down voltage), boost converters (which step up voltage), and buck-boost converters (which can do either). Converters operate in either continuous or discontinuous conduction mode depending on load conditions and design goals. Proper control strategies are needed to efficiently regulate output voltage.
The D flip-flop is a modified form of the SR flip-flop that overcomes the shortcoming of invalid or indeterminate output when both S and R inputs are logic 0. It ensures the S and R inputs are never equal using an inverter between the inputs to allow a single D (data) input. The D flip-flop's truth table and characteristic table show that the next state Q(n+1) will always equal the current D input regardless of the clock or current state Qn. This simplified design makes D flip-flops useful in applications like data transfer, counters, registers, and frequency dividers.
Microcontrôleur PIC 16F Microchip part1/2
vous trouvez ci-joint quelques exemples "basique" avec le code (Mikroc) et le schematic/simulation (Isis Proteus)
https://drive.google.com/file/d/0B6cDeCQ2t8S6ZHB3UGdxUGE1bm8/view?usp=sharing
by : Lamghari Mohammed
Formation d'initiation sur le développement sur microcontroleurs stm32 a base de microprocesseur ARM.
Elle présente tout les éléments de base nécessaire pour attaqué le domaine de développement sur cible embarqué.
This document discusses processor design, including custom single-purpose processors and general-purpose processors. It covers topics such as combinational and sequential logic design, finite state machine design, optimizing custom processors by improving the original program, finite state machine with datapath, and datapath and finite state machine. General-purpose processors are also introduced, including their basic architecture consisting of a control unit and datapath.
Unit-1_Digital Computers, number systemCOA[1].pptxVanshJain322212
Data representation: Number System, Big Endian and Little Endian, r complement and r-1 complement arithmetic, Unsigned and Signed number representation, Signed Arithmetic- Addition, Subtraction, Multiplication (Booth Algorithm), Division, Barrel Shifter, Fixed and Floating point representation. Block Diagram for Digital Computers: CPU (Registers, ALU, Clock, Control unit), Memory, Memory hierarchy; Different types of memory in brief: Primary (RAM-Static and Dynamic, ROM, DDR2, DDR3, DDR4, NAND Flash, NOR Flash (Samsung memory datasheet) I/O subsystems, Common Bus System (External and Internal Bus: Address Bus, Data Bus and Control Bus); Computer Organization; Computer Architecture; Introduction to Vonn Neumann and Harvard Architecture, Micro operations (Arithmetic, Logical and Shift micro operations using online simulators), Arithmetic Logic and Shift unit (ALU).
This document describes the floating point addition algorithm and provides two examples of performing floating point addition in binary. The algorithm involves 4 steps: 1) Convert the numbers to normalized binary, 2) Compare the exponents and match the larger one, 3) Add the significant bits, and 4) Normalize and round the sum if needed. The examples show applying this algorithm to add 0.5 and 0.4375, yielding 0.9375, and to add 10.01101 x 21 and 0.00101101 x 22, yielding 1.01100001 x 22.
This document discusses latches and flip-flops. It describes the SR latch, gated SR latch, D latch, and gated D latch. It also covers edge-triggered flip-flops including the SR, D, and JK flip-flops. The key uses of flip-flops are for data storage, data transfer, counting, and frequency division in digital circuits and sequential logic.
This document discusses combinational logic circuits. It begins with an outline of topics including Boolean algebra, decoders, encoders, and multiplexers. It then provides details on each of these topics. For decoders, it explains their function to decode an input value and provide an output. It provides truth tables for 2-to-4 and 3-to-8 decoders and shows how they can be constructed from logic gates. For encoders, it describes their inverse function of encoding inputs. Priority encoders and their truth tables are also covered. Finally, multiplexers are defined as using address bits to select a single input data line to output. Methods for constructing larger multiplexers from smaller ones are presented.
This document discusses sequential logic circuits and various types of flip flops. It defines sequential logic circuits as circuits whose outputs depend not only on present inputs but also past inputs. Several types of flip flops are described including SR, Clocked SR, JK, T, and D flip flops. The document provides details on the logic symbol, truth table, and logic circuit for SR and JK flip flops. It also discusses clock signals and provides examples of determining the output for various flip flop types given input waveforms.
DC-DC converters are essential components that transform direct current from one voltage level to another, enabling compatibility between electronic components. There are several types of DC-DC converters, including buck converters (which step down voltage), boost converters (which step up voltage), and buck-boost converters (which can do either). Converters operate in either continuous or discontinuous conduction mode depending on load conditions and design goals. Proper control strategies are needed to efficiently regulate output voltage.
The D flip-flop is a modified form of the SR flip-flop that overcomes the shortcoming of invalid or indeterminate output when both S and R inputs are logic 0. It ensures the S and R inputs are never equal using an inverter between the inputs to allow a single D (data) input. The D flip-flop's truth table and characteristic table show that the next state Q(n+1) will always equal the current D input regardless of the clock or current state Qn. This simplified design makes D flip-flops useful in applications like data transfer, counters, registers, and frequency dividers.
Microcontrôleur PIC 16F Microchip part1/2
vous trouvez ci-joint quelques exemples "basique" avec le code (Mikroc) et le schematic/simulation (Isis Proteus)
https://drive.google.com/file/d/0B6cDeCQ2t8S6ZHB3UGdxUGE1bm8/view?usp=sharing
by : Lamghari Mohammed
Formation d'initiation sur le développement sur microcontroleurs stm32 a base de microprocesseur ARM.
Elle présente tout les éléments de base nécessaire pour attaqué le domaine de développement sur cible embarqué.
This document discusses processor design, including custom single-purpose processors and general-purpose processors. It covers topics such as combinational and sequential logic design, finite state machine design, optimizing custom processors by improving the original program, finite state machine with datapath, and datapath and finite state machine. General-purpose processors are also introduced, including their basic architecture consisting of a control unit and datapath.
Unit-1_Digital Computers, number systemCOA[1].pptxVanshJain322212
Data representation: Number System, Big Endian and Little Endian, r complement and r-1 complement arithmetic, Unsigned and Signed number representation, Signed Arithmetic- Addition, Subtraction, Multiplication (Booth Algorithm), Division, Barrel Shifter, Fixed and Floating point representation. Block Diagram for Digital Computers: CPU (Registers, ALU, Clock, Control unit), Memory, Memory hierarchy; Different types of memory in brief: Primary (RAM-Static and Dynamic, ROM, DDR2, DDR3, DDR4, NAND Flash, NOR Flash (Samsung memory datasheet) I/O subsystems, Common Bus System (External and Internal Bus: Address Bus, Data Bus and Control Bus); Computer Organization; Computer Architecture; Introduction to Vonn Neumann and Harvard Architecture, Micro operations (Arithmetic, Logical and Shift micro operations using online simulators), Arithmetic Logic and Shift unit (ALU).
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2023/07/efficiently-map-ai-and-vision-applications-onto-multi-core-ai-processors-using-cevas-parallel-processing-framework-a-presentation-from-ceva/
Rami Drucker, Machine Learning Software Architect at CEVA, presents the “Efficiently Map AI and Vision Applications onto Multi-core AI Processors Using CEVA’s Parallel Processing Framework” tutorial at the May 2023 Embedded Vision Summit.
Next-generation AI and computer vision applications for autonomous vehicles, cameras, drones and robots require higher-than-ever computing power. Often, the most efficient way to deliver high performance (especially in cost- and power-constrained applications) is to use multi-core processors. But developers must then map their applications onto the multiple cores in an efficient manner, which can be difficult. To address this challenge and streamline application development, CEVA has introduced the Architecture Planner tool as a new element in CEVA’s comprehensive AI SDK.
In this talk, Drucker shows how the Architecture Planner tool analyzes the network model and the processor configuration (number of cores, memory sizes), then automatically maps the workload onto the multiple cores in an efficient manner. He explains key techniques used by the tool, including symmetrical and asymmetrical multi-processing, partition by sub-graphs, batch partitioning and pipeline partitioning.
This document provides an introduction to SIMD (Single Instruction Multiple Data) programming. It discusses what SIMD is and why it is useful for software optimization. It then covers SIMD support in different processors like CPUs, GPUs, and DSPs. The document discusses different techniques for SIMD optimization including using auto-vectorization, compiler intrinsics, specific frameworks, and assembly coding. It notes some difficult aspects of SIMD programming and concludes by discussing important considerations like ISA design, memory model, execution model, scalability, and trends in SIMD.
This tutorial describes how to generate transconductance (gm) and other curves from simulation data in Cadence to aid in analog circuit design. It involves:
1. Simulating a simple NMOS transistor circuit to sweep the gate voltage and extract operating point parameters.
2. Using a Spectre simulation command file to save parameters like gm, Id, Cgs and Vdsat at each gate voltage point.
3. Processing the saved data in a separate program like Matlab to plot curves of gm versus Id and other relationships.
Presentation by Arjen Markus (Deltares) at the Data Science Symposium 2018, during Delft Software Days - Edition 2018. Thursday 15 November 2018, Delft.
This document discusses fixed point and floating point digital signal processing. Fixed point represents numbers with a minimum of 16 bits in integer format, while floating point uses 32 bits with a mantissa and exponent. Fixed point has limitations like overflow that can be addressed through scaling. Floating point allows for larger dynamic ranges and is more suitable for applications involving changing coefficients. Both have comparable speed, resolution, and power consumption.
Introduces important facts and tools to help you get starting with performance improvement.
Learn to monitor and analyze important metrics, then you can start digging and improving.
Includes useful munin probes, predefined SQL queries to investigate your database's performance, and a top 5 of the most common performance problems in custom Apps.
By Olivier Dony - Lead Developer & Community Manager, OpenERP
Valgrind is a suite of tools for debugging and profiling C and C++ programs. Memcheck is its most popular tool for detecting memory errors like leaks, accesses to uninitialized memory, and invalid reads/writes. It works by instrumenting the program binary to track "V-bits" and "A-bits" associated with each value and memory location. When the program is executed, Memcheck checks these bits to detect errors and produces detailed error reports with stack traces. The tutorial provides instructions on running Memcheck, understanding its output, and using options like suppressions and attaching a debugger. It also briefly describes how Memcheck works and lists some other Valgrind tools.
Empowering the AWS DynamoDB™ application developer with AlternatorScyllaDB
Getting started with AWS DynamoDB™ is famously easy, but as an application grows and evolves it often starts to struggle with DynamoDB’s limitations. We introduce Scylla’s Alternator, which provides the same API as DynamoDB but aims to empower the application developer. In this presentation we will survey some of Alternator’s developer-centered features: Alternator lets you test and eventually deploy your application anywhere, on any public cloud or private cluster. It efficiently supports multiple tables so it does not require difficult single-table design. Finally, Alternator provides the developer with strong observability tools. The insights provided by these tools can detect bottlenecks, improve performance and even lower its cost.
Advanced Spark Programming - Part 2 | Big Data Hadoop Spark Tutorial | CloudxLabCloudxLab
Big Data with Hadoop & Spark Training: http://bit.ly/2kyRTuW
This CloudxLab Advanced Spark Programming tutorial helps you to understand Advanced Spark Programming in detail. Below are the topics covered in this slide:
1) Shared Variables - Accumulators & Broadcast Variables
2) Accumulators and Fault Tolerance
3) Custom Accumulators - Version 1.x & Version 2.x
4) Examples of Broadcast Variables
5) Key Performance Considerations - Level of Parallelism
6) Serialization Format - Kryo
7) Memory Management
8) Hardware Provisioning
The areas of application of the E-ticketing system has increased due to the development of internet technology. E-ticketing is being deployed at an international level. It makes use of modern information technology to achieve the whole process of paperless electronic ticketing, billing, and check-in procedures. The various areas where the e-ticketing system can be deployed are tourism, cinema, conference, large-scale venues with significant traffic. The traditional paper tickets were unable to meet the demand of the modern world thus giving scope for the development of E-ticketing system.
Services allow grouping of related sessions in an Oracle RAC environment for high availability and workload management. Key aspects of services include configuring and managing services using tools like DBCA and Enterprise Manager, using services with applications and components like the Resource Manager and Scheduler, setting performance metrics and thresholds on services, and configuring service aggregation and tracing.
This document discusses various standard single-purpose processors including timers, counters, watchdog timers, UARTs, LCD controllers, stepper motor controllers, analog-to-digital converters, and real-time clocks. It provides details on the functionality and applications of these common peripherals, as well as examples of their basic configurations and implementations.
The document discusses adaptive query optimization in Oracle 12c. Key points include:
- In 12c, adaptive plans allow the execution plan to change at runtime based on statistics collected, such as switching from a hash join to a nested loops join.
- During the first execution, a statistics collector is inserted and the plan is changed. SQL plan directives are then created.
- For subsequent executions, the information from the initial execution is used to automatically re-optimize the plan, improving performance over time.
The document discusses various code tuning techniques to optimize code performance, including unswitching loops, unrolling loops, caching frequently used values, initializing data at compile time, using sentinels in search loops, putting the busiest loop on the inside, pre-computing results, and using integers instead of floating point variables. It provides examples of each technique in different programming languages and the measured time savings from applying each optimization, with some optimizations yielding up to 90% faster execution time. The key message is that minor changes to code implementation through these techniques can significantly improve performance, but optimizations must be carefully tested.
The document provides an overview of techniques for faster computation in MATLAB, including:
- Closing other programs and setting the CPU to high performance to improve performance.
- Preallocating variables to avoid recalculating memory requirements in loops.
- Using suppression with semicolons to avoid displaying variable outputs.
- Converting variables to more efficient data types like single precision.
- Implementing parallel processing on CPUs and GPUs for large datasets using techniques like vectorization and avoiding dependencies between iterations.
Computers can be classified based on their storage and performance efficiency, operating method, and purpose. Supercomputers are used for complex calculations like weather prediction, mainframes support large numbers of users and process transactions concurrently, and microcomputers are used for general purposes like education and entertainment. Programs are written in high-level languages and assembled or compiled into machine code. Hardware refers to physical devices while software refers to instructions that make hardware functional. System software coordinates hardware and applications, while application software helps users solve problems. Operating systems manage system resources and provide interfaces between hardware, software, and users.
Similar to Practical Implementation of AAD by Antoine Savine, Brian Huge and Hans-Jorgen Flyger (20)
Slides for the Differential Machine Learning masterclass given by Brian Huge and Antoine Savine in Barcelona at the Quant Minds International event of December 2021.
This presentation summarises two years of research and development at Danske Bank on the pricing and risk of financial derivatives by machine learning and artificial intelligence.
The presentation develops the themes introduced in two articles in Risk Magazine, October 2020 and October 2021. Those themes are being further developed in the book Modern Computational Finance: Differential Machine Learning, with Chapman and Hall, autumn 2022.
Notes for Computational Finance lectures, Antoine Savine at Copenhagen Univer...Antoine Savine
The document discusses computational finance and machine learning in finance. It begins by noting the need for speed in pricing and hedging derivatives, as institutions must compute values and sensitivities rapidly to hedge risk before markets move. Traditional methods become impractical for complex transactions. The document then discusses various techniques to achieve faster computation, including Monte Carlo simulation, adjoint differentiation, leveraging hardware, and machine learning. Regulatory requirements like counterparty valuation adjustment (CVA) further increase computational demands. Overall, the document emphasizes that speed is critical in financial computation and an active area of research.
Introduction to Interest Rate Models by Antoine SavineAntoine Savine
This document provides an introduction to interest rate models. It begins with a simple model involving parallel shifts of the yield curve. However, this model allows for arbitrage opportunities due to convexity. More advanced models incorporate a risk premium and remove arbitrage by including a drift term representing an average steepening of the curve. Under the historical probability measure, changes in forward rates must satisfy certain conditions to avoid arbitrage. Specifically, the drift must include both a volatility term and a risk premium term, with the risk premium being the same for all rates. Markov models further reduce the dynamics to depend only on a single forward rate.
Notes for Volatility Modeling lectures, Antoine Savine at Copenhagen UniversityAntoine Savine
1) The document discusses volatility modeling and trading, focusing on modeling volatility.
2) It introduces Black-Scholes option pricing theory, describing how Black-Scholes derives the partial differential equation for option prices and provides a unique solution through arbitrage arguments.
3) The document emphasizes that Black-Scholes is robust to assumptions like stochastic processes and distributions, with the key assumption being continuity of price processes.
Financial Cash-Flow Scripting: Beyond Valuation by Antoine SavineAntoine Savine
Antoine Savine's QuantMinds and WBS 2018 Presentation
We explore the implementation of scripting in finance and its application to its full potential, in particular for xVA and related regulatory calculation.
The talk is a short summary of some material from our Modern Computational Finance books with Wiley (2018-2019).
Stabilise risks of discontinuous payoffs with Fuzzy Logic by Antoine SavineAntoine Savine
Antoine Savine's Global Derivatives 2016 Talk
We demonstrate that smoothing, a technique derivatives traders use to stabilise the risk management of discontinuous exotics, is a particular use of Fuzzy Logic.
This realisation leads to a general, automated smoothing algorithm.
The algorithm is extensively explained and its implementation in C++ is provided as a part of our book with Wiley (2018):
Modern Computational Finance: Scripting for Derivatives and xVA
^%$Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Duba...mayaclinic18
Whatsapp (+971581248768) Buy Abortion Pills In Dubai/ Qatar/Kuwait/Doha/Abu Dhabi/Alain/RAK City/Satwa/Al Ain/Abortion Pills For Sale In Qatar, Doha. Abu az Zuluf. Abu Thaylah. Ad Dawhah al Jadidah. Al Arish, Al Bida ash Sharqiyah, Al Ghanim, Al Ghuwariyah, Qatari, Abu Dhabi, Dubai.. WHATSAPP +971)581248768 Abortion Pills / Cytotec Tablets Available in Dubai, Sharjah, Abudhabi, Ajman, Alain, Fujeira, Ras Al Khaima, Umm Al Quwain., UAE, buy cytotec in Dubai– Where I can buy abortion pills in Dubai,+971582071918where I can buy abortion pills in Abudhabi +971)581248768 , where I can buy abortion pills in Sharjah,+97158207191 8where I can buy abortion pills in Ajman, +971)581248768 where I can buy abortion pills in Umm al Quwain +971)581248768 , where I can buy abortion pills in Fujairah +971)581248768 , where I can buy abortion pills in Ras al Khaimah +971)581248768 , where I can buy abortion pills in Alain+971)581248768 , where I can buy abortion pills in UAE +971)581248768 we are providing cytotec 200mg abortion pill in dubai, uae.Medication abortion offers an alternative to Surgical Abortion for women in the early weeks of pregnancy. Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Dubai Abu Dhabi Sharjah Deira Ajman Fujairah Ras Al Khaimah%^^%$Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Dubai Abu Dhabi Sharjah Deira Ajman Fujairah Ras Al Khaimah%^^%$Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Dubai Abu Dhabi Sharjah Deira Ajman Fujairah Ras Al Khaimah%^^%$Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Dubai Abu Dhabi Sharjah Deira Ajman Fujairah Ras Al Khaimah%^^%$Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Dubai Abu Dhabi Sharjah Deira Ajman Fujairah Ras Al Khaimah%^^%$Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Dubai Abu Dhabi Sharjah Deira Ajman Fujairah Ras Al Khaimah%^^%$Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Dubai Abu Dhabi Sharjah Deira Ajman Fujairah Ras Al Khaimah%^^%$Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Dubai Abu Dhabi Sharjah Deira Ajman Fujairah Ras Al Khaimah%^^%$Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Dubai Abu Dhabi Sharjah Deira Ajman Fujairah Ras Al Khaimah%^^%$Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Dubai Abu Dhabi Sharjah Deira Ajman Fujairah Ras Al Khaimah%^^%$Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Dubai Abu Dhabi Sharjah Deira Ajman Fujairah Ras Al Khaimah%^^%$Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Dubai Abu Dhabi Sharjah Deira Ajman Fujairah Ras Al Khaimah%^^%$Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Dubai Abu Dhabi Sharjah Deira Ajman Fujairah Ras Al Khaimah%^^%$Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Dubai Abu Dhabi Sharjah Deira Ajman
University of North Carolina at Charlotte degree offer diploma Transcripttscdzuip
办理美国UNCC毕业证书制作北卡大学夏洛特分校假文凭定制Q微168899991做UNCC留信网教留服认证海牙认证改UNCC成绩单GPA做UNCC假学位证假文凭高仿毕业证GRE代考如何申请北卡罗莱纳大学夏洛特分校University of North Carolina at Charlotte degree offer diploma Transcript
A toxic combination of 15 years of low growth, and four decades of high inequality, has left Britain poorer and falling behind its peers. Productivity growth is weak and public investment is low, while wages today are no higher than they were before the financial crisis. Britain needs a new economic strategy to lift itself out of stagnation.
Scotland is in many ways a microcosm of this challenge. It has become a hub for creative industries, is home to several world-class universities and a thriving community of businesses – strengths that need to be harness and leveraged. But it also has high levels of deprivation, with homelessness reaching a record high and nearly half a million people living in very deep poverty last year. Scotland won’t be truly thriving unless it finds ways to ensure that all its inhabitants benefit from growth and investment. This is the central challenge facing policy makers both in Holyrood and Westminster.
What should a new national economic strategy for Scotland include? What would the pursuit of stronger economic growth mean for local, national and UK-wide policy makers? How will economic change affect the jobs we do, the places we live and the businesses we work for? And what are the prospects for cities like Glasgow, and nations like Scotland, in rising to these challenges?
"Does Foreign Direct Investment Negatively Affect Preservation of Culture in the Global South? Case Studies in Thailand and Cambodia."
Do elements of globalization, such as Foreign Direct Investment (FDI), negatively affect the ability of countries in the Global South to preserve their culture? This research aims to answer this question by employing a cross-sectional comparative case study analysis utilizing methods of difference. Thailand and Cambodia are compared as they are in the same region and have a similar culture. The metric of difference between Thailand and Cambodia is their ability to preserve their culture. This ability is operationalized by their respective attitudes towards FDI; Thailand imposes stringent regulations and limitations on FDI while Cambodia does not hesitate to accept most FDI and imposes fewer limitations. The evidence from this study suggests that FDI from globally influential countries with high gross domestic products (GDPs) (e.g. China, U.S.) challenges the ability of countries with lower GDPs (e.g. Cambodia) to protect their culture. Furthermore, the ability, or lack thereof, of the receiving countries to protect their culture is amplified by the existence and implementation of restrictive FDI policies imposed by their governments.
My study abroad in Bali, Indonesia, inspired this research topic as I noticed how globalization is changing the culture of its people. I learned their language and way of life which helped me understand the beauty and importance of cultural preservation. I believe we could all benefit from learning new perspectives as they could help us ideate solutions to contemporary issues and empathize with others.
How Does CRISIL Evaluate Lenders in India for Credit RatingsShaheen Kumar
CRISIL evaluates lenders in India by analyzing financial performance, loan portfolio quality, risk management practices, capital adequacy, market position, and adherence to regulatory requirements. This comprehensive assessment ensures a thorough evaluation of creditworthiness and financial strength. Each criterion is meticulously examined to provide credible and reliable ratings.
South Dakota State University degree offer diploma Transcriptynfqplhm
办理美国SDSU毕业证书制作南达科他州立大学假文凭定制Q微168899991做SDSU留信网教留服认证海牙认证改SDSU成绩单GPA做SDSU假学位证假文凭高仿毕业证GRE代考如何申请南达科他州立大学South Dakota State University degree offer diploma Transcript
OJP data from firms like Vicinity Jobs have emerged as a complement to traditional sources of labour demand data, such as the Job Vacancy and Wages Survey (JVWS). Ibrahim Abuallail, PhD Candidate, University of Ottawa, presented research relating to bias in OJPs and a proposed approach to effectively adjust OJP data to complement existing official data (such as from the JVWS) and improve the measurement of labour demand.
[4:55 p.m.] Bryan Oates
OJPs are becoming a critical resource for policy-makers and researchers who study the labour market. LMIC continues to work with Vicinity Jobs’ data on OJPs, which can be explored in our Canadian Job Trends Dashboard. Valuable insights have been gained through our analysis of OJP data, including LMIC research lead
Suzanne Spiteri’s recent report on improving the quality and accessibility of job postings to reduce employment barriers for neurodivergent people.
Decoding job postings: Improving accessibility for neurodivergent job seekers
Improving the quality and accessibility of job postings is one way to reduce employment barriers for neurodivergent people.
Falcon stands out as a top-tier P2P Invoice Discounting platform in India, bridging esteemed blue-chip companies and eager investors. Our goal is to transform the investment landscape in India by establishing a comprehensive destination for borrowers and investors with diverse profiles and needs, all while minimizing risk. What sets Falcon apart is the elimination of intermediaries such as commercial banks and depository institutions, allowing investors to enjoy higher yields.
Falcon stands out as a top-tier P2P Invoice Discounting platform in India, bridging esteemed blue-chip companies and eager investors. Our goal is to transform the investment landscape in India by establishing a comprehensive destination for borrowers and investors with diverse profiles and needs, all while minimizing risk. What sets Falcon apart is the elimination of intermediaries such as commercial banks and depository institutions, allowing investors to enjoy higher yields.
2. www.danskemarkets.comAAD
Danske Bank
• AAD
− A game changer for the computation of risk sensitivities
− Applies to risks of derivatives books, xVA, capital charges, etc.
− Useful beyond risk calculations: calibration, static hedge optimization, transaction costs, VAR, ...
• AAD is easy in theory
− Mathematically: an application of the chain rule
− Implementation in C++ with operator overloading now well known
See for instance, Savine, Global Derivatives 2014
(We also quickly recap the main principles)
− Quick and easy implementation with toy code, with ”magical” results
• AAD is hard in practice
− With real-life production systems, however, implementation of AAD is challenging
− Quants in Danske Bank spent a couple of years implementing AAD across production systems
(and were granted the Risk 2015 In-House System of the Year award for their efforts)
− We expose the main problems and share some solutions
2
Introduction
AAD in Finance
1/3
, x x gx
f x g x f g f
3. www.danskemarkets.comAAD
Danske Bank
• Traditionally, with finite difference or ”bumping”
− Bump inputs one by one and recalculate
− Sensitivity to n inputs costs n evaluations
− Even with smart caching, computation time remains proportional to n
• With AAD
− All sensitivities are computed in one single sweep
− Sensitivity to n inputs takes constant time!
− In a given context, 5 sensitivities or 5,000 sensitivities are computed in the same time
− The time is approx 4-8x a single evaluation
• Example: pricing takes 2sec, we produce 1,600 risks
− Bumping: ~1 hour
− AAD: 5sec
− Multithreaded over 4 cores: bumping = 15min, AAD = 1.25sec
3
Introduction
The power of AAD
2/3
4. www.danskemarkets.comAAD
Danske Bank
1) Recap AAD 101: mathematics and implementation
2) Efficient differentiation of main financial algorithms
− Multi-dimensional PDEs with check-pointing
− Monte-Carlo simulations with multi-threading
− Calibrations with the Implicit Function Theorem (IFT)
3) Application to CVA and RWA
4
Introduction
Overview
3/3
5. www.danskemarkets.comAAD
Danske Bank
Reverse Adjoint Propagation
• Consider a scalar function
with value
where we are interested in calculating derivatives for the n independent variables
• Any such function evaluated on a computer is – for a given control flow –
decomposed into a sequence of elementary mathematical operations: +, -, *, /, exp,
log, pow, …
• The elementary operations are unary or binary and the sequence can be written
as
and the result
• The order of the operations is given by the compiler
5
Decompose into a sequence of elementary mathematical operations
1/4
6. www.danskemarkets.comAAD
Danske Bank
Reverse Adjoint Propagation
• For each intermediate operation/variable we define the associated adjoint
• We have and from the chain rule
• I.e. for each elementary operation fj (j>i) having argument(s) xi
− we calculate the analytically known
− And add to the adjoint Ai for argument xi !
− … adjoints are propagated from result to the argument(s)
• All adjoints are calculated by going through the same sequence of operations as
for the (usual fwd) value calculation once
− But calculating adjoint contributions instead of results at each node
− … in reverse order starting from AN with initial condition
6
Reverse adjoint propagation
2/4
8. www.danskemarkets.comAAD
Danske Bank
Reverse Adjoint Propagation
• I.e. to calculate the derivatives of a function , we:
1. Do the usual forward calculation to get y
… keeping track of the entire sequence of operations fj and argument(s) xi
2. Calculate adjoints by running the sequence backwards, starting at
• This may be implemented by
1. Source transformation (e.g. tapenade)
2. Templates and operator overloading in a modern language
• We use templates and operator overloading in C++
… but in all cases is the computational time independent of the number of
sensitivities
8
Implementation
4/4
9. www.danskemarkets.comAAD
Danske Bank
AAD with Operator Overloading in C++
• To implement AAD using templates and operator overloading, we need 4 basic
ingredients
1. A customized number type
2. Operator nodes
3. A ”tape” for storing operator nodes
4. An AD evaluator that calculate adjoints by running the tape backwards
• Since extra work is introduced for each single mathematical operation,
optimizing this part of the code is essential!
9
The 4 ingredients
1/6
10. www.danskemarkets.comAAD
Danske Bank
AAD with Operator Overloading in C++
1. Customized number type
− A class for representing numbers (we call it kDoubleAd)
− Overload all elementary mathematical operations for
kDoubleAd : +, -, *, /, exp, log, pow, …
− As a side effect in the overload, the performed operation is
stored as a node on “the tape”
− The kDoubleAd only needs to contain a pointer to the
operator node
− … e.g. in our earlier example, y contains a pointer to
operator node 8 (”+” operator)
10
First ingredient: kDoubleAd
2/6
• Perform the calculation (e.g. ) using kDoubleAds instead of
native doubles to store the operations
− … by templatizing calculation code
11. www.danskemarkets.comAAD
Danske Bank
AAD with Operator Overloading in C++
2. Operator node
− The operator nodes are stored on the “tape” and contains what is
needed to calculate the adjoint contributions:
− The type of the operation (+, -, *, /, exp, log, pow, …)
− The result of the operation
− Pointer to the argument node(s)
− Placeholder for the adjoint
11
Second ingredient: operator nodes
3/6
12. www.danskemarkets.comAAD
Danske Bank
AAD with Operator Overloading in C++
3. The tape
− The tape is the memory for the operator nodes and contains the entire sequence of operator nodes
− The tape is static (thread_local) to make it accessible for all calculation code
− Memory is allocated as a list of (big) blocks of contiguous memory
− … to limit expensive memory allocations
− … to help the computer’s memory prefetcher (more about that later)
Third ingredient: The tape
4/6
Return constructed
kDoubleAd using RVO
Construct new operator
node using placement new
Node type
Node result
LHS argument node
RHS argument node
12
13. www.danskemarkets.comAAD
Danske Bank
AAD with Operator Overloading in C++
4. The AD RAP evaluator
− Set the initial condition for the adjoints and run backwards through the operator
nodes on the tape to calculate all adjoints
− At each operator node, adjoints are propagated from result to argument node(s)
13
Fourth ingredient: The AD RAP evaluator
5/6
− When done, the derivative can be picked from the
operator node i (e.g. through the pointer to the operator node
sitting on the relevant kDoubleAd variable)
14. www.danskemarkets.comAAD
Danske Bank
AAD with Operator Overloading in C++
AAD complexity
• Fwd calculation: ~ 1 * (non-AD) fwd calculation
− Operator overload side effect
− Memory allocation
• Bwd calculation: ~ 1 * (non-AD) fwd calculation
− ~2 times the (AD) fwd calculation
− Operator node traversal
− More calculations at each node
− E.g. 2 multiplications and 2 additions for the multiplication node
• Expect 4–8 * (non-AD) fwd calculation
• … but constant in number of sensitivities!
14
Complexity
6/6
15. www.danskemarkets.comAAD
Danske Bank
Memory Usage
• Using kDoubleAds quickly fills the tape with operator nodes
− Each core typically produces around 108 operator nodes per sec … corresponding to 4 GB/sec
• … using 64 bit code is a necessity for production scale calculations
• Keep tapes small …
− When the tape is traversed backwards to calculate adjoints, each node is read from the CPUs
memory cache.
− Due to the contiguous memory structure of the tape, the memory pre-fetcher can (and will) load
subsequent nodes into the memory cache before the CPU needs them
− BUT it can not predict and pre-fetch the argument nodes
− … resulting in a high number of cache misses for long tapes (where the CPU has to wait for data
to be loaded from the slow main memory)
• Keeping tapes small – and ideally small enough to fit into the cache – is
important for performance!
− … a large number of small tapes is much better than a small number of large tapes!
15
Memory usage and memory cache
1/1
16. www.danskemarkets.comAAD
Danske Bank
Checkpointing
• Checkpointing is a general technique for splitting the AAD calculation into a
number of smaller slices/tapes
− Split the algorithm into M slices
− and calculate (non-AD) values for the first M-1 slices
− A tape is generated for the final slice M
− and adjoints are calculated using the usual initial conditions
− The tape for slice M is wiped and a tape is generated for slice M-1
− This time adjoints are calculated using the calculated derivatives from slice M as initial
condition
− i.e. we “glue” tapes together via the adjoints
• This is a general method and works well with finite difference grids
16
Reduce tape size by checkpointing
1/2
17. www.danskemarkets.comAAD
Danske Bank
Checkpointing
Calculate derivatives for
Split in 2 slices:
17
The simple example extended to use checkpointing
2/2
Slice 1
Calc value of slice 1 (use double – no AD) Generate tape for slice 2 (use kDoubleAd)
Slice 2
Slice 1 Slice 2
Generate tape for slice 1 (use kDoubleAd)
Set initial conditions
Run slice 2 bwds to calculate adjoints
Slice 2
Store derivatives and wipe tape
Set initial conditions
Run slice 1 bwds to calculate adjoints
Pick derivatives from the xi nodes and wipe tape
1 2
3
4
5
6
7
y
17
18. www.danskemarkets.comAAD
Danske Bank
• Consider the matrix multiplication
where
• If we need for different then we do the multiplication first
and apply the result to each of the
• Instead, if we need for different then we do the
multiplication first and apply the result to each of the
• Remember, the adjoint of a matrix is the transpose
18
1 2
T
Z X B B Y
1 2, , , ,M M M
B B X Y Z
1 2
T
Z X B B Y
1, , LZ Z 1, , LY Y 1 2
T
X B B
'Y s
1, , LZ Z 1, , LX X 2 1
T T T
Y B B
'X s
1/7Linear Algebra of AAD
Is AAD magic?
19. www.danskemarkets.comAAD
Danske Bank
19
1 1 2 32 logy x x x x
4 1 2
4 1 2 1 2
5 3 4
5 3 4
6 5
5
6
5
7 1
7 1
8 6 7
8 6 7
1
2
log
3
2
4 2
5
x x x
n x x x x x
x x x
n x x x
x x
x
n x
x
x x
n x x
x x x
n x x x
2/7Linear Algebra of AAD
Toy example again
20. www.danskemarkets.comAAD
Danske Bank
• Define and let the matrix be the calculation for step
• Since differentiation is a linear operation each calculation can be it written in
matrix form as
or starting from the boundary condition we have
20
1
8
x n
X n
x n
A n 1, ,n N
1X n A n X n
0X
1
1 0 0
N
i
X N A N A X A i X
3/7Linear Algebra of AAD
Calculations on vector form
23. www.danskemarkets.comAAD
Danske Bank
• From this we get
where is the ’th unit vector
• We need to calculate the system with 3 different boundary conditions
• The easiest way is to calculate it forward as
and then apply the 3 different boundary conditions
• This is equivalent to pick the first 3 elements
23
8 8
1
0
N
T T
i
y e X N e A i X
8 1
11
8 2
12
8 3
13
N
T
i
N
T
i
N
T
i
y e A i e
x
y e A i e
x
y e A i e
x
ie i
1 2 3
, ,e e e
8
15 71 2 3 4 6 8
N
T
i
y y y y y y y y e A i
x x x x x x x x
1 2 3
y y y
x x x
6/7Linear Algebra of AAD
Going forward
24. www.danskemarkets.comAAD
Danske Bank
• Checkpointing is just a sub sequence
• Also notice that any sub sequence of calculations is a Jacobian
• I.e. for any we have
• This can be a useful reference when we discuss risk propagation later
24
1 10
T T T
N K
n n
y y yA n A n
X N X KX
Slice 1
1
T
N
n K
y
A n
X N
Slice 2
1
T
K
n
y
A n
X K
1
T T T
K
n k
X Ky y yA n
X K X KX k X k
K k
7/7Linear Algebra of AAD
Sub sequences
25. www.danskemarkets.comAAD
Danske Bank
• Arbitrage free volatility surface
− Andreasen and Huge: Volatility interpolation (Risk March 2011)
• Stochastic volatility model
− Andreasen and Huge: Random Grids (Risk July 2011)
25
,
1 , 0 1
0
ds t s zdW
dz z dt z dZ z
dWdZ
Checkpointed AAD for PDE finite difference grids
Example: SLV – 2D PDE
1/4
26. www.danskemarkets.comAAD
Danske Bank
• Discrete time and state space (FD)
• where is the cashflow at some future time
• is the present value
• is a matrix with the finite differences
26
nd
0v
iA
1 1
1
, 0,1, ,
n
i j n i i
j i
v A d A v i n
Checkpointed AAD for PDE finite difference grids
Grid setup
2/4
27. www.danskemarkets.comAAD
Danske Bank
• is a function of parameters to which we want risks
• To find we run the following checkpointed procedure
1. Run the whole FD without AD and record all the vectors
2. Run the step with AD, record a tape
3. Run RAP over the tape to get
4. Record to be used as boundary for the next RAP over then wipe the tape
5. Repeat from step 2
27
iA ia
0
j
v
a
0 0
1 1
,
v v
a v
Checkpointed AAD for PDE finite difference grids
Algorithm
3/4
iv
0 1 1v Av
0
1
v
v
1 2 2v A v
1 1i i iv A v
28. www.danskemarkets.comAAD
Danske Bank
AD tape step 1
AD tape step 2
0 1 2 3 n-1 n
AD tape step 3
AD tape step n
Checkpointed AAD for PDE finite difference grids
Algorithm
4/4
Running value backward
Running AD forward step by step
1
0
i
v
v
0
i
v
a
28
29. www.danskemarkets.comAAD
Danske Bank
• AAD for Monte Carlo may consume a lot of memory
− 10sec MC run around 40GB for the tape
• Monte Carlo simulation suggests multi threading
− Each path can be handled independently and run in parallel
• Running each path separately would also reduce the need for memory
− Similar to check pointing in the sense it creates more manageable calculations
• AAD creates dependency between paths
− Variables/cashflows are averages across paths
• How do we combine AAD and multi threading?
29
1/4AAD for Monte-Carlo simulations
The problem
30. www.danskemarkets.comAAD
Danske Bank
• Giles and Glasserman: ”Smoking Adjoints: fast Monte Carlo Greeks”
introduced adjoint differentiation in Finance. They used pathwise derivatives
• Essential idea is that under suitable conditions
• Derivatives can be calculated as Monte Carlo estimates on a different payoff
• New ”payoff” can easily be calculated with AAD
• We are again in a situation where Monte Carlo paths
can be treated independently
30
=E
E Cashflow Cashflow
a a
2/4AAD for Monte-Carlo simulations
Pathwise derivatives to the rescue
31. www.danskemarkets.comAAD
Danske Bank
• The derivatives are calculated as
• Each is calculated with AAD over path i
− One tape per simulation, maximum time 1/100sec up to 40MB, almost fits in CPU cache
− Record and wipe the tape between simulations
• Result = average of
• Remember that the output from the tapes is ALL the derivatives
so we only need to run this procedure only once
31
1 1
1 1n n
i
i
i i
E Cashflow Cashflow
X
a n a n
iX
3/4
iX
iX
AAD for Monte-Carlo simulations
Pathwise derivatives with AAD
32. www.danskemarkets.comAAD
Danske Bank
• Multithreading
− Run Monte-Carlo paths in parallel
− Compute pathwise derivatives with AAD in parallel
• Problem:
− Templated code writes to a global/static tape
− Writing to the tape from parallel threads leads to race conditions
• Solution: give each thread its own tape
− thread_local objects are like global/static except each thread has its own copy
− Support for thread local in C++11 standard, Boost, Windows API, ...
• Hence what it takes for AD to work with multi-threaded Monte-Carlo:
− Create a tape for each thread, access it through thread local variables
− Obviously, work with per thread/task copies of variables written into
− In addition, copy inputs into custom number types per thread/task so they land on the right tape!
32
4/4AAD for Monte-Carlo simulations
Multi-threading
33. www.danskemarkets.comAAD
Danske Bank
Risk propagation
33
• Methods explained so far produce derivatives of result to model params
like local volatilities in Dupire
• We want derivatives to market variables, like implied volatilities in Dupire
• Model parameters are derived from market variables
in one or more steps that may involve calibrations
• To Naively run AAD over this process may be unstable and memory consuming
• FAQ: how to run AAD through calibration?
• Solution: first run model with AAD to get sensitivities to model parameters
Then propagate sensitivities backwards to market variables
1/9
34. www.danskemarkets.comAAD
Danske Bank
Backward Risk Propagation and RAP
34
• RAP: Backward propagation of sensitivities at micro (math operation) level
• Risk propagation: Backward propagation of sensitivities at macro (param) level
0 2 2 4log 2y x x x x
Market data -> Interpolated IV -> Calculated LV -> Price
2/9
35. www.danskemarkets.comAAD
Danske Bank
, 02
2 ,
, ,
,
T
K T
KK
C K T
K T g a S
K C K T
Risk Propagation by example: Dupire’s model
35
observed
market implied
BS volatilities
ˆ ˆ
ˆ ˆ ,
1
i
i i iK T
i n
IV surface
= all vanilla option prices
0,, ,a SC K T f K T
Local Volatility
,tS t
computation of LV Result
V
Monte-Carlo, PDE
AADk
V
calibration of a
Result
V
step 1
1
ja a
j m n
,
1
k
k k kS t
k p
Tape Pastingj
V
a
step 2
Implicit Function Theorem
step 3
ˆi
V
step 1 step 2 step 3
Explicit function
(Dupire)
Implicit function
0
2
0
, 0 , 0
ˆ,
ˆ: min , , ,
ˆ, ,i i i i
i
a
i i K T K T
a h S
h e e e a S
e w C a S BS S
spot S0 spot S0 spot S0
0
V
S
0 0
k
k
V V
S S
0 0
j
j
aV V
S a S
Pricing
Risk
3/9
36. www.danskemarkets.comAAD
Danske Bank
• Step 2 in our example: computation of local volatilities
− We know sensitivities to LVs from step 1
− We want to propagate them to sensitivities to interpolation parameters
− We could compute the Jacobian of g and apply the chain rule
− We can do this orders of magnitude faster with tape pasting (but only for explicit functions)
Propagation through explicit functions: Tape Pasting
36
run explicit function in AAD mode
a1
record tape
RAP
V
aV
02 2
02 2
0
2 , 2 , , ,
, ,
, , , ,
T k k T k k
k k k k
KK k k KK k k
C K T f a S K T
K T g a S
K C K T K f a S K T
a2 … am 1 2 … p
Vinject adjoints
pick adjoints
aV
0,g a S
a aV Va
S0
0SV
0SV
pick final
inject initial
4/9
37. www.danskemarkets.comAAD
Danske Bank
• Step 3 in our example , where h is implicitly defined by a calibration
− We know the sensitivities to interpolation parameters from step 2
− We want to propagate them to sensitivities to IVs and spot
− We need the Jacobians and of h so we can apply the chain rule
− h is implicitly defined by calibration to n instruments:
− Where the error functions are explicit and we easily compute their Jacobians
− We need the Jacobians and of the implicit function out of these and we’re home safe
Propagation through implicit functions
37
aV
ˆV
0 0 0
ˆ ˆ
ˆ
a
a
S S a S
V V h
V V V h
0
ˆ,a h S
0
ˆ
SV
ie 0ˆ, ,a Se e e
ˆh 0Sh
2
0 , 0 , 0
ˆ ˆ: min , , , , ,i i i ii i i K T K T i
a
h e e e a S w C a S BS S
ˆh 0Sh
5/9
38. www.danskemarkets.comAAD
Danske Bank
• Theorem:
• Where is the ”pseudo-inverse” of the Jacobian of calibration errors
to the results of h = interpolation parameters
• Note that I is the projection operator propagation = risk projection
• In a perfect calibration context, is square of full rank, and in this case
propagation = Jacobian inversion
• Finally, the general formula for propagation through calibrations:
Implicit Function Theorem
38
1
' 'a a aI e e e
ae
0 0
ˆ ˆ
S S
h Ie
h Ie
ae
1
aI e
0 0
1
ˆ ˆ
1
' '
' '
a a a a
a
S a a a a S
V V e e e e
V V e e e e
6/9
39. www.danskemarkets.comAAD
Danske Bank
is the solution of
At the optimum, we have
and we have the 1st order condition
Deriving the 1st order condition with respect to and :
At the optimum, errors are negligible compared to derivatives, hence:
So, in other terms
Proof
39
2
0
ˆmin , , ,i i
a
e e e a S *
0
ˆ,a h S
' 0 'a m ae e e
0 00
ˆ ˆˆ
' 0 ' '
' 0 ' '
a mn a a
a m aS a SS
e e e
e e e
ˆ 0S
*
0 0 0 0
ˆ ˆ ˆ ˆ, , , , , ,i i i ie a S e h S S S
0 0 0
ˆ ˆ ˆ' 0 '
' 0 '
a mn a a
a S m a a S S
e e e h e
e e e h e
0 0
ˆ ˆ' '
' '
a a a
a a S a S
e e h e e
e e h e e
0 0
1
ˆ ˆ
1
' '
' '
a a a
S a a a S
h e e e e
h e e e e
7/9
40. www.danskemarkets.comAAD
Danske Bank
Backward Risk Propagation: general algorithm
• Successive vectors of parameters are derived or calibrated from one another
− From initial market observed or trader input sets to which we want sensitivities
− Through successive transformations from some previously computed sets
− Eventually leading to the set of final model parameters
• Use AAD to compute derivatives of the result to model parameters
• Propagate risks in the reverse order to the construction of the parameters
− For each , from output to inputs:
− When is explicit, we use tape pasting
− When is implicit, we use the Implicit Function Theorem for each input set
where are the (explicit) errors functions implicit to the calibration that defines
− When a is an input to multiple s, then the final is the sum of the propogations from all s
• We can compute ”custom risks” with this algorithm
− Use different parameter sets for tape pasting and IFT, than the ones used for calibration
40
iP
0 1... nP P
i i j
j i
P f P
1NP
1NP
V
i j
propagation
i i j P Pj i
P f P V V
if
jP if jP
V if
if
1
' 'j i i i i jP P P P P PV V e e e e
if ,i j i
j i
e P P
if
1NP
8/9
41. www.danskemarkets.comAAD
Danske Bank
Big Picture: real life Forex Dupire
Domestic rates
OIS depo
Libor futures
Libor swaps
Libor/OIS basis
loc
V
Result
V
calib Domestic
Discounts
and Libors
Foreign rates
Fx swaps
Basis swaps
Libor futures
Libor swaps
calib Forex
forward
curve
Spot
IVs
ATM
25D C/P
(10D C/P)
Liquid expiries
calib Interpolated
IV surface
LV
matrix
AAD
AAD
AAD
FFxV
DFV
TP
IFT
TP
aV
0SV
ˆV
FRV
DRV
PDE, MC
Dupire’s formula
LibV
IFT
IFT
IFT
IFT
IFT
IFT
9/9
41
42. www.danskemarkets.comAAD
Danske Bank
Demo: CVA
• As presented by Andreasen at Global Derivatives 2014, we calculate CVA by
42
CVA without collateral
1/3
• I.e. instead of simulating the netting set value directly
• … we simulate cashflows and calculate CVA by accumulating future
cashflows if
1. the counterparty has defaulted and
2. the netting set value is positive to us at default
• where
− is the default time of the counterparty
− c(t) is the cashflow of the netting set at time t
− is a LSM regression proxy of the value of
the netting set at time t
42
43. www.danskemarkets.comAAD
Danske Bank
Demo: CVA
• The two methods are economically equivalent, but with this approach
we
− Avoid nested MC simulations
− Use LSM regression proxies as an approximation, … but only to check positivity!
− Get a very efficient and accurate CVA implementation
• Live CVA demo …
43
CVA without collateral
2/3
43
44. www.danskemarkets.comAAD
Danske Bank
Demo: CVA
CVA Risk
• Calculating CVA as just described, we have
• If the proxy is good, around zero, the above is approximately zero
− If the proxy is perfect, around zero, the above is exactly zero
• If the proxy is bad, the above is numerical noise that we want to ignore
• Hence, we want to keep the proxy frozen during risk calculations
• This is done, by not “AD’ing” LSM
− i.e. to use native doubles – and not kDoubleAds – in the LSM regression implementation
• Live CVA risk demo …
44
Risk for CVA without collateral
3/3
45. www.danskemarkets.comAAD
Danske Bank
Demo: Capital Requirement for Counterparty Credit Risk
• The minimum requirements for regulatory capital is given as a fixed proportion
of the Risk-Weighted exposure Amount (RWA aka REA)
• For Counterparty Credit Risk (CRR), RWA is calculated for a netting set, by
− where N is the cumulative normal distribution function
− PD is the default probability
− LGD is Loss Given Default
− is a regulatory-given correlation function of PD:
− M is the effective maturity
− EAD is the Exposure At Default
− k is a regulatory-given maturity adjustment factor function of PD and M:
45
Regulatory-given formula for RWA CCR
1/6
46. www.danskemarkets.comAAD
Danske Bank
Demo: Capital Requirement for Counterparty Credit Risk
• RWA CCR is (when using IMM) a function of the expected exposure profile
− where V(t) is the (stochastic) value of the netting set at time t
− and K(t) is the (stochastic) value of the collateral (in case of a CSA agreement) at time t
• The expected exposure profile enters via EAD and M
• Calculating the expected exposure is the challenge in the RWA CCR calculation!
RWA CCR as a function of the expected exposure profile
2/6
46
47. www.danskemarkets.comAAD
Danske Bank
Demo: Capital Requirement for Counterparty Credit Risk
• Our approach for RWA CCR can be considered a corollary to our CVA approach
− We are using the same models as for CVA in the calculation of the EE: beast, MFC, SLV, …
− We are using/extending a lot of the functionality (trade compression, trade decoration, netting set
setup, realtime dynamic model building etc)
− … and we are using LSM proxies to check for positivity
• When a new trading opportunity occur, we can do a full RWA CCR calculation
for the netting set
− … at the trading desk – based on realtime models
− For a typical netting set, the calculation takes 5-10 sec and full risk takes about a minute
(1.5 – 2x longer with CSA)
• The calculation is done in 2 steps
− First the expected exposure profile is generated for the netting set
− Then RWA is calculated with the expected exposure profile (and PD, LGD etc) as input
− The RWA formula is scripted in the same way as we script trades and netting sets
RWA CCR as 2-script setup
3/6
47
48. www.danskemarkets.comAAD
Danske Bank
Demo: Capital Requirement for Counterparty Credit Risk
• For a netting set without CSA, the expected exposure is
• Live RWA CCR demo …
RWA CCR without collateral
4/6
LSM regression proxy
48
49. www.danskemarkets.comAAD
Danske Bank
Demo: Capital Requirement for Counterparty Credit Risk
• RWA CCR can be written as
− where a is a vector of parameters and EE is the expected exposure profile
• Then
• This can be calculated using AD with checkpointing in a single AD calculation
with one checkpoint!
• Live RWA CCR risk demo …
RWA CCR risk as 2-script risk with macro-level checkpointing
5/6
Risk directly from the
RWA formula script
Risk from netting set
script enters only via EE
49
50. www.danskemarkets.comAAD
Danske Bank
Demo: Capital Requirement for Counterparty Credit Risk
Calculate risk for RWA CCR
Split in 2 scripts/slices:
RWA CCR risk as 2-script risk with macro-level checkpointing
6/6
Slice 1
Calc EE from the EE script (use double – no AD) Generate tape for RWA script (use kDoubleAd)
Slice 2
Slice 1 Slice 2
Generate tape for EE script (use kDoubleAd)
Set initial conditions
Run RWA script bwds to calculate adjoints
Slice 2
Store derivatives and wipe tape
Set initial conditions
Run EE script bwds to calculate adjoints
Pick derivatives from the ai nodes and wipe tape
1 2
3
4
5
6
7
50
51. www.danskemarkets.comAAD
Danske Bank
Demo: Capital Requirement for CCR with collateral
• For a 2-way CSA agreement with thresholds Hc and Hp and independent
amounts Ic and Ip, collateral is modeled as
• For simplicity we will ignore thresholds and independent amounts and let
• The Margin Period of Risk, , is, in case of RWA, given by regulators
− For a netting set with OTC derivatives having daily margin calls, it is typically 10b
• The Margin Period of Risk makes it non-trivial to extend our approach to XVA
and RWA with collateral …
51
RWA CCR with collateral
1/3
52. www.danskemarkets.comAAD
Danske Bank
Demo: Capital Requirement for CCR with collateral
• However, Andreasen (2014) showed that K can be taken into account in the
expected exposure by
− The expected exposure is still calculated by summing notional adjusted cashflows c(u)
− And LSM proxies are still only used to check positivity
− But 2 proxies are now in play
− is calculated on the main simulationpath
− is calculated on a separatepath branched out at
• Live RWA CCR with collateral demo …
52
RWA CCR with collateral using branching
2/3
53. www.danskemarkets.comAAD
Danske Bank
Demo: Capital Requirement for CCR with collateral
53
RWA CCR with collateral using branching
3/3
• The extra paths from branching will increase the calculation time by a factor 1.5-2
− But still fast enough to be used realtime on the front
• By e.g. approximating the effective maturity with time to maturity in the riskweight
for RWA for CCR, we can similarly calculate KVA for CCR (and associated risk) in
realtime
• In addition, AD can also be used to calculate derivatives with respect to notionals …
and allocate capital to individual desks, books, trades etc (“Euler decomposition”)