SlideShare a Scribd company logo
Danske Bank
Stabilize risks of discontinuous payoffs
with Fuzzy Logic
Antoine Savine
Fuzzy Logic
Danske Bank
2
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
Fuzzy Logic
Danske Bank
Malliavin’s calculus
3
• The industry developed 2 families of methods to deal with this problem:
• One is the Likelihood Ratio Method (LRM) and more general Malliavin’s calculus
− Apply
− Compute pathwise
− No need to differentiate a discontinuous payoff, differentiate log-likelihood instead
− Tractability, efficiency and stability depend on model
     
     
 
 
 
          
,
,
, ,
,
log , , log ,
i
i
i i
i i X
a
a
X X
a a
X
Ea f X f X a X dX
a a
a X
f X a X dX f X a X dX
a X
f X a X a X dX E f X a X


 

  
   
  
 
    
   

 

 log ,
ia
a X 
 
Fuzzy Logic
Danske Bank
Payoff smoothing
4
• Payoff smoothing is considerably simpler (and surprinsingly effective):
Replace discontinuous payoffs by ”close” continuous ones
− Digital  Call spread
− Barrier  Smooth barrier
• Benefit: work on payoffs only, no work required on models
• Problem: to identify (and smooth) all discontinuities
we need to know exactly how the payoff is calculated
• 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
Fuzzy Logic
Danske Bank
Smoothing a digital
5
• 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



Fuzzy Logic
Danske Bank
Smoothing a barrier
6
• Spread notional across barriers in (B-e/2,B+e/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-e/2,B+e/2)
total KO
partial KO
no KO
Fuzzy Logic
Danske Bank
Smoothing everything
7
• How can we generalize digital/barrier smoothing to any payoff?
• We need to identify (and smooth) all discontinuities
• Hence, we need to know exactly how the payoff is calculated
• We need access to the ”source code” of the payoff
• ”Hard coded” payoffs only allow evaluation against scenarios: ”compiled code”
• But scripted payoffs provide full information: ”source code”
Fuzzy Logic
Danske Bank
Scripting Languages
8
• Simple ”programming” language optimized for the description of cash-flows
• Describe the cash-flows in any transaction: vanillas, exotics, even CVA/KVA
• And then evaluate the script with some model
• 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
Fuzzy Logic
Danske Bank
The many benefits of scripting cash-flows
9
• Run-time pricing and risks of transactions
− Users create/edit a transaction by scripting its cash-flows
− Then produce value and risk by sending the script to a model
• Homogeneous representation of all cash flows in all transactions
− Software can manipulate, merge and compress cash-flows across transactions
− Crucial for ”derivatives on netting sets” like VAR/CVA/XVA/KVA/RWA
• Crucially for us, provide ”source code” cash-flow information to the software
− So the software can, among (many) others:
− Obviously, evaluate cash-flows in different scenarios
− Detect contingency, path-dependence or early exit and select the appropriate model
− Optimise the calculation of value and risk sensitivities
− Detect (and smooth) discontinuities
Fuzzy Logic
Danske Bank
Identifying discontinuities
10
• In programming, incl. scripting, discontinuities come from control flow
− If this then that pattern
− Call to discontinuous functions (meaning themselves implement if this then that statements)
• Autocallable:
− 3 control flows
− Unstable risk
Fuzzy Logic
Danske Bank
Manual smoothing
11
• Replace if this then that by smooth
• Does the job, but hard to write and read and error prone, even in simple cases
Fuzzy Logic
Danske Bank
Automatic smoothing
12
• Automatically turn
− Nice, easy, natural scripts
− Into smoothed scripts that produce stable risks
• We have access to the script  we can identify control flows
• We only need to smooth them all
Fuzzy Logic
Danske Bank
Fuzzy Logic to the rescue
13
• Turns out we don’t need to transform the script at all!
• We just need to evaluate differently
the conditions and the conditional statements
• 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 65% alive and 35% dead
• 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
Fuzzy Logic
Danske Bank
Fuzzy Logic
14
• Invented in the 1960s
• Not to smooth financial risks
• But to build the first expert systems
• Automate expert opinions
− Expert: it is dangerous for the engine to go fast and be 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 !!
Fuzzy Logic
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
15
• 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: danger = 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


Fuzzy Logic
Danske Bank
Back to payoff smoothing
16
• Digital smoothing = apply fuzzy logic to if spot>strike then pay 1
• Barrier smoothing = apply fuzzy logic to if spot>barrier then alive = 0
• Classical smoothing exactly corresponds to
the replacement of sharp logic with fuzzy logic in the evaluation of conditions
• Reversely, we can systematically apply fuzzy logic to evaluate all conditions
• Fuzzy logic for control flow effectively removes discontinuities
• And stabilises risk sensitivities
Fuzzy Logic
Danske Bank
Evaluation of ”if this then that” with fuzzy logic
17
• 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
Fuzzy Logic
Danske Bank
Fuzzy Logic implementation
18
• No change in scripts
• Change the evaluation of if this then that statements only
• 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
Fuzzy Logic
Danske Bank
Advanced Fuzzy Logic: condition domains
19
• Consider the script
• The variable digPays is valued in {0,1}
• To apply fuzzy logic / call spread to digPays > 0 makes no sense
• Evidently the DT of digPays > 0 is digPays itself
• This is easy to correct but we must first compute the domains of all conditions
• Fortunately, we have access to the script
• We can write code that traverses the script and calculates condition domains
• This is not as hard as it sounds
Fuzzy Logic
Danske Bank
Advanced Fuzzy Logic: beware the cat
20
• We are used to conditions being true or false
− Schrodinger’s cat is dead or alive
− The cat cannot be dead and alive
− If the cat is alive then it can’t be dead, etc.
• We may write scripts based on such logic, like for instance:
• With fuzzy logic, where spot > 100 to a degree and <= 100 to a degree
− The logic that underlies the script is not applicable
− And the result is a bias in the value by orders of magnitude!
− With fuzzy logic, best stick to the decription of cash-flows and refrain from injecting additional ”logic”
X has to be overwritten by either 0 or 1 right?
Fuzzy Logic
Danske Bank
Advanced Fuzzy Logic: what epsilon?
21
• Fuzzy logic applies a ”call spread” to conditions:
− Too wide  risk of valuation bias
− Too narrow  unstable risks
− What is a reasonable size?
• Typical e for a condition expr > 0 = fraction of the std dev of expr
• Alternative = set e such that Proba ( - e/2 < expr < e/2) = target
• Solution: use pre-simulations to estimate the first 2 moments of all conditions
• And set their epsilon accordingly

More Related Content

What's hot

American Options with Monte Carlo
American Options with Monte CarloAmerican Options with Monte Carlo
American Options with Monte Carlo
Tommaso Gabbriellini
 
Ch6 slides
Ch6 slidesCh6 slides
Ch6 slides
fentaw leykun
 
Chapter 07 - Autocorrelation.pptx
Chapter 07 - Autocorrelation.pptxChapter 07 - Autocorrelation.pptx
Chapter 07 - Autocorrelation.pptx
Farah Amir
 
Pairs Trading: Optimizing via Mixed Copula versus Distance Method for S&P 5...
	 Pairs Trading: Optimizing via Mixed Copula versus Distance Method for S&P 5...	 Pairs Trading: Optimizing via Mixed Copula versus Distance Method for S&P 5...
Pairs Trading: Optimizing via Mixed Copula versus Distance Method for S&P 5...
Fernando A. B. Sabino da Silva
 
Volatility - CH 22 - Hedging with VIX Derivatives | CMT Level 3 | Chartered M...
Volatility - CH 22 - Hedging with VIX Derivatives | CMT Level 3 | Chartered M...Volatility - CH 22 - Hedging with VIX Derivatives | CMT Level 3 | Chartered M...
Volatility - CH 22 - Hedging with VIX Derivatives | CMT Level 3 | Chartered M...
Professional Training Academy
 
Simulation methods finance_1
Simulation methods finance_1Simulation methods finance_1
Simulation methods finance_1
Giovanni Della Lunga
 
Local and Stochastic volatility
Local and Stochastic volatilityLocal and Stochastic volatility
Local and Stochastic volatility
Swati Mital
 
Financial derivatives (2)
Financial derivatives (2)Financial derivatives (2)
Financial derivatives (2)
larrotci
 
Pairs Trading
Pairs TradingPairs Trading
Pairs Trading
Vincent Chen
 
Pairs Trading
Pairs TradingPairs Trading
Pairs Trading
nattyvirk
 
Black Scholes Model.pdf
Black Scholes Model.pdfBlack Scholes Model.pdf
Black Scholes Model.pdf
Dhaval Bhatt
 
"Quantitative Trading as a Mathematical Science" by Dr. Haksun Li, Founder an...
"Quantitative Trading as a Mathematical Science" by Dr. Haksun Li, Founder an..."Quantitative Trading as a Mathematical Science" by Dr. Haksun Li, Founder an...
"Quantitative Trading as a Mathematical Science" by Dr. Haksun Li, Founder an...
Quantopian
 
"Quantum Hierarchical Risk Parity - A Quantum-Inspired Approach to Portfolio ...
"Quantum Hierarchical Risk Parity - A Quantum-Inspired Approach to Portfolio ..."Quantum Hierarchical Risk Parity - A Quantum-Inspired Approach to Portfolio ...
"Quantum Hierarchical Risk Parity - A Quantum-Inspired Approach to Portfolio ...
Quantopian
 
Ch03
Ch03Ch03
Ch03
waiwai28
 
Should You Build Your Own Backtester? by Michael Halls-Moore at QuantCon 2016
Should You Build Your Own Backtester? by Michael Halls-Moore at QuantCon 2016Should You Build Your Own Backtester? by Michael Halls-Moore at QuantCon 2016
Should You Build Your Own Backtester? by Michael Halls-Moore at QuantCon 2016
Quantopian
 
Risk aversion
Risk aversionRisk aversion
Risk aversion
Anuj Bhatia
 
Volatility Smiles and Stylised Facts in the Heston Model
Volatility Smiles and Stylised Facts in the Heston ModelVolatility Smiles and Stylised Facts in the Heston Model
Volatility Smiles and Stylised Facts in the Heston Model
Kamrul Hasan
 
Lf 2020 bachelier
Lf 2020 bachelierLf 2020 bachelier
Lf 2020 bachelier
luc faucheux
 
Autocorrelation (1)
Autocorrelation (1)Autocorrelation (1)
Autocorrelation (1)
Manokamna Kochar
 
Risk Management - CH 5 -Risk Control | CMT Level 3 | Chartered Market Technic...
Risk Management - CH 5 -Risk Control | CMT Level 3 | Chartered Market Technic...Risk Management - CH 5 -Risk Control | CMT Level 3 | Chartered Market Technic...
Risk Management - CH 5 -Risk Control | CMT Level 3 | Chartered Market Technic...
Professional Training Academy
 

What's hot (20)

American Options with Monte Carlo
American Options with Monte CarloAmerican Options with Monte Carlo
American Options with Monte Carlo
 
Ch6 slides
Ch6 slidesCh6 slides
Ch6 slides
 
Chapter 07 - Autocorrelation.pptx
Chapter 07 - Autocorrelation.pptxChapter 07 - Autocorrelation.pptx
Chapter 07 - Autocorrelation.pptx
 
Pairs Trading: Optimizing via Mixed Copula versus Distance Method for S&P 5...
	 Pairs Trading: Optimizing via Mixed Copula versus Distance Method for S&P 5...	 Pairs Trading: Optimizing via Mixed Copula versus Distance Method for S&P 5...
Pairs Trading: Optimizing via Mixed Copula versus Distance Method for S&P 5...
 
Volatility - CH 22 - Hedging with VIX Derivatives | CMT Level 3 | Chartered M...
Volatility - CH 22 - Hedging with VIX Derivatives | CMT Level 3 | Chartered M...Volatility - CH 22 - Hedging with VIX Derivatives | CMT Level 3 | Chartered M...
Volatility - CH 22 - Hedging with VIX Derivatives | CMT Level 3 | Chartered M...
 
Simulation methods finance_1
Simulation methods finance_1Simulation methods finance_1
Simulation methods finance_1
 
Local and Stochastic volatility
Local and Stochastic volatilityLocal and Stochastic volatility
Local and Stochastic volatility
 
Financial derivatives (2)
Financial derivatives (2)Financial derivatives (2)
Financial derivatives (2)
 
Pairs Trading
Pairs TradingPairs Trading
Pairs Trading
 
Pairs Trading
Pairs TradingPairs Trading
Pairs Trading
 
Black Scholes Model.pdf
Black Scholes Model.pdfBlack Scholes Model.pdf
Black Scholes Model.pdf
 
"Quantitative Trading as a Mathematical Science" by Dr. Haksun Li, Founder an...
"Quantitative Trading as a Mathematical Science" by Dr. Haksun Li, Founder an..."Quantitative Trading as a Mathematical Science" by Dr. Haksun Li, Founder an...
"Quantitative Trading as a Mathematical Science" by Dr. Haksun Li, Founder an...
 
"Quantum Hierarchical Risk Parity - A Quantum-Inspired Approach to Portfolio ...
"Quantum Hierarchical Risk Parity - A Quantum-Inspired Approach to Portfolio ..."Quantum Hierarchical Risk Parity - A Quantum-Inspired Approach to Portfolio ...
"Quantum Hierarchical Risk Parity - A Quantum-Inspired Approach to Portfolio ...
 
Ch03
Ch03Ch03
Ch03
 
Should You Build Your Own Backtester? by Michael Halls-Moore at QuantCon 2016
Should You Build Your Own Backtester? by Michael Halls-Moore at QuantCon 2016Should You Build Your Own Backtester? by Michael Halls-Moore at QuantCon 2016
Should You Build Your Own Backtester? by Michael Halls-Moore at QuantCon 2016
 
Risk aversion
Risk aversionRisk aversion
Risk aversion
 
Volatility Smiles and Stylised Facts in the Heston Model
Volatility Smiles and Stylised Facts in the Heston ModelVolatility Smiles and Stylised Facts in the Heston Model
Volatility Smiles and Stylised Facts in the Heston Model
 
Lf 2020 bachelier
Lf 2020 bachelierLf 2020 bachelier
Lf 2020 bachelier
 
Autocorrelation (1)
Autocorrelation (1)Autocorrelation (1)
Autocorrelation (1)
 
Risk Management - CH 5 -Risk Control | CMT Level 3 | Chartered Market Technic...
Risk Management - CH 5 -Risk Control | CMT Level 3 | Chartered Market Technic...Risk Management - CH 5 -Risk Control | CMT Level 3 | Chartered Market Technic...
Risk Management - CH 5 -Risk Control | CMT Level 3 | Chartered Market Technic...
 

Similar to Stabilise risks of discontinuous payoffs with Fuzzy Logic by Antoine Savine

Garbled Circuits for Secure Credential Management Services
Garbled Circuits for Secure Credential Management ServicesGarbled Circuits for Secure Credential Management Services
Garbled Circuits for Secure Credential Management Services
OnBoard Security, Inc. - a Qualcomm Company
 
Concurrency in Distributed Systems : Leslie Lamport papers
Concurrency in Distributed Systems : Leslie Lamport papersConcurrency in Distributed Systems : Leslie Lamport papers
Concurrency in Distributed Systems : Leslie Lamport papers
Subhajit Sahu
 
Fpga creating counter with internal clock
Fpga   creating counter with internal clockFpga   creating counter with internal clock
Fpga creating counter with internal clock
Politeknik Elektronika Negeri Surabaya
 
Matlab Script - Loop Control
Matlab Script - Loop ControlMatlab Script - Loop Control
Matlab Script - Loop Control
Shameer Ahmed Koya
 
IEEE-754 standard format to handle Floating-Point calculations in RISC-V CPUs...
IEEE-754 standard format to handle Floating-Point calculations in RISC-V CPUs...IEEE-754 standard format to handle Floating-Point calculations in RISC-V CPUs...
IEEE-754 standard format to handle Floating-Point calculations in RISC-V CPUs...
zeeshanshanzy009
 
Verilog-Behavioral Modeling .pdf
Verilog-Behavioral Modeling .pdfVerilog-Behavioral Modeling .pdf
Verilog-Behavioral Modeling .pdf
UsssshaaaMehta
 
Fekra c++ Course #2
Fekra c++ Course #2Fekra c++ Course #2
Fekra c++ Course #2
Amr Alaa El Deen
 
13.ppt
13.ppt13.ppt
Writing more complex models (continued)
Writing more complex models (continued)Writing more complex models (continued)
Writing more complex models (continued)
Mohamed Samy
 
Day4 Lab
Day4 LabDay4 Lab
Day4 Lab
Ron Liu
 
Design considerations
Design considerationsDesign considerations
Electronz_Chapter_12.pptx
Electronz_Chapter_12.pptxElectronz_Chapter_12.pptx
Electronz_Chapter_12.pptx
Mokete5
 
Fundamentals of Programming Lecture #1.pptx
Fundamentals of Programming Lecture #1.pptxFundamentals of Programming Lecture #1.pptx
Fundamentals of Programming Lecture #1.pptx
Eyasu46
 
Introduction to Selection control structures in C++
Introduction to Selection control structures in C++ Introduction to Selection control structures in C++
Introduction to Selection control structures in C++
Neeru Mittal
 
Flip & flop by Zaheer Abbas Aghani
Flip & flop by Zaheer Abbas AghaniFlip & flop by Zaheer Abbas Aghani
Flip & flop by Zaheer Abbas Aghani
Information Technology Center
 
Rate Limiting at Scale, from SANS AppSec Las Vegas 2012
Rate Limiting at Scale, from SANS AppSec Las Vegas 2012Rate Limiting at Scale, from SANS AppSec Las Vegas 2012
Rate Limiting at Scale, from SANS AppSec Las Vegas 2012
Nick Galbreath
 
Writing more complex models
Writing more complex modelsWriting more complex models
Writing more complex models
Mohamed Samy
 
1 factor vs.2 factor gaussian model for zero coupon bond pricing final
1 factor vs.2 factor gaussian model for zero coupon bond pricing   final1 factor vs.2 factor gaussian model for zero coupon bond pricing   final
1 factor vs.2 factor gaussian model for zero coupon bond pricing final
Financial Algorithms
 
DEF CON 27 - ANDREAS BAUMHOF - are quantum computers really a threat to crypt...
DEF CON 27 - ANDREAS BAUMHOF - are quantum computers really a threat to crypt...DEF CON 27 - ANDREAS BAUMHOF - are quantum computers really a threat to crypt...
DEF CON 27 - ANDREAS BAUMHOF - are quantum computers really a threat to crypt...
Felipe Prado
 
lecture8_Cuong.ppt
lecture8_Cuong.pptlecture8_Cuong.ppt
lecture8_Cuong.ppt
HongV34104
 

Similar to Stabilise risks of discontinuous payoffs with Fuzzy Logic by Antoine Savine (20)

Garbled Circuits for Secure Credential Management Services
Garbled Circuits for Secure Credential Management ServicesGarbled Circuits for Secure Credential Management Services
Garbled Circuits for Secure Credential Management Services
 
Concurrency in Distributed Systems : Leslie Lamport papers
Concurrency in Distributed Systems : Leslie Lamport papersConcurrency in Distributed Systems : Leslie Lamport papers
Concurrency in Distributed Systems : Leslie Lamport papers
 
Fpga creating counter with internal clock
Fpga   creating counter with internal clockFpga   creating counter with internal clock
Fpga creating counter with internal clock
 
Matlab Script - Loop Control
Matlab Script - Loop ControlMatlab Script - Loop Control
Matlab Script - Loop Control
 
IEEE-754 standard format to handle Floating-Point calculations in RISC-V CPUs...
IEEE-754 standard format to handle Floating-Point calculations in RISC-V CPUs...IEEE-754 standard format to handle Floating-Point calculations in RISC-V CPUs...
IEEE-754 standard format to handle Floating-Point calculations in RISC-V CPUs...
 
Verilog-Behavioral Modeling .pdf
Verilog-Behavioral Modeling .pdfVerilog-Behavioral Modeling .pdf
Verilog-Behavioral Modeling .pdf
 
Fekra c++ Course #2
Fekra c++ Course #2Fekra c++ Course #2
Fekra c++ Course #2
 
13.ppt
13.ppt13.ppt
13.ppt
 
Writing more complex models (continued)
Writing more complex models (continued)Writing more complex models (continued)
Writing more complex models (continued)
 
Day4 Lab
Day4 LabDay4 Lab
Day4 Lab
 
Design considerations
Design considerationsDesign considerations
Design considerations
 
Electronz_Chapter_12.pptx
Electronz_Chapter_12.pptxElectronz_Chapter_12.pptx
Electronz_Chapter_12.pptx
 
Fundamentals of Programming Lecture #1.pptx
Fundamentals of Programming Lecture #1.pptxFundamentals of Programming Lecture #1.pptx
Fundamentals of Programming Lecture #1.pptx
 
Introduction to Selection control structures in C++
Introduction to Selection control structures in C++ Introduction to Selection control structures in C++
Introduction to Selection control structures in C++
 
Flip & flop by Zaheer Abbas Aghani
Flip & flop by Zaheer Abbas AghaniFlip & flop by Zaheer Abbas Aghani
Flip & flop by Zaheer Abbas Aghani
 
Rate Limiting at Scale, from SANS AppSec Las Vegas 2012
Rate Limiting at Scale, from SANS AppSec Las Vegas 2012Rate Limiting at Scale, from SANS AppSec Las Vegas 2012
Rate Limiting at Scale, from SANS AppSec Las Vegas 2012
 
Writing more complex models
Writing more complex modelsWriting more complex models
Writing more complex models
 
1 factor vs.2 factor gaussian model for zero coupon bond pricing final
1 factor vs.2 factor gaussian model for zero coupon bond pricing   final1 factor vs.2 factor gaussian model for zero coupon bond pricing   final
1 factor vs.2 factor gaussian model for zero coupon bond pricing final
 
DEF CON 27 - ANDREAS BAUMHOF - are quantum computers really a threat to crypt...
DEF CON 27 - ANDREAS BAUMHOF - are quantum computers really a threat to crypt...DEF CON 27 - ANDREAS BAUMHOF - are quantum computers really a threat to crypt...
DEF CON 27 - ANDREAS BAUMHOF - are quantum computers really a threat to crypt...
 
lecture8_Cuong.ppt
lecture8_Cuong.pptlecture8_Cuong.ppt
lecture8_Cuong.ppt
 

Recently uploaded

快速制作美国迈阿密大学牛津分校毕业证文凭证书英文原版一模一样
快速制作美国迈阿密大学牛津分校毕业证文凭证书英文原版一模一样快速制作美国迈阿密大学牛津分校毕业证文凭证书英文原版一模一样
快速制作美国迈阿密大学牛津分校毕业证文凭证书英文原版一模一样
rlo9fxi
 
Governor Olli Rehn: Inflation down and recovery supported by interest rate cu...
Governor Olli Rehn: Inflation down and recovery supported by interest rate cu...Governor Olli Rehn: Inflation down and recovery supported by interest rate cu...
Governor Olli Rehn: Inflation down and recovery supported by interest rate cu...
Suomen Pankki
 
1.2 Business Ideas Business Ideas Busine
1.2 Business Ideas Business Ideas Busine1.2 Business Ideas Business Ideas Busine
1.2 Business Ideas Business Ideas Busine
Lawrence101
 
^%$Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Duba...
^%$Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Duba...^%$Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Duba...
^%$Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Duba...
mayaclinic18
 
Who Is Abhay Bhutada, MD of Poonawalla Fincorp
Who Is Abhay Bhutada, MD of Poonawalla FincorpWho Is Abhay Bhutada, MD of Poonawalla Fincorp
Who Is Abhay Bhutada, MD of Poonawalla Fincorp
beulahfernandes8
 
The state of welfare Resolution Foundation Event
The state of welfare Resolution Foundation EventThe state of welfare Resolution Foundation Event
The state of welfare Resolution Foundation Event
ResolutionFoundation
 
Seeman_Fiintouch_LLP_Newsletter_Jun_2024.pdf
Seeman_Fiintouch_LLP_Newsletter_Jun_2024.pdfSeeman_Fiintouch_LLP_Newsletter_Jun_2024.pdf
Seeman_Fiintouch_LLP_Newsletter_Jun_2024.pdf
Ashis Kumar Dey
 
New Visa Rules for Tourists and Students in Thailand | Amit Kakkar Easy Visa
New Visa Rules for Tourists and Students in Thailand | Amit Kakkar Easy VisaNew Visa Rules for Tourists and Students in Thailand | Amit Kakkar Easy Visa
New Visa Rules for Tourists and Students in Thailand | Amit Kakkar Easy Visa
Amit Kakkar
 
Optimizing Net Interest Margin (NIM) in the Financial Sector (With Examples).pdf
Optimizing Net Interest Margin (NIM) in the Financial Sector (With Examples).pdfOptimizing Net Interest Margin (NIM) in the Financial Sector (With Examples).pdf
Optimizing Net Interest Margin (NIM) in the Financial Sector (With Examples).pdf
shruti1menon2
 
Solution Manual For Financial Accounting, 8th Canadian Edition 2024, by Libby...
Solution Manual For Financial Accounting, 8th Canadian Edition 2024, by Libby...Solution Manual For Financial Accounting, 8th Canadian Edition 2024, by Libby...
Solution Manual For Financial Accounting, 8th Canadian Edition 2024, by Libby...
Donc Test
 
What's a worker’s market? Job quality and labour market tightness
What's a worker’s market? Job quality and labour market tightnessWhat's a worker’s market? Job quality and labour market tightness
What's a worker’s market? Job quality and labour market tightness
Labour Market Information Council | Conseil de l’information sur le marché du travail
 
STREETONOMICS: Exploring the Uncharted Territories of Informal Markets throug...
STREETONOMICS: Exploring the Uncharted Territories of Informal Markets throug...STREETONOMICS: Exploring the Uncharted Territories of Informal Markets throug...
STREETONOMICS: Exploring the Uncharted Territories of Informal Markets throug...
sameer shah
 
1比1复刻(ksu毕业证书)美国堪萨斯州立大学毕业证本科文凭证书原版一模一样
1比1复刻(ksu毕业证书)美国堪萨斯州立大学毕业证本科文凭证书原版一模一样1比1复刻(ksu毕业证书)美国堪萨斯州立大学毕业证本科文凭证书原版一模一样
1比1复刻(ksu毕业证书)美国堪萨斯州立大学毕业证本科文凭证书原版一模一样
28xo7hf
 
University of North Carolina at Charlotte degree offer diploma Transcript
University of North Carolina at Charlotte degree offer diploma TranscriptUniversity of North Carolina at Charlotte degree offer diploma Transcript
University of North Carolina at Charlotte degree offer diploma Transcript
tscdzuip
 
一比一原版美国新罕布什尔大学(unh)毕业证学历认证真实可查
一比一原版美国新罕布什尔大学(unh)毕业证学历认证真实可查一比一原版美国新罕布什尔大学(unh)毕业证学历认证真实可查
一比一原版美国新罕布什尔大学(unh)毕业证学历认证真实可查
taqyea
 
International Sustainability Standards Board
International Sustainability Standards BoardInternational Sustainability Standards Board
International Sustainability Standards Board
Kumar Ramaiah
 
Detailed power point presentation on compound interest and how it is calculated
Detailed power point presentation on compound interest  and how it is calculatedDetailed power point presentation on compound interest  and how it is calculated
Detailed power point presentation on compound interest and how it is calculated
KishanChaudhary23
 
Applying the Global Internal Audit Standards_AIS.pdf
Applying the Global Internal Audit Standards_AIS.pdfApplying the Global Internal Audit Standards_AIS.pdf
Applying the Global Internal Audit Standards_AIS.pdf
alexiusbrian1
 
5 Tips for Creating Standard Financial Reports
5 Tips for Creating Standard Financial Reports5 Tips for Creating Standard Financial Reports
5 Tips for Creating Standard Financial Reports
EasyReports
 
在线办理(TAMU毕业证书)美国德州农工大学毕业证PDF成绩单一模一样
在线办理(TAMU毕业证书)美国德州农工大学毕业证PDF成绩单一模一样在线办理(TAMU毕业证书)美国德州农工大学毕业证PDF成绩单一模一样
在线办理(TAMU毕业证书)美国德州农工大学毕业证PDF成绩单一模一样
5spllj1l
 

Recently uploaded (20)

快速制作美国迈阿密大学牛津分校毕业证文凭证书英文原版一模一样
快速制作美国迈阿密大学牛津分校毕业证文凭证书英文原版一模一样快速制作美国迈阿密大学牛津分校毕业证文凭证书英文原版一模一样
快速制作美国迈阿密大学牛津分校毕业证文凭证书英文原版一模一样
 
Governor Olli Rehn: Inflation down and recovery supported by interest rate cu...
Governor Olli Rehn: Inflation down and recovery supported by interest rate cu...Governor Olli Rehn: Inflation down and recovery supported by interest rate cu...
Governor Olli Rehn: Inflation down and recovery supported by interest rate cu...
 
1.2 Business Ideas Business Ideas Busine
1.2 Business Ideas Business Ideas Busine1.2 Business Ideas Business Ideas Busine
1.2 Business Ideas Business Ideas Busine
 
^%$Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Duba...
^%$Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Duba...^%$Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Duba...
^%$Zone1:+971)581248768’][* Legit & Safe #Abortion #Pills #For #Sale In #Duba...
 
Who Is Abhay Bhutada, MD of Poonawalla Fincorp
Who Is Abhay Bhutada, MD of Poonawalla FincorpWho Is Abhay Bhutada, MD of Poonawalla Fincorp
Who Is Abhay Bhutada, MD of Poonawalla Fincorp
 
The state of welfare Resolution Foundation Event
The state of welfare Resolution Foundation EventThe state of welfare Resolution Foundation Event
The state of welfare Resolution Foundation Event
 
Seeman_Fiintouch_LLP_Newsletter_Jun_2024.pdf
Seeman_Fiintouch_LLP_Newsletter_Jun_2024.pdfSeeman_Fiintouch_LLP_Newsletter_Jun_2024.pdf
Seeman_Fiintouch_LLP_Newsletter_Jun_2024.pdf
 
New Visa Rules for Tourists and Students in Thailand | Amit Kakkar Easy Visa
New Visa Rules for Tourists and Students in Thailand | Amit Kakkar Easy VisaNew Visa Rules for Tourists and Students in Thailand | Amit Kakkar Easy Visa
New Visa Rules for Tourists and Students in Thailand | Amit Kakkar Easy Visa
 
Optimizing Net Interest Margin (NIM) in the Financial Sector (With Examples).pdf
Optimizing Net Interest Margin (NIM) in the Financial Sector (With Examples).pdfOptimizing Net Interest Margin (NIM) in the Financial Sector (With Examples).pdf
Optimizing Net Interest Margin (NIM) in the Financial Sector (With Examples).pdf
 
Solution Manual For Financial Accounting, 8th Canadian Edition 2024, by Libby...
Solution Manual For Financial Accounting, 8th Canadian Edition 2024, by Libby...Solution Manual For Financial Accounting, 8th Canadian Edition 2024, by Libby...
Solution Manual For Financial Accounting, 8th Canadian Edition 2024, by Libby...
 
What's a worker’s market? Job quality and labour market tightness
What's a worker’s market? Job quality and labour market tightnessWhat's a worker’s market? Job quality and labour market tightness
What's a worker’s market? Job quality and labour market tightness
 
STREETONOMICS: Exploring the Uncharted Territories of Informal Markets throug...
STREETONOMICS: Exploring the Uncharted Territories of Informal Markets throug...STREETONOMICS: Exploring the Uncharted Territories of Informal Markets throug...
STREETONOMICS: Exploring the Uncharted Territories of Informal Markets throug...
 
1比1复刻(ksu毕业证书)美国堪萨斯州立大学毕业证本科文凭证书原版一模一样
1比1复刻(ksu毕业证书)美国堪萨斯州立大学毕业证本科文凭证书原版一模一样1比1复刻(ksu毕业证书)美国堪萨斯州立大学毕业证本科文凭证书原版一模一样
1比1复刻(ksu毕业证书)美国堪萨斯州立大学毕业证本科文凭证书原版一模一样
 
University of North Carolina at Charlotte degree offer diploma Transcript
University of North Carolina at Charlotte degree offer diploma TranscriptUniversity of North Carolina at Charlotte degree offer diploma Transcript
University of North Carolina at Charlotte degree offer diploma Transcript
 
一比一原版美国新罕布什尔大学(unh)毕业证学历认证真实可查
一比一原版美国新罕布什尔大学(unh)毕业证学历认证真实可查一比一原版美国新罕布什尔大学(unh)毕业证学历认证真实可查
一比一原版美国新罕布什尔大学(unh)毕业证学历认证真实可查
 
International Sustainability Standards Board
International Sustainability Standards BoardInternational Sustainability Standards Board
International Sustainability Standards Board
 
Detailed power point presentation on compound interest and how it is calculated
Detailed power point presentation on compound interest  and how it is calculatedDetailed power point presentation on compound interest  and how it is calculated
Detailed power point presentation on compound interest and how it is calculated
 
Applying the Global Internal Audit Standards_AIS.pdf
Applying the Global Internal Audit Standards_AIS.pdfApplying the Global Internal Audit Standards_AIS.pdf
Applying the Global Internal Audit Standards_AIS.pdf
 
5 Tips for Creating Standard Financial Reports
5 Tips for Creating Standard Financial Reports5 Tips for Creating Standard Financial Reports
5 Tips for Creating Standard Financial Reports
 
在线办理(TAMU毕业证书)美国德州农工大学毕业证PDF成绩单一模一样
在线办理(TAMU毕业证书)美国德州农工大学毕业证PDF成绩单一模一样在线办理(TAMU毕业证书)美国德州农工大学毕业证PDF成绩单一模一样
在线办理(TAMU毕业证书)美国德州农工大学毕业证PDF成绩单一模一样
 

Stabilise risks of discontinuous payoffs with Fuzzy Logic by Antoine Savine

  • 1. Danske Bank Stabilize risks of discontinuous payoffs with Fuzzy Logic Antoine Savine
  • 2. Fuzzy Logic Danske Bank 2 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
  • 3. Fuzzy Logic Danske Bank Malliavin’s calculus 3 • The industry developed 2 families of methods to deal with this problem: • One is the Likelihood Ratio Method (LRM) and more general Malliavin’s calculus − Apply − Compute pathwise − No need to differentiate a discontinuous payoff, differentiate log-likelihood instead − Tractability, efficiency and stability depend on model                              , , , , , log , , log , i i i i i i X a a X X a a X Ea f X f X a X dX a a a X f X a X dX f X a X dX a X f X a X a X dX E f X a X                                log , ia a X   
  • 4. Fuzzy Logic Danske Bank Payoff smoothing 4 • Payoff smoothing is considerably simpler (and surprinsingly effective): Replace discontinuous payoffs by ”close” continuous ones − Digital  Call spread − Barrier  Smooth barrier • Benefit: work on payoffs only, no work required on models • Problem: to identify (and smooth) all discontinuities we need to know exactly how the payoff is calculated • 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
  • 5. Fuzzy Logic Danske Bank Smoothing a digital 5 • 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   
  • 6. Fuzzy Logic Danske Bank Smoothing a barrier 6 • Spread notional across barriers in (B-e/2,B+e/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-e/2,B+e/2) total KO partial KO no KO
  • 7. Fuzzy Logic Danske Bank Smoothing everything 7 • How can we generalize digital/barrier smoothing to any payoff? • We need to identify (and smooth) all discontinuities • Hence, we need to know exactly how the payoff is calculated • We need access to the ”source code” of the payoff • ”Hard coded” payoffs only allow evaluation against scenarios: ”compiled code” • But scripted payoffs provide full information: ”source code”
  • 8. Fuzzy Logic Danske Bank Scripting Languages 8 • Simple ”programming” language optimized for the description of cash-flows • Describe the cash-flows in any transaction: vanillas, exotics, even CVA/KVA • And then evaluate the script with some model • 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
  • 9. Fuzzy Logic Danske Bank The many benefits of scripting cash-flows 9 • Run-time pricing and risks of transactions − Users create/edit a transaction by scripting its cash-flows − Then produce value and risk by sending the script to a model • Homogeneous representation of all cash flows in all transactions − Software can manipulate, merge and compress cash-flows across transactions − Crucial for ”derivatives on netting sets” like VAR/CVA/XVA/KVA/RWA • Crucially for us, provide ”source code” cash-flow information to the software − So the software can, among (many) others: − Obviously, evaluate cash-flows in different scenarios − Detect contingency, path-dependence or early exit and select the appropriate model − Optimise the calculation of value and risk sensitivities − Detect (and smooth) discontinuities
  • 10. Fuzzy Logic Danske Bank Identifying discontinuities 10 • In programming, incl. scripting, discontinuities come from control flow − If this then that pattern − Call to discontinuous functions (meaning themselves implement if this then that statements) • Autocallable: − 3 control flows − Unstable risk
  • 11. Fuzzy Logic Danske Bank Manual smoothing 11 • Replace if this then that by smooth • Does the job, but hard to write and read and error prone, even in simple cases
  • 12. Fuzzy Logic Danske Bank Automatic smoothing 12 • Automatically turn − Nice, easy, natural scripts − Into smoothed scripts that produce stable risks • We have access to the script  we can identify control flows • We only need to smooth them all
  • 13. Fuzzy Logic Danske Bank Fuzzy Logic to the rescue 13 • Turns out we don’t need to transform the script at all! • We just need to evaluate differently the conditions and the conditional statements • 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 65% alive and 35% dead • 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
  • 14. Fuzzy Logic Danske Bank Fuzzy Logic 14 • Invented in the 1960s • Not to smooth financial risks • But to build the first expert systems • Automate expert opinions − Expert: it is dangerous for the engine to go fast and be 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 !!
  • 15. Fuzzy Logic 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 15 • 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: danger = 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  
  • 16. Fuzzy Logic Danske Bank Back to payoff smoothing 16 • Digital smoothing = apply fuzzy logic to if spot>strike then pay 1 • Barrier smoothing = apply fuzzy logic to if spot>barrier then alive = 0 • Classical smoothing exactly corresponds to the replacement of sharp logic with fuzzy logic in the evaluation of conditions • Reversely, we can systematically apply fuzzy logic to evaluate all conditions • Fuzzy logic for control flow effectively removes discontinuities • And stabilises risk sensitivities
  • 17. Fuzzy Logic Danske Bank Evaluation of ”if this then that” with fuzzy logic 17 • 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
  • 18. Fuzzy Logic Danske Bank Fuzzy Logic implementation 18 • No change in scripts • Change the evaluation of if this then that statements only • 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
  • 19. Fuzzy Logic Danske Bank Advanced Fuzzy Logic: condition domains 19 • Consider the script • The variable digPays is valued in {0,1} • To apply fuzzy logic / call spread to digPays > 0 makes no sense • Evidently the DT of digPays > 0 is digPays itself • This is easy to correct but we must first compute the domains of all conditions • Fortunately, we have access to the script • We can write code that traverses the script and calculates condition domains • This is not as hard as it sounds
  • 20. Fuzzy Logic Danske Bank Advanced Fuzzy Logic: beware the cat 20 • We are used to conditions being true or false − Schrodinger’s cat is dead or alive − The cat cannot be dead and alive − If the cat is alive then it can’t be dead, etc. • We may write scripts based on such logic, like for instance: • With fuzzy logic, where spot > 100 to a degree and <= 100 to a degree − The logic that underlies the script is not applicable − And the result is a bias in the value by orders of magnitude! − With fuzzy logic, best stick to the decription of cash-flows and refrain from injecting additional ”logic” X has to be overwritten by either 0 or 1 right?
  • 21. Fuzzy Logic Danske Bank Advanced Fuzzy Logic: what epsilon? 21 • Fuzzy logic applies a ”call spread” to conditions: − Too wide  risk of valuation bias − Too narrow  unstable risks − What is a reasonable size? • Typical e for a condition expr > 0 = fraction of the std dev of expr • Alternative = set e such that Proba ( - e/2 < expr < e/2) = target • Solution: use pre-simulations to estimate the first 2 moments of all conditions • And set their epsilon accordingly