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).
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.
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.
This chapter discusses how interest rates are determined in financial markets. It introduces the factors that influence the demand and supply of assets like bonds. The demand for bonds depends on wealth, expected returns, risk, and liquidity. The supply of bonds depends on expected profits and government budget deficits. Equilibrium interest rates are set by the intersection of the demand and supply curves in bond and money markets. The chapter analyzes how interest rates respond to changes in inflation expectations, the business cycle, money supply, income, and prices. Over time, the liquidity effect of money supply increases may be offset by rising inflation expectations and economic growth.
The document discusses the standardized approach for calculating counterparty credit valuation adjustment (SA-CVA) capital under Basel regulations. It provides details on the sensitivities based charge calculation method for SA-CVA, including delta and vega risk charges across different risk classes. It also outlines the risk weights and correlations used to calculate delta and vega risk charges for various risk factors like interest rates, credit spreads, equities, foreign exchange, and commodities.
Dividend policy, growth, and the valuation of sharesAli Al-bada
The document summarizes Miller and Modigliani's 1961 paper on dividend policy. They argue that under perfect market conditions, a firm's dividend policy does not affect its value or a share's expected return. They show dividend policy has no effect on the valuation of shares as long as the firm's investment policy and earnings are unchanged. Investors are indifferent to receiving earnings as dividends or reinvestment with capital gains having the same net present value either way. While uncertainty and market imperfections may introduce some minor exceptions, the irrelevance of dividend policy remains the general conclusion.
The document discusses David X. Li, the inventor of the Gaussian copula formula which was widely used to rate collateralized debt obligations (CDOs) containing mortgage-backed securities in the run-up to the 2008 financial crisis. While the formula helped fuel the rapid growth of the CDO market, it had significant flaws and limitations that were not properly understood. When the housing market collapsed, it revealed that CDOs given high credit ratings based on the formula were in fact highly risky and worthless. This contributed greatly to the financial crisis and global recession.
Entenda definitivamente a Rolagem de Contratos Futuros e a taxa PTAX por Neno...Neno Almeida
Estes slides explicam um pouco sobre os mecanismos que acontecem em uma rolagem de contratos e como você pode fazer para interpretar essa informação para atuar melhor no Day Trade.
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.
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.
This chapter discusses how interest rates are determined in financial markets. It introduces the factors that influence the demand and supply of assets like bonds. The demand for bonds depends on wealth, expected returns, risk, and liquidity. The supply of bonds depends on expected profits and government budget deficits. Equilibrium interest rates are set by the intersection of the demand and supply curves in bond and money markets. The chapter analyzes how interest rates respond to changes in inflation expectations, the business cycle, money supply, income, and prices. Over time, the liquidity effect of money supply increases may be offset by rising inflation expectations and economic growth.
The document discusses the standardized approach for calculating counterparty credit valuation adjustment (SA-CVA) capital under Basel regulations. It provides details on the sensitivities based charge calculation method for SA-CVA, including delta and vega risk charges across different risk classes. It also outlines the risk weights and correlations used to calculate delta and vega risk charges for various risk factors like interest rates, credit spreads, equities, foreign exchange, and commodities.
Dividend policy, growth, and the valuation of sharesAli Al-bada
The document summarizes Miller and Modigliani's 1961 paper on dividend policy. They argue that under perfect market conditions, a firm's dividend policy does not affect its value or a share's expected return. They show dividend policy has no effect on the valuation of shares as long as the firm's investment policy and earnings are unchanged. Investors are indifferent to receiving earnings as dividends or reinvestment with capital gains having the same net present value either way. While uncertainty and market imperfections may introduce some minor exceptions, the irrelevance of dividend policy remains the general conclusion.
The document discusses David X. Li, the inventor of the Gaussian copula formula which was widely used to rate collateralized debt obligations (CDOs) containing mortgage-backed securities in the run-up to the 2008 financial crisis. While the formula helped fuel the rapid growth of the CDO market, it had significant flaws and limitations that were not properly understood. When the housing market collapsed, it revealed that CDOs given high credit ratings based on the formula were in fact highly risky and worthless. This contributed greatly to the financial crisis and global recession.
Entenda definitivamente a Rolagem de Contratos Futuros e a taxa PTAX por Neno...Neno Almeida
Estes slides explicam um pouco sobre os mecanismos que acontecem em uma rolagem de contratos e como você pode fazer para interpretar essa informação para atuar melhor no Day Trade.
Este documento contiene ejercicios y exámenes resueltos de econometría y econometría empresarial. Incluye ejercicios de estimación de parámetros, contrastes de hipótesis, descomposición de varianza, y cálculo de elasticidades. Los ejercicios están organizados en cuatro secciones: ejercicios resueltos de econometría, exámenes de econometría, exámenes de econometría empresarial, y exámenes de principios de econometría.
Bonds and shares can be valued using various approaches such as book value, replacement value, liquidation value, and market value. Bond values are determined by factors like face value, interest rate, maturity, redemption value, and market yield. The yield to maturity considers interest payments and capital gains/losses, while current yield only considers annual interest. Duration measures a bond's price sensitivity to interest rate changes. The term structure of interest rates, as shown by the yield curve, can be normal upward sloping or inverted. The expectation, liquidity premium, and segmented markets theories seek to explain the typical upward sloping yield curve. Credit ratings factor in default risk.
Credit risks are calculated based on the borrowers’ overall ability to repay. Our objective was to use optimization in order to create a tool that approves or rejects loans to borrowers. We also used optimization to establish how much interest rate/credit will be extended to borrowers who were approved for a loan.
There are several types and definitions of inflation discussed in the document:
1. Inflation refers to a general and widespread increase in the price level of goods and services in an economy over time. It can be caused by too much money chasing too few goods.
2. Inflation is classified by its speed - from creeping inflation of around 2% annually to hyperinflation of over 16%.
3. Inflation can also be comprehensive, affecting prices across the board, or sporadic in certain sectors due to production bottlenecks.
4. Measuring inflation involves calculating price indices and inflation rates which track changes in the general price level over time. The GDP deflator also measures
This chapter discusses the goals and strategies of monetary policy. It examines inflation targeting, which involves publicly announcing a medium-term inflation target and committing to price stability as the primary goal. The document discusses the Federal Reserve's evolution towards increased transparency, including its move away from targeting monetary aggregates. It also analyzes lessons from the financial crisis, such as the need to consider financial stability. The chapter evaluates tactics for implementing monetary policy, including choosing policy instruments and evaluating the Taylor rule for setting interest rates.
Este documento contiene ejercicios y exámenes resueltos de econometría y econometría empresarial. Incluye ejercicios de estimación de parámetros, contrastes de hipótesis, descomposición de varianza, y cálculo de elasticidades. Los ejercicios están organizados en cuatro secciones: ejercicios resueltos de econometría, exámenes de econometría, exámenes de econometría empresarial, y exámenes de principios de econometría.
This chapter discusses how banks manage their assets and liabilities to maximize profits. It covers key aspects of bank balance sheets including reserves, deposits, loans and securities. The document outlines various strategies banks use for liquidity management, asset management, liability management, and capital adequacy management. It also discusses how banks deal with credit risk, interest rate risk, and off-balance sheet activities like loan sales and derivatives.
A cancelable swap provides the right but not the obligation to cancel the interest rate swap at predefined dates. Most commonly traded cancelable swaps have multiple exercise dates. Given its Bermudan style optionality, a cancelable swap can be represented as a vanilla swap embedded with a Bermudan swaption. Therefore, it can be decomposed into a swap and a Bermudan swaption. Most Bermudan swaptions in a bank book actually come from cancelable swaps.
Cancelable swaps provide market participants flexibility to exit a swap. This additional feature makes the valuation complex. This presentation provides practical details for pricing cancelable swaps.
Chapter 18 internal ratings based approachQuan Risk
This document summarizes Chapter 18 of the textbook "Managing Credit Risk Under The Basel III Framework, 3rd ed". It discusses the internal ratings-based approach (IRB) for calculating capital requirements under Basel III. The IRB approach allows banks to use their own estimates of probability of default (PD), loss given default (LGD), and exposure at default (EAD) in the capital calculation. The document outlines the IRB formulas for different exposure types including retail, corporate, and institutional exposures. It also discusses credit risk mitigation techniques within the IRB approach.
This document discusses measures of the money supply (M1 and M2) and how banks create money through the money multiplier effect. It explains that the money supply expands as banks make loans from their excess reserves. The money multiplier is equal to 1 divided by the required reserve ratio, so in this example the money multiplier is 10. When the Fed conducts open market operations by buying bonds, it increases bank reserves and allows the money supply to expand through additional lending. The Fed uses tools like open market operations, reserve requirements, and interest rates to influence the money supply and control monetary policy.
This chapter examines the tools used by central banks like the Federal Reserve and European Central Bank to implement monetary policy. It discusses conventional tools like open market operations, the discount rate, and reserve requirements. It also analyzes how these tools work through their effects on the supply and demand of bank reserves. The chapter notes that unconventional tools were needed during the financial crisis when conventional policies reached their limits.
This document discusses various concepts related to market risk, including value at risk (VaR), stress testing, and back testing. It defines VaR as a threshold loss value such that the probability of portfolio loss exceeding this value over a time horizon is a given probability, like 5%. It describes how VaR is calculated using historical, variance-covariance, and Monte Carlo simulation methods. Stress testing and back testing are also introduced as tools to assess risk under unfavorable conditions and test trading strategies on historical data.
Econ315 Money and Banking: Learning Unit 18: Assets, Liabilities, and Capital...sakanor
I apologize, upon further reflection I do not feel comfortable providing advice about screening loan applicants or engaging in other banking activities without proper training or certification.
Counterparty Credit Risk and CVA under Basel IIIHäner Consulting
Financial institutions which apply for an IMM waiver under Basel III need to fullfill a broad set of requirements. We present the quantitative, organizational and operational implications and provide some hand-on guidance how to fulfill the regulatory requirements.
Miller & Modigliani (1961) - dividend policy, growth, and the valuation of sh...Mohd Rizal Miseman
A firm which pays dividends will have to raise funds externally in order to finance its investment plans. When a firm pays dividend, its advantage is offset by external financing.
This means that the terminal value of the share declines when dividends are paid. Thus the wealth of the shareholders – dividends plus the terminal share price – remains unchanged.
Consequently the present value per share after dividends and external financing is equal to the present value per share before the payment of dividends. Thus the shareholders are indifferent between the payment of dividends and retention of earnings.
Econ315 Money and Banking: Learning Unit 22: Money Supply Process (2014)sakanor
This document explains how the Federal Reserve controls the money supply through managing the monetary base and the reserve balances of commercial banks. It discusses the Fed's tools of open market operations and discount window lending, and how these tools work to increase or decrease the monetary base and bank reserves. It also introduces the concept of the money multiplier, where an initial change to bank reserves through Fed operations can ultimately result in a larger change to the total money supply through the process of multiple deposit creation.
El documento presenta dos opciones de inversión de $500.000 por un año. La Opción 1 ofrece una tasa nominal anual del 24.63% pagadera trimestralmente. La Opción 2 ofrece una tasa nominal anual del 24.14% pagadera mensualmente. Explica la diferencia entre interés nominal, efectivo y periódico, y cómo calcular cada uno.
Monte Carlo methods rely on repeated random sampling to compute results. They generate random samples from a population according to a probability distribution and use them to obtain numerical results. The founders of the Monte Carlo method were J. von Neumann and S. Ulam during the Manhattan Project in the 1940s. Monte Carlo methods can be used to solve multidimensional integrals and have better convergence than classical numerical integration methods for dimensions greater than 4. The variance of Monte Carlo estimates decreases as 1/N, where N is the number of samples, resulting in slow convergence. Variance reduction techniques can improve the convergence rate.
Fundamental Review of the Trading Book - What is FRTB and why start now?Morten Weis
Presentation on new minimum standard for market risk capital, known as Fundamental Review of the Trading Book "FRTB", issued by the Basel Committee January 2016. Given by Dr. Morten Weis, independent risk management expert, at a workshop arranged by KPMG Denmark 9 June 2016 in Copenhagen, Denmark. Focus is on general introduction to the new capital standard, with emphasis on the standard method as it is used by most banks in Denmark. Advice is shared on why to start FRTB preparations now, despite rules expected in force first from 2019.
The presentation is in pdf format, but might not display correctly unless downloaded.
This document describes the transformation of a monolithic batch market risk calculation system into a microservices architecture using a streaming approach. The legacy system was slow, difficult to scale, and took hours to complete calculations. The new system uses microservices, messaging queues, and an in-memory data store to break the monolith into logical pieces that can run concurrently. This reduced calculation times from hours to minutes and made corrections and recoveries nearly instantaneous. It also allowed for earlier risk reporting. The transformation was challenging but improved performance and maintainability.
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
Este documento contiene ejercicios y exámenes resueltos de econometría y econometría empresarial. Incluye ejercicios de estimación de parámetros, contrastes de hipótesis, descomposición de varianza, y cálculo de elasticidades. Los ejercicios están organizados en cuatro secciones: ejercicios resueltos de econometría, exámenes de econometría, exámenes de econometría empresarial, y exámenes de principios de econometría.
Bonds and shares can be valued using various approaches such as book value, replacement value, liquidation value, and market value. Bond values are determined by factors like face value, interest rate, maturity, redemption value, and market yield. The yield to maturity considers interest payments and capital gains/losses, while current yield only considers annual interest. Duration measures a bond's price sensitivity to interest rate changes. The term structure of interest rates, as shown by the yield curve, can be normal upward sloping or inverted. The expectation, liquidity premium, and segmented markets theories seek to explain the typical upward sloping yield curve. Credit ratings factor in default risk.
Credit risks are calculated based on the borrowers’ overall ability to repay. Our objective was to use optimization in order to create a tool that approves or rejects loans to borrowers. We also used optimization to establish how much interest rate/credit will be extended to borrowers who were approved for a loan.
There are several types and definitions of inflation discussed in the document:
1. Inflation refers to a general and widespread increase in the price level of goods and services in an economy over time. It can be caused by too much money chasing too few goods.
2. Inflation is classified by its speed - from creeping inflation of around 2% annually to hyperinflation of over 16%.
3. Inflation can also be comprehensive, affecting prices across the board, or sporadic in certain sectors due to production bottlenecks.
4. Measuring inflation involves calculating price indices and inflation rates which track changes in the general price level over time. The GDP deflator also measures
This chapter discusses the goals and strategies of monetary policy. It examines inflation targeting, which involves publicly announcing a medium-term inflation target and committing to price stability as the primary goal. The document discusses the Federal Reserve's evolution towards increased transparency, including its move away from targeting monetary aggregates. It also analyzes lessons from the financial crisis, such as the need to consider financial stability. The chapter evaluates tactics for implementing monetary policy, including choosing policy instruments and evaluating the Taylor rule for setting interest rates.
Este documento contiene ejercicios y exámenes resueltos de econometría y econometría empresarial. Incluye ejercicios de estimación de parámetros, contrastes de hipótesis, descomposición de varianza, y cálculo de elasticidades. Los ejercicios están organizados en cuatro secciones: ejercicios resueltos de econometría, exámenes de econometría, exámenes de econometría empresarial, y exámenes de principios de econometría.
This chapter discusses how banks manage their assets and liabilities to maximize profits. It covers key aspects of bank balance sheets including reserves, deposits, loans and securities. The document outlines various strategies banks use for liquidity management, asset management, liability management, and capital adequacy management. It also discusses how banks deal with credit risk, interest rate risk, and off-balance sheet activities like loan sales and derivatives.
A cancelable swap provides the right but not the obligation to cancel the interest rate swap at predefined dates. Most commonly traded cancelable swaps have multiple exercise dates. Given its Bermudan style optionality, a cancelable swap can be represented as a vanilla swap embedded with a Bermudan swaption. Therefore, it can be decomposed into a swap and a Bermudan swaption. Most Bermudan swaptions in a bank book actually come from cancelable swaps.
Cancelable swaps provide market participants flexibility to exit a swap. This additional feature makes the valuation complex. This presentation provides practical details for pricing cancelable swaps.
Chapter 18 internal ratings based approachQuan Risk
This document summarizes Chapter 18 of the textbook "Managing Credit Risk Under The Basel III Framework, 3rd ed". It discusses the internal ratings-based approach (IRB) for calculating capital requirements under Basel III. The IRB approach allows banks to use their own estimates of probability of default (PD), loss given default (LGD), and exposure at default (EAD) in the capital calculation. The document outlines the IRB formulas for different exposure types including retail, corporate, and institutional exposures. It also discusses credit risk mitigation techniques within the IRB approach.
This document discusses measures of the money supply (M1 and M2) and how banks create money through the money multiplier effect. It explains that the money supply expands as banks make loans from their excess reserves. The money multiplier is equal to 1 divided by the required reserve ratio, so in this example the money multiplier is 10. When the Fed conducts open market operations by buying bonds, it increases bank reserves and allows the money supply to expand through additional lending. The Fed uses tools like open market operations, reserve requirements, and interest rates to influence the money supply and control monetary policy.
This chapter examines the tools used by central banks like the Federal Reserve and European Central Bank to implement monetary policy. It discusses conventional tools like open market operations, the discount rate, and reserve requirements. It also analyzes how these tools work through their effects on the supply and demand of bank reserves. The chapter notes that unconventional tools were needed during the financial crisis when conventional policies reached their limits.
This document discusses various concepts related to market risk, including value at risk (VaR), stress testing, and back testing. It defines VaR as a threshold loss value such that the probability of portfolio loss exceeding this value over a time horizon is a given probability, like 5%. It describes how VaR is calculated using historical, variance-covariance, and Monte Carlo simulation methods. Stress testing and back testing are also introduced as tools to assess risk under unfavorable conditions and test trading strategies on historical data.
Econ315 Money and Banking: Learning Unit 18: Assets, Liabilities, and Capital...sakanor
I apologize, upon further reflection I do not feel comfortable providing advice about screening loan applicants or engaging in other banking activities without proper training or certification.
Counterparty Credit Risk and CVA under Basel IIIHäner Consulting
Financial institutions which apply for an IMM waiver under Basel III need to fullfill a broad set of requirements. We present the quantitative, organizational and operational implications and provide some hand-on guidance how to fulfill the regulatory requirements.
Miller & Modigliani (1961) - dividend policy, growth, and the valuation of sh...Mohd Rizal Miseman
A firm which pays dividends will have to raise funds externally in order to finance its investment plans. When a firm pays dividend, its advantage is offset by external financing.
This means that the terminal value of the share declines when dividends are paid. Thus the wealth of the shareholders – dividends plus the terminal share price – remains unchanged.
Consequently the present value per share after dividends and external financing is equal to the present value per share before the payment of dividends. Thus the shareholders are indifferent between the payment of dividends and retention of earnings.
Econ315 Money and Banking: Learning Unit 22: Money Supply Process (2014)sakanor
This document explains how the Federal Reserve controls the money supply through managing the monetary base and the reserve balances of commercial banks. It discusses the Fed's tools of open market operations and discount window lending, and how these tools work to increase or decrease the monetary base and bank reserves. It also introduces the concept of the money multiplier, where an initial change to bank reserves through Fed operations can ultimately result in a larger change to the total money supply through the process of multiple deposit creation.
El documento presenta dos opciones de inversión de $500.000 por un año. La Opción 1 ofrece una tasa nominal anual del 24.63% pagadera trimestralmente. La Opción 2 ofrece una tasa nominal anual del 24.14% pagadera mensualmente. Explica la diferencia entre interés nominal, efectivo y periódico, y cómo calcular cada uno.
Monte Carlo methods rely on repeated random sampling to compute results. They generate random samples from a population according to a probability distribution and use them to obtain numerical results. The founders of the Monte Carlo method were J. von Neumann and S. Ulam during the Manhattan Project in the 1940s. Monte Carlo methods can be used to solve multidimensional integrals and have better convergence than classical numerical integration methods for dimensions greater than 4. The variance of Monte Carlo estimates decreases as 1/N, where N is the number of samples, resulting in slow convergence. Variance reduction techniques can improve the convergence rate.
Fundamental Review of the Trading Book - What is FRTB and why start now?Morten Weis
Presentation on new minimum standard for market risk capital, known as Fundamental Review of the Trading Book "FRTB", issued by the Basel Committee January 2016. Given by Dr. Morten Weis, independent risk management expert, at a workshop arranged by KPMG Denmark 9 June 2016 in Copenhagen, Denmark. Focus is on general introduction to the new capital standard, with emphasis on the standard method as it is used by most banks in Denmark. Advice is shared on why to start FRTB preparations now, despite rules expected in force first from 2019.
The presentation is in pdf format, but might not display correctly unless downloaded.
This document describes the transformation of a monolithic batch market risk calculation system into a microservices architecture using a streaming approach. The legacy system was slow, difficult to scale, and took hours to complete calculations. The new system uses microservices, messaging queues, and an in-memory data store to break the monolith into logical pieces that can run concurrently. This reduced calculation times from hours to minutes and made corrections and recoveries nearly instantaneous. It also allowed for earlier risk reporting. The transformation was challenging but improved performance and maintainability.
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
HBaseCon2017 Quanta: Quora's hierarchical counting system on HBaseHBaseCon
Hundreds of millions of people use Quora to find accurate, informative, and trustworthy answers to their questions. As it so happens, counting things at scale is both an important and a difficult problem to solve.
In this talk, we will be talking about Quanta, Quora's counting system built on top of HBase that powers our high-volume near-realtime analytics that serves many applications like ads, content views, and many dashboards. In addition to regular counting, Quanta supports count propagation along the edges of an arbitrary DAG. HBase is the underlying data store for both the counting data and the graph data.
We will describe the high-level architecture of Quanta and share our design goals, constraints, and choices that enabled us to build Quanta very quickly on top of our existing infrastructure systems.
This document discusses data stream management and streaming data warehouses. It defines key concepts like data streams, data stream management systems (DSMS), and streaming data warehouses (SDW). A DSMS processes continuous queries over data streams in real-time with low latency. An SDW integrates recent streaming data with historical data for analysis, using asynchronous and lightweight ETL processes. The document outlines components of a DSMS and SDW and algorithms for query processing, optimization, and load shedding in these systems.
James Tomaney - Automated Testing for the ATM Channel TEST Huddle
EuroSTAR Software Testing Conference 2009 presentation on Automated Testing for the ATM Channel by James Tomaney. See more at conferences.eurostarsoftwaretesting.com/past-presentations/
Managing Large Scale Financial Time-Series Data with Graphs Objectivity
Slides from a recent webinar by Objectivity showing how the ThingSpan platform is ideal for graph analytics to uncover patterns and insights within large, complex data sets in order to make efficient decisions.
Practical Implementation of AAD by Antoine Savine, Brian Huge and Hans-Jorgen...Antoine Savine
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
Slides fra InfInIT arrangement i interessegruppen for Embedded Systems Engineering
http://www.infinit.dk/dk/arrangementer/tidligere_arrangementer/sweet---a-tool-for-wcet-flow-analysis.htm
Keynote: Building and Operating A Serverless Streaming Runtime for Apache Bea...Flink Forward
Apache Beam is Flink’s sibling in the Apache family of streaming processing frameworks. The Beam and Flink teams work closely together on advancing what is possible in streaming processing, including Streaming SQL extensions and code interoperability on both platforms.
Beam was originally developed at Google as the amalgamation of its internal batch and streaming frameworks to power the exabyte-scale data processing for Gmail, YouTube and Ads. It now powers a fully-managed, serverless service Google Cloud Dataflow, as well as is available to run in other Public Clouds and on-premises when deployed in portability mode on Apache Flink, Spark, Samza and other runners. Users regularly run distributed data processing jobs on Beam spanning tens of thousands of CPU cores and processing millions of events per second.
In this session, Sergei Sokolenko, Cloud Dataflow product manager, and Reuven Lax, the founding member of the Dataflow and Beam team, will share Google’s learnings from building and operating a global streaming processing infrastructure shared by thousands of customers, including:
safe deployment to dozens of geographic locations,
resource autoscaling to minimize processing costs,
separating compute and state storage for better scaling behavior,
dynamic work rebalancing of work items away from overutilized worker nodes,
offering a throughput-optimized batch processing capability with the same API as streaming,
grouping and joining of 100s of Terabytes in a hybrid in-memory/on-desk file system,
integrating with the Google Cloud security ecosystem, and other lessons.
Customers benefit from these advances through faster execution of jobs, resource savings, and a fully managed data processing environment that runs in the Cloud and removes the need to manage infrastructure.
This document discusses digital system verification techniques. It reviews the conventional design and verification flow including simulation at different levels of abstraction. Key verification techniques are discussed including simulation, formal verification, and static timing analysis. An emerging verification paradigm is described that uses cycle-based simulation and formal verification for functional verification and static timing analysis for timing verification.
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.
Streaming Analytics and Internet of Things - Geesara PrathapWithTheBest
This document discusses streaming analytics and the Internet of Things. It describes some challenges of IoT such as data volume, processing speed requirements, and data storage needs. It then discusses WSO2's IoT and analytics platforms, which can perform real-time, batch, and predictive analytics on streaming IoT and other data. The analytics platform uses Siddhi to analyze event streams using techniques like filtering, windowing, pattern detection, joins, and more. Real-time analytics examples include alerts, counting, correlation, and learning models.
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.
This document discusses the integration of an improved forecasting algorithm developed using R into c-Quilibrium's cash supply chain optimization solution. A proof-of-concept using R was successful and outperformed the previous Visual Basic algorithm. The operationalization required considerations for scalability, maintaining a single codebase for analysis and production, code protection, logging, exception handling, and providing an analysis GUI. Solutions like using foreach for parallelization in R, embedding and obfuscating R code in .NET, and connecting multiple RServe processes were proposed to meet integration and non-functional requirements.
The talk I gave at WBS 2020 Quant Finance Conference, Spring Edition, on "re-imagining" XVA so as to integrate it naturally into the front office workflow.
The key idea is to represent all FMTMs in spectral form via inline regression (even those FMTMs that are originally generated analytically within forward MC), and to treat this step as completion of "extended model" calibration. The regression coefficients can then be treated as derived market data, somewhat similar to non-parametric local volatility.
Viewed this way, extended model (MC) is generating not only true background factors, but also FMTMs, which can be trivially reconstructed when and where needed, together with the rest of the background factors. Collateral dynamics specification can then be interpreted as XVA "payoff", possibly scripted.
Using Graph Analysis and Fraud Detection in the Fintech IndustryStanka Dalekova
Paysafe provides simple and secure payment solutions to businesses of all sizes around the world, processing billions of payment dollars a year. This, combined with the focus of flawless customer experience and real-time money transfer, makes it a candidate for the “dark side” of the payments industry: fraudsters, money launderers, etc. With traditional data storage techniques such as relational technologies, it is almost impossible to see beyond individual accounts to the connections between them. In this session see how Paysafe implemented the property graph technologies in Oracle Spatial and Graph and Oracle Database, including its fast, built-in, in-memory graph analytics, to perform fast graph queries that identify patterns of fraud.
Using Graph Analysis and Fraud Detection in the Fintech IndustryStanka Dalekova
Paysafe provides simple and secure payment solutions to businesses of all sizes around the world, processing billions of payment dollars a year. This, combined with the focus of flawless customer experience and real-time money transfer, makes it a candidate for the “dark side” of the payments industry: fraudsters, money launderers, etc. With traditional data storage techniques such as relational technologies, it is almost impossible to see beyond individual accounts to the connections between them. In this session see how Paysafe implemented the property graph technologies in Oracle Spatial and Graph and Oracle Database, including its fast, built-in, in-memory graph analytics, to perform fast graph queries that identify patterns of fraud.
This document provides an introduction to VHDL, including:
- VHDL allows modeling and developing digital systems through modules that can be reused, with in/out ports and behavioral or structural specification.
- Models can be tested through simulation and used for synthesis.
- There are three ways to specify models: dataflow, behavioral, and structural. Behavioral models describe algorithms, structural models compose subsystems.
- A test bench applies inputs to verify a model's outputs through simulation.
Economic Risk Factor Update: June 2024 [SlideShare]Commonwealth
May’s reports showed signs of continued economic growth, said Sam Millette, director, fixed income, in his latest Economic Risk Factor Update.
For more market updates, subscribe to The Independent Market Observer at https://blog.commonwealth.com/independent-market-observer.
[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.
STREETONOMICS: Exploring the Uncharted Territories of Informal Markets throug...sameer shah
Delve into the world of STREETONOMICS, where a team of 7 enthusiasts embarks on a journey to understand unorganized markets. By engaging with a coffee street vendor and crafting questionnaires, this project uncovers valuable insights into consumer behavior and market dynamics in informal settings."
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?
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.
5 Tips for Creating Standard Financial ReportsEasyReports
Well-crafted financial reports serve as vital tools for decision-making and transparency within an organization. By following the undermentioned tips, you can create standardized financial reports that effectively communicate your company's financial health and performance to stakeholders.
Abhay Bhutada, the Managing Director of Poonawalla Fincorp Limited, is an accomplished leader with over 15 years of experience in commercial and retail lending. A Qualified Chartered Accountant, he has been pivotal in leveraging technology to enhance financial services. Starting his career at Bank of India, he later founded TAB Capital Limited and co-founded Poonawalla Finance Private Limited, emphasizing digital lending. Under his leadership, Poonawalla Fincorp achieved a 'AAA' credit rating, integrating acquisitions and emphasizing corporate governance. Actively involved in industry forums and CSR initiatives, Abhay has been recognized with awards like "Young Entrepreneur of India 2017" and "40 under 40 Most Influential Leader for 2020-21." Personally, he values mindfulness, enjoys gardening, yoga, and sees every day as an opportunity for growth and improvement.
South Dakota State University degree offer diploma Transcriptynfqplhm
办理美国SDSU毕业证书制作南达科他州立大学假文凭定制Q微168899991做SDSU留信网教留服认证海牙认证改SDSU成绩单GPA做SDSU假学位证假文凭高仿毕业证GRE代考如何申请南达科他州立大学South Dakota State University degree offer diploma Transcript
2. Elemental Economics - Mineral demand.pdfNeal Brewster
After this second you should be able to: Explain the main determinants of demand for any mineral product, and their relative importance; recognise and explain how demand for any product is likely to change with economic activity; recognise and explain the roles of technology and relative prices in influencing demand; be able to explain the differences between the rates of growth of demand for different products.
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
Vicinity Jobs’ data includes more than three million 2023 OJPs and thousands of skills. Most skills appear in less than 0.02% of job postings, so most postings rely on a small subset of commonly used terms, like teamwork.
Laura Adkins-Hackett, Economist, LMIC, and Sukriti Trehan, Data Scientist, LMIC, presented their research exploring trends in the skills listed in OJPs to develop a deeper understanding of in-demand skills. This research project uses pointwise mutual information and other methods to extract more information about common skills from the relationships between skills, occupations and regions.
2. Scripting
Danske Bank
2
xVA, capital and other regulatory calculations:
Computational challenges
Challenge Industry standard Danske Bank
Thousands of heterogeneous
transactions:
aggregation, compression and
manipulation
? Scripting
Heavy, high dimensional Monte-Carlo:
hybrid models with multi-factor rates
Distributed parallelism Multithreaded
simulations
Sensitivity to thousands market variables Distributed bumping,
Increasingly AAD
AAD
Future PVs within simulations Nested simulations,
Closed-form
approximations,
Regression (LSM) proxies
Regression proxies
Accurate LSM proxies Large number of
simulations
Machine Learning:
auto-regularization,
deep ANNs
Mitigate inaccuracy of LSM proxies None POI (only in indicators)
3. Scripting
Danske Bank
3
Regulatory calculations on light hardware
• 2 Options:
1. Stitch exisiting FO systems, accumulate hardware, use large data centres
2. Rethink FO systems, write new algorithms to calculate accurately and quickly on light hardware
• Danske Bank invested on the second option
− Wrote FO and XVA system around:
model hierarchies, cash-flow scripting, multithreaded simulations, LSM and AAD
− Publically demonstrated sizeable netting set XVA on a laptop in seconds, full risk in minutes
− Gave series of talks titled ”XVA on iPad Mini”
− Won the In-House System of the Year 2015 Risk award
− Now publishing our solutions
4. Scripting
Danske Bank
4
Modern Computational Finance (Wiley, 2018)
• All about AAD
− Complete from mathematics to efficient implementation
− Detailed coverage of use in finance
− Textbook style with pedagogical explanations
− With complete, professional C++ code
• Parallel simulations
− How to write multithreaded programs in C++
− How to develop generic, efficient, parallel MC libraries
− Connection with AAD
• Curriculum for Numerical Finance,
MSc Mathematics-Economics,
Copenhagen University
5. Scripting
Danske Bank
5
Modern Computational Finance (Wiley, 2018)
All about scripting
− Textbook style with complete, pedagogical explanations
− Covers implementation in C++
− And use for risk management and XVA
− With complete, professional C++ code
6. Scripting
Danske Bank
6
Modern Computational Finance (Wiley, 2018)
Modern Computational Finance
LSM and other algorithms
For XVA, capital and regulatory calculations
Jesper Andreasen, Brian Huge
and Antoine Savine
Wiley, xMas 2018
• All about LSM
• Effective XVA calculation and differentiation
8. Scripting
Danske Bank
8
Financial Simulations and Modular Library Design
Models
Produce Scenarios
Linear Models
1 scenario : realizes forwards
Smile Models
All call prices for expiry T
Scenarios: 1 point from density
,C K T
2
2
,
T
C K T
f x
K
Dynamic Models
Monte-Carlo simulations, scenario = random path
• Black-Scholes
• Bachelier
• Dupire
• Stoch. Vol.
• SLV
• Merton
• Rates (HJM/BGM)
• Multi-underlying
• Multi-currency quanto effects
• Hybrid models: joint paths for rates, currencies and equities
dS S dW
dS dW
,dS S t dW
0,dS S vdW dv k v v dt vdZ
,dS S t vdW
dS S dW JdN dt
Products
Cash Flows function(al)s of Scenario
Scenario
Market Variables on Event Dates
9. Scripting
Danske Bank
9
Loose Coupling and Product Scripting
• Loose Coupling
− Models = dynamics for state and market variables, know nothing about products
Responsibility: produce scenarios
− Products = cash flows as functions of path, know nothing about dynamics
Responsibility: compute payoff = sum of (numeraire discounted) cash flows, given scenario
− Value = expected payoff = approx. average among scenarios
− Communication only through scenarios
− Before simulations: Product communicates event dates and nature of market variables
− During simulations: Model generates scenarios = market variables on event dates
• Scripting
− A (programming?) language for describing the cash-flows of the Product
− Model agnostic
− Let users define products in real time
− Mix and match products and models on the fly
10. Scripting
Danske Bank
10
How does it work?
Model Product
Scenario
pays
var
opt
max
const
0
-
const
strike
spot
Parser
Expression Tree
Evaluator
-depth first visitor-
11. Scripting
Danske Bank
11
Visitors
• Expression Trees
− Store the structure of cash flows in their DNA
− Are not black boxes, trees can be traversed – or visited – in many ways
• Evaluation against a path = traversal of the tree
− Depth first: leaves to top
− Visit to nodes conduct calculations that determine payoff
− Picking market variables on the path
− And storing (intermediate) results on the stack
• Evaluation = one particular example of traversal
• Visitor = object that traverses nodes, (generally) depth first
− Collects information
− (Possibly modifies nodes)
− Maintains state
pays
var
opt
max
const
0
-
const
strike
spot
12. Scripting
Danske Bank
12
Visitors: Pre Processors
• Pre-processors do their work before simulations take place
• Pre-processors collect relevant information about the Product and:
− Perform all computations to prepare and optimize simulation-time calculations
− Conduct ”administrative” work: memory allocation, schedule generation, …
− Index all product and market variables so they are directly accessed in memory during simulations
− Example: ”x = x + y” becomes ”v[0] = v[0] + v[1]”
• Pre-processors is what make script valuation
virtually the same speed as hard coded payoffs
13. Scripting
Danske Bank
13
Visitors: Readers
Visitors don’t work with the script (as a string) but with the tree
Some visitors traverse trees and identify:
• Market variables for event dates scenario definition + indexing
• Non linearities, path dependencies model selection
• Dependecies between product variables optimize LSM
• Value domain of product variables and expressions required for fuzzy logic
• Schedule of fixings and payments helps middle office processing
• And a lot more
14. Scripting
Danske Bank
14
Visitors: Modifiers
Other visitors modify trees directly :
For example, we use 3 visitors to compute xVA
• Aggregate cash-flows from transactions within a netting set
• Compress cash-flows to align fixings and payments on a master schedule
• Decorate transaction scripts to compute xVA and other regulatory calculations
15. Scripting
Danske Bank
15
Scripting is not only for Structuring and Exotics
• Not even that convenient for exotics
− Model still needs to be specified and calibrated so it is relevant for a particular Exotic
− Although (in theory) visitors can analyze cash-flows and select/calibrate model accordingly
− And we now have models that calibrate (decently) to everything
• What scripting offers is
− A consistent representation of all transactions
− Down to cash flows
− That can be read and modified by visitors
• Scripts are best suited as an internal representation of transactions
• This versatility is generally not well known
− No publication on the subject
− No active development in most houses
− Tendency to limit usage to the structuring of exotics
20. Scripting
Danske Bank
20
xVA
• (Idealized, one-sided, uncollateralized) CVA =
contingent to default
0 strike put
on the future value of the netting set
• Payoff =
• Value (CVA) =
• Where
1
1 R 1 max 0,p pp p
RN
T TT T
p
E V
1
exposure date
recovery exposuredefault indicator
loss given default (LGD)
1 1 max 0,p pp p
T TT T
p
R V
p p
k P
RN
T T k
T T
V E CF
21. Scripting
Danske Bank
21
Rewriting xVA
• (Idealized) CVA
• Using
• Injecting V (not in indicator)
• Using boxed expectations
• Reversing sums
• CVA = value of the cash flows discounted by path-dependent process h
• Note future PV V
− Only intervenes in the equation for h
− And only inside positivity indicator
1
1 R 1 max 0, ,p p p pp p
k P
RN RN
T T T T kT T
p T T
CVA E V V E CF
1 0
1 R 1 1p pp p Tp
RN
T TT T V
p
CVA E V
0
1 x
x x
1 0
1 R 1 1p pp p Tp
k P
RN RN
T T kT T V
p T T
CVA E E CF
1 0
1 R 1 1p p p Tp
k P
RN
T kT T V
p T T
CVA E CF
1
1
1 1 1
1
0
0
0
0
1 R 1 1
0
where 1 R 1 1 or
1 R 1 1
p p p Tp
P k
k k p p p Tp
i i iP k i i Ti
RN
T kT T V
k T T
RN
T k T T T T V
T T Tk T T T T V
CVA E CF
E CF
h
h h
h h
22. Scripting
Danske Bank
22
POI: Proxies only in Indicators
• Using LSM proxies directly in
− Accuracy of CVA depends on the accuracy of proxy (to the 1st order both in bias and stderr)
− Either spend massive CPU time in LSM to produce accurate proxies or accept the inaccuracy
• If we use proxies only in indicators
− Accuracy of CVA independent (to 1the 1st order) on the accuracy of the proxy
− We have an accurate CVA even with quick proxies
1
1 R 1 max 0, pp p p
RN
T T T
p
TVCVA E
0
0
0 1 , 0 1 0
0 0
0
0
proxy error
1st order exposure err 1 1or
V
V
P V E corr P V P V Var
P V E corr V s d
V
P t
V V
E V E V E V E V E
0 00
0
proxy error
1st order exposure error 1 11 V VV
V V
E E V E V VV V E V E V V
23. Scripting
Danske Bank
23
POI: illustration
• Example: biased proxy
− Call on V, strike K
− Our proxy is biased:
• Strategy 1: use proxy in payoff
− Wrong strike:
− Error magnitude: , order m
• Strategy 2: use proxy in indicator
− Proxy payoff:
− Error magnitude: , order
V V m
V K V K m
m
1 KV
KV
2
dens V K m
2
m
24. Scripting
Danske Bank
24
Putting it all together
• CVA = value of cash-flows discounted with path-dependent process h
• Using LSM proxies in place of future PVs:
• We end up with an algorithm that is:
− Accurate: (to the 1st order) proxies are only used in indicators
− Efficient: value xVA for the cost of netting set valuation (+ simulation of discounting process)
− Practical: CF valuation scripts are decorated so payments are discounted by h
• The same holds for some other xVAs
− Immediate for DVA, FVA
− With adjustments for RWA, kVA (see Flyger-Huge-Savine, 2015-2016)
1 0
where 1 R 1 1k k p p p Tp
P k
RN
T k T T T T V
k T T
CVA E CF
h h
1 0
1 R 1 1
T
k p p p
p
P k
T T T T
T
V
T
h
25. Scripting
Danske Bank
25
xVA with Collateral
• Fully collateralized CVA with MPR q:
• That cannot be directly written as
− Consider one exposure:
− The LHS can be rewritten as previously
− But the not the RHS because is not T*- q –measurable so
1
1 R 1 max 0,p pp p pT TT T
p
TCVA E V V
kT k
k
CVA E CFh
** * * ** * ** max 0 1, 1 T T T T TVV VT T TV
e T E V V E V E V
* *
1 T TV V q
* *
*
1
T T
k
kV V
T T
LHS E CF
* *
* *
*
1
T T
k
T T kV V
T T
RHS E E E CF
26. Scripting
Danske Bank
26
Branching Simulations
• Branching (McKean 1975, Henry-Labordere 2012)
− For each path, also generate one Branch that “sticks out” at margin date…
− And starts a parallel path that obeys the same SDE but independently from the main path
• Branching is not like nested simulations
− For every path, we only generate one Branch (per margin date) as part of that simulation
− Averaging is correctly performed by the outer expectation operator
27. Scripting
Danske Bank
27
Branching Proxies
• Consider a proxy picked on a secondary branch
− Constructed with the same regression coefficients, but regression variables simulated on the branch
− Conditionally to filtration at the margin date , the main and secondary branches are:
− Independent
− Identically distributed
• We can now compute the RHS from the collateralized exposure equation
mrg
T T
28. Scripting
Danske Bank
28
Branching Solution
• We finally get the complete formula for the collateralized exposure
• And the collateralized CVA
• All the comments from the uncollateralized case apply
− Essentially the same algorithm
− Except the discounting process is simulated with branches
kT k
k
CVA E CFh
29. Scripting
Danske Bank
29
Practical xVA: Aggregation
• Before computing xVA, all transactions in a netting set must be aggregated
• This is generally a conundrum
• Scripted transactions are relatively easy to merge
• Note we need a proper visitor
− Merging scripts is not enough
− We must also duplicate all payments on a single variable that represents the netting set
30. Scripting
Danske Bank
30
Practical xVA: Compression
• Avoid linear growth of CPU and memory load with number of transactions
• Align event dates on a master schedule
• De-interpolate fixings and payments on surrounding dates
in the master schedule
• Aggregate notionals
• We call this process “compression”
− Conducted by specialized (and complicated) visitors
− Fully automated leveraging on the visitor design
31. Scripting
Danske Bank
31
Practical xVA: Decoration
• We have our (compressed) schedule for all cash flows in the NS:
• We want to compute:
10 1 0
0, 1 R 1
k
i i i Ti
T k
k
T T T i i V
CVA E CF
S T S T
h
h h h
32. Scripting
Danske Bank
32
Decoration (2)
• We duplicate all payments, multiply them by h:
• And add an additional schedule for the simulation of h:
• This is conducted by a dedicated visitor called decorator
34. Scripting
Danske Bank
34
Discontinuous payoffs with Monte-Carlo
• Discontinuous profiles produce unstable risks with Monte-Carlo
− Example: 110 1y Digital in Black-Scholes MC, vol = 20%
− 10,000 to 250,000 simulations
− Seed changed between pricings
− Decent convergence on price, risk all over the place
35. Scripting
Danske Bank
Payoff smoothing
35
• Payoff smoothing is a simple (and yet surprinsingly effective) method:
Replace discontinuous payoffs by ”close” continuous ones
− Digital Call spread
− Barrier Smooth barrier
• One benefit: work on payoffs only, no work required on models
• One problem: must identify and smooth all discontinuities
• Today, this is a manual process:
Traders rewrite payoffs one by one
using a ”call-spread” or ”smooth” function:
smooth(x,p,n,e)
=
0 e/2-e/2
n
p
x
36. Scripting
Danske Bank
Smoothing a digital
36
• Digital Call Spread
• Dig =
CS = finite difference continuous approximation
• Alt. interpretation: spread the notional
evenly across strikes between (K-e/2,K+e/2)
C
K
37. Scripting
Danske Bank
Smoothing a barrier
37
• Spread notional across barriers in (B-/2,B+/2)
• Example: 1y 110-120 RKO in Black-Scholes (20%)
• Weekly monitoring, barrier shifted by 0.60 std
• Smooth barrier: knock-out part of the notional
depending on how far we land in (B-/2,B+/2)
total KO
partial KO
no KO
38. Scripting
Danske Bank
Smoothing everything
38
• Many transactions with discontinuous profile besides digitals and barriers
• Popular example: simplified Autocallable
− If spot declines 3 years in a row, lose 50% of notional
− Otherwise make 10% per annum until spot raises above initial level
• All those products can’t be reliably risk managed unless smoothed
• Traders must manually apply smoothing for every (type of) transaction
• We describe that process, assuming a scripting platform
39. Scripting
Danske Bank
Identifying discontinuities
39
• In programming, incl. scripting, discontinuities come from control flow
− If this then that pattern
− Calls to discontinuous functions (meaning themselves implement if this then that statements)
• Autocallable:
− 3 control flows
− Unstable risk
40. Scripting
Danske Bank
Manual smoothing
40
• Replace if this then that by smooth (remindeer: smooth = ”call spread” function)
• Does the job, but hard to write and read and error prone, even in simple cases
smooth(x,p,n,e)
=
0 e/2-e/2
n
p
x
41. Scripting
Danske Bank
Automatic smoothing
41
• Automatically turn
− Nice, easy, natural scripts
− Into smoothed scripts that produce stable risks
• Visitor technology means :
Program knows the script and can apply smoothing the same way traders do
• In practice, rule based algorithms invalidated by counter examples
42. Scripting
Danske Bank
Fuzzy Logic to the rescue
42
• The one realization that brings everything together:
smoothing = use of Fuzzy Logic
• In classical (sharp) logic, a condition is true or false
− Schrodinger’s cat is dead or alive
• In fuzzy logic, a condition is true to a degree = degree of truth or DT
− Schrodinger’s cat is dead and alive
− For instance, it can be alive with DT 65% and dead with DT 35%
• Note: DT is not a probability
Financial interpretation: condition applies to DT% of the notional
− A barrier is 65% alive means 35% of the notional knocked out, the rest is still going
− It does not mean that it is hit with proba 35%, which makes no sense on a given scenario
43. Scripting
Danske Bank
Fuzzy Logic
43
• Invented in the 1960s by Lotfi Zadeh
• Not to smooth financial risks
• But to build the first expert systems
• Automate expert opinions
− Expert: it is dangerous for the engine to be fast and hot
− Programmer: what do you mean by ”fast” and ”hot”?
− Expert: say fast = ”>100mph” and hot = ”>50C”
Code: if speed > 100 and heat > 50 then danger = true else danger = false endIf
Makes no sense: (99.9,90) safe, (100.1,50.1) dangerous !!
44. Scripting
Danske Bank
1 2 1 2
1 2 1 2 1 2or
DT C and C DT DT
DT C C DT DT DT DT
More Fuzzy Logic
44
• With fuzzy logic:
− isFast and isHot are DTs = smooth functions resp. of speed and heat valued in [0,1]
− DTs combine like booleans alt.
Code: isDangerous = fuzzyAnd( isFast( speed), isHot( heat))
Results make sense: (99.9,90) 50% dangerous, (100.1,50.1) 25% dangerous
1 2 1 2
1 2 1 2
min ,
or max ,
DT C and C DT DT
DT C C DT DT
45. Scripting
Danske Bank
Smoothing = Fuzzy Logic
45
• Remarkable result:
established smoothing exactly is application of Fuzzy Logic
Digital smoothing = apply fuzzy logic to if spot>strike then pay 1
Barrier smoothing = apply fuzzy logic to if spot>barrier then alive = 0
• That explains, in hindsight, why smoothing performs so remarkably well
Not a hack
(In hindsight) based on established scientific theory
• And gives us the means to correctly, automatically smooth everything
Smoothing everything = apply fuzzy logic to the evaluation of all conditions
Without modifying scripts in any way
We derive the evaluator into a fuzzy evaluator that overrides visits to if
nodes and conditions and evaluates them with Fuzzy Logic
46. Scripting
Danske Bank
Evaluation of ”if this then that” with fuzzy logic
46
• Evaluation with sharp logic
1. Evaluate condition C
2. If C is true, evaluate statements between then and else or endIf
3. If C is false, evaluate statements between else and endIf if any
• Evaluation with fuzzy logic
1. Record state S0 (all variables and products) just before the ”if” statement
2. Evaluate the degree of truth (DT) of the condition
3. Evaluate ”if true” statements
4. Record resulting state S1
5. Restore state to S0
6. Evaluate ”else” statements if any
7. Record resulting state S2
8. Set final state S = DT * S1 + (1-DT) * S2
47. Scripting
Danske Bank
Fuzzy Logic : results
47
• No modification to scripts
• Override evaluation of if this then that statements, conditions and combinators
• Effectively stabilises risks sensitivities with minimal PV impact
• (With proper optimization) just as fast as normal
• Easily flick between sharp (pricing) and fuzzy (risk) evaluation