SlideShare a Scribd company logo
Analyzing the Credit Default Swap Market Using
Cartesian Genetic Programming

based on the paper by L. Zangeneh and P. J. Bentley
from University College London

Karol Grzegorczyk
20-06-2013
Derivatives
A derivative is a financial instrument which derives its value from the value of
underlying entities

Classification by the relationship with underlying asset:

•
•
•

Options

Swaps
Forwards

Classification by the type of underlying asset:

•
•
•

Equity derivatives
Credit derivatives
Commodity derivatives
Credit Default Swap
Default means to fail to do something, such as pay a debt, that you legally have to do

There is a risk of default. The risk that debtor won't met their legal obligations
according to the contract

The lender can buy insurance in case of default. This insurance is called Credit
Default Swap.

In case of the event of default the buyer of the CDS (the loan lender) receives
compensation (usually the value of the loan)

CDS Spread is an amount of money that the buyer of the CDS regularly pays to the
seller
loan lender
&
CDS buyer

loan

interest

borrower

CDS spread
CDS seller
payment in case
of a default
CDS trading
CDS contract can be treated as an investment instead of as an insurance!
Investors can buy CDS contracts referencing some debt without actually owning this
debt! It is called 'Naked CDS'.
The value of a contract fluctuates based on the increasing or decreasing probability
that a reference entity will have a credit event.
Increased probability of such an event would make the contract worth more for the buyer
of protection, and worth less for the seller. The opposite occurs if the probability of a
credit event decreases.
An investor with a negative view of some company's credit can buy protection for a
relatively small periodic fee and receive a big payoff if the company defaults on its
bonds or has some other credit event!
Arbitrage is the practice of taking advantage of a price difference between two or more
markets.
CDS pricing
To be able to invest in CDS it is needed to model corporate default risk

There are several approaches to modeling default risk. One of the approaches
is the Duffie model, a.k.a. no-arbitrage model. It is defined by a simple
equation:
CDSspread = RiskFreeRate - DebtReturn

RiskFreeRate - the interest that an investor would expect from an absolutely
risk-free investment over a given period of time

DebtReturn - measure of a company's performance based on the amount of
debt it borrowed (bond yield)
Problem statement

Duffie theory assumes that there is no risk free arbitrage.

In practice relationship presented on the previous slide does not hold exactly.
There is some possibility of an arbitrage. It is called arbitrage channel or
arbitrage gap.

Arbitrage gap is a problem. It would be desirable to to reduce it, to build the
CDS pricing model more close to reality.

What is the exact relationship between CDS spread, debt return and risk free
rate?
Stochastic optimization
Problem optimization is a search for the best solution among candidate solutions
based on the quality of the candidate solution.
To find optimal solution it is needed to do four things:

•
•
•
•

Provide one or more initial candidate solutions.
Assess the quality of a candidate solutions.
Make a copy of a candidate solution.
Tweak a candidate solution, which produces a randomly slightly different
candidate solution.

In order to invoke those functions on a single candidate solution it is needed to have
the representation of the candidate solution.
Often the representation is referred to as the data structure used to define the
candidate solution (a vector, a tree, etc.)
Evolutionary Computation dictionary
individual

a candidate solution

child and parent

a child is the Tweaked copy of a candidate solution (its parent)

population

set of candidate solutions

fitness

quality

fitness landscape

quality function

mutation

plain tweaking

recombination or
crossover

a special Tweak which takes two parents, swaps sections of them, and (usually)
produces two children. This is often thought as “sexual” breeding.

breeding

producing one or more children from a population of parents through an iterated
process of selection and Tweaking (typically mutation or recombination)

genotype or genome

an individual’s data structure, as used during breeding

chromosome

a genotype in the form of a fixed-length vector

gene

a particular slot position in a chromosome

phenotype

how the individual operates during fitness assessment
The representation of an individual
In order to tackle a problem using a EA, candidate solutions must be encoded
in a suitable form.

For example in the traditional GA solutions are represented by binary bit strings
('chromosomes').

Other form of representation can be:

•
•
•
•
•
•

a vector (e.g. a fixed-length vector of real-valued numbers)
an arbitrary-length list of objects
an unordered set or collection of objects
a tree
a forest (set of trees)
a graph
Genetic Programming
Evolutionary algorithm-based methodology using stochastic methods to search
for and optimize small computer programs or other computational devices.

In order to optimize a computer program, it needs to be evaluated as
suboptimal rather than simply right or wrong.

Computer programs are represented by trees or lists, that are formed from
basic functions or CPU operations

GP’s initialization and Tweaking operators are particularly concerned with
maintaining closure, that is, producing valid individuals from previous ones

The Lisp family of languages is particularly suitable for tree representation of
computer programs.
Evolutionary operations applied for GP

initialization - randomly build trees by selecting from a function set; function
define how many children they require.

fitness evaluation - run program and see how it do -> data is needed!

mutation - rarely used, e.g. pick a random subtree and replace it with a
randomly-generated subtree

crossover - Using subtree crossover. In each individual, select a random
subtree (which can possibly be the root). Then swap those two subtrees
Example
program:
sin(cos( x − sin x ) + x x )

in Lisp:
(sin
(+
(cos (−x (sin x)))
(∗ x (sqrt x))
)
)

graph representation
Cartesian Genetic Programming
Cartesian Genetic Programming (CGP) represents computational structures as
directed acyclic graphs which are represented as a two-dimensional grid of
computational nodes which are encoded in the form of a string of integers.

When representing graph as a grid some genes become 'non-coding' genes.

Integers represents the program primitives and how they are connected
together.

Program that results from the decoding of a genotype is called a phenotype.

Fitness report is the CGP output.
CGP encoding and decoding example
001 100 131 201 044 254 2573

0
1
2
3

+ Add the data presented to inputs
- Subtract the data presented to inputs
* Multiply data presented to inputs
/ Divide data presented to inputs (protected)

y2 = x0 + x1
y5 = x0 * x1
y7 = x0 * x1 * ((x0 - x0) - x1) = - x0x12
y3 = 0
Analyzing CDS market using CGP
Goal: find an algorithm/program/equation that calculate CDS spread

Only fundamental operators were selected as a function set:
add, subtract, multiplication, division, power, square root.
Data divided into training (400 data points) and test (1000 data points)
datasets.
Experiments were performed for different mutation rates and the number of
nodes
Fitness is calculated for each datapoint by defining the error rate

Error = | CGPoutput - Data|
Experiments Results
Experiments Results

CGP has evolved completely different equation in each run, but some
components were repeated frequently:

•
•

x2 / x3
x2 - x3

Where:
x2 - buying price of bond
x3 - selling price of bond

In general created CDS pricing model is much more accurate compared to
the standard Duffi approach.
Bibliography

1. "Analyzing the Credit Default Swap Market Using Cartesian Genetic
Programming", L. Zangeneh, P.J. Bentley, Parallel Problem Solving from
Nature, PPSN XI, 2010
2. "Essentials of Metaheuristics, A Set of Undergraduate Lecture Notes", S.
Luke, Department of Computer Science, George Mason University, 2012
3. http://en.wikipedia.org/wiki/Credit_default_swap
4. http://www.investopedia.com/video/play/credit-default-swaps/

5. Book: "Cartesian genetic programming", J. F. Miller, Springer, 2011
6. Tutorial: "Cartesian Genetic Programming", J. F. Miller, S. L.
Harding, GECCO, 2012
Thank you

More Related Content

What's hot

L2 flash cards derivatives - ss 17
L2 flash cards derivatives - ss 17L2 flash cards derivatives - ss 17
L2 flash cards derivatives - ss 17
analystbuddy
 
Mb2521002105
Mb2521002105Mb2521002105
Mb2521002105
IJERA Editor
 
Decision tree for Predictive Modeling
Decision tree for Predictive ModelingDecision tree for Predictive Modeling
Decision tree for Predictive Modeling
Edureka!
 
Valuation of shares & bonds NOTES @ BECDOMS
Valuation of shares & bonds NOTES @ BECDOMS Valuation of shares & bonds NOTES @ BECDOMS
Valuation of shares & bonds NOTES @ BECDOMS
Babasab Patil
 
Cost Of Capital
Cost Of CapitalCost Of Capital
Cost Of Capital
elvieentero
 
VaR Approximation Methods
VaR Approximation MethodsVaR Approximation Methods
VaR Approximation Methods
Cognizant
 
Designing Alternate Solutions: How to Find Solutions That Meet Your Requirements
Designing Alternate Solutions: How to Find Solutions That Meet Your RequirementsDesigning Alternate Solutions: How to Find Solutions That Meet Your Requirements
Designing Alternate Solutions: How to Find Solutions That Meet Your Requirements
BA-EXPERTS
 
Optimization By Simulated Annealing
Optimization By Simulated AnnealingOptimization By Simulated Annealing
Optimization By Simulated Annealing
misterval
 
Decision treeprimer 2
Decision treeprimer 2Decision treeprimer 2
Decision treeprimer 2
olenyxa
 
Dynamic Pricing for Personal Unsecured Loans
Dynamic Pricing for Personal Unsecured LoansDynamic Pricing for Personal Unsecured Loans
Dynamic Pricing for Personal Unsecured Loans
Paul Golding
 
Top down attribution - Journal of Performance Measurement - par Christian Levecq
Top down attribution - Journal of Performance Measurement - par Christian LevecqTop down attribution - Journal of Performance Measurement - par Christian Levecq
Top down attribution - Journal of Performance Measurement - par Christian Levecq
Alban Jarry (Bibliothèque de Documents)
 
64920420 solution-ch10-charles-p-jones
64920420 solution-ch10-charles-p-jones64920420 solution-ch10-charles-p-jones
64920420 solution-ch10-charles-p-jones
Atiqa Tanveer
 
Financial ratios
Financial ratiosFinancial ratios
Financial ratios
MahenderjiS
 

What's hot (13)

L2 flash cards derivatives - ss 17
L2 flash cards derivatives - ss 17L2 flash cards derivatives - ss 17
L2 flash cards derivatives - ss 17
 
Mb2521002105
Mb2521002105Mb2521002105
Mb2521002105
 
Decision tree for Predictive Modeling
Decision tree for Predictive ModelingDecision tree for Predictive Modeling
Decision tree for Predictive Modeling
 
Valuation of shares & bonds NOTES @ BECDOMS
Valuation of shares & bonds NOTES @ BECDOMS Valuation of shares & bonds NOTES @ BECDOMS
Valuation of shares & bonds NOTES @ BECDOMS
 
Cost Of Capital
Cost Of CapitalCost Of Capital
Cost Of Capital
 
VaR Approximation Methods
VaR Approximation MethodsVaR Approximation Methods
VaR Approximation Methods
 
Designing Alternate Solutions: How to Find Solutions That Meet Your Requirements
Designing Alternate Solutions: How to Find Solutions That Meet Your RequirementsDesigning Alternate Solutions: How to Find Solutions That Meet Your Requirements
Designing Alternate Solutions: How to Find Solutions That Meet Your Requirements
 
Optimization By Simulated Annealing
Optimization By Simulated AnnealingOptimization By Simulated Annealing
Optimization By Simulated Annealing
 
Decision treeprimer 2
Decision treeprimer 2Decision treeprimer 2
Decision treeprimer 2
 
Dynamic Pricing for Personal Unsecured Loans
Dynamic Pricing for Personal Unsecured LoansDynamic Pricing for Personal Unsecured Loans
Dynamic Pricing for Personal Unsecured Loans
 
Top down attribution - Journal of Performance Measurement - par Christian Levecq
Top down attribution - Journal of Performance Measurement - par Christian LevecqTop down attribution - Journal of Performance Measurement - par Christian Levecq
Top down attribution - Journal of Performance Measurement - par Christian Levecq
 
64920420 solution-ch10-charles-p-jones
64920420 solution-ch10-charles-p-jones64920420 solution-ch10-charles-p-jones
64920420 solution-ch10-charles-p-jones
 
Financial ratios
Financial ratiosFinancial ratios
Financial ratios
 

Similar to Analyzing the CDS market using CGP

Decision theory
Decision theoryDecision theory
Decision theory
Aditya Mahagaonkar
 
Neural Network Model
Neural Network ModelNeural Network Model
Neural Network Model
Eric Esajian
 
Supervised learning
Supervised learningSupervised learning
Supervised learning
Johnson Ubah
 
Decision tree
Decision treeDecision tree
Decision tree
Estiak Khan
 
Statistical Learning on Credit Data
Statistical Learning on Credit DataStatistical Learning on Credit Data
Statistical Learning on Credit Data
Firas Obeid
 
A predictive system for detection of bankruptcy using machine learning techni...
A predictive system for detection of bankruptcy using machine learning techni...A predictive system for detection of bankruptcy using machine learning techni...
A predictive system for detection of bankruptcy using machine learning techni...
IJDKP
 
Machine_Learning.pptx
Machine_Learning.pptxMachine_Learning.pptx
Machine_Learning.pptx
VickyKumar131533
 
Case2_Best_Model_Final
Case2_Best_Model_FinalCase2_Best_Model_Final
Case2_Best_Model_Final
Eric Esajian
 
Data mining approaches and methods
Data mining approaches and methodsData mining approaches and methods
Data mining approaches and methods
sonangrai
 
Machine Learning Approach.pptx
Machine Learning Approach.pptxMachine Learning Approach.pptx
Machine Learning Approach.pptx
CYPatrickKwee
 
Credit risk models
Credit risk modelsCredit risk models
Credit risk models
Ujjwal 'Shanu'
 
The Cost of Capital
The Cost of CapitalThe Cost of Capital
The Cost of Capital
Anıl Sural
 
Proficiency comparison ofladtree
Proficiency comparison ofladtreeProficiency comparison ofladtree
Proficiency comparison ofladtree
ijcsa
 
Week14_Business Simulation Modeling MSBA.pptx
Week14_Business Simulation Modeling MSBA.pptxWeek14_Business Simulation Modeling MSBA.pptx
Week14_Business Simulation Modeling MSBA.pptx
Usamamalik345378
 
Credit Risk Evaluation Model
Credit Risk Evaluation ModelCredit Risk Evaluation Model
Credit Risk Evaluation Model
Mihai Enescu
 
Tutorial Knowledge Discovery
Tutorial Knowledge DiscoveryTutorial Knowledge Discovery
Tutorial Knowledge Discovery
SSSW
 
presentation of stock valuation
presentation of stock valuationpresentation of stock valuation
presentation of stock valuation
Muhammad Nawaz Ali
 
Credit iconip
Credit iconipCredit iconip
Credit iconip
Armando Vieira
 
Credit iconip
Credit iconipCredit iconip
Credit iconip
Armando Vieira
 
Fraud Detection by Stacking Cost-Sensitive Decision Trees
Fraud Detection by Stacking Cost-Sensitive Decision TreesFraud Detection by Stacking Cost-Sensitive Decision Trees
Fraud Detection by Stacking Cost-Sensitive Decision Trees
Alejandro Correa Bahnsen, PhD
 

Similar to Analyzing the CDS market using CGP (20)

Decision theory
Decision theoryDecision theory
Decision theory
 
Neural Network Model
Neural Network ModelNeural Network Model
Neural Network Model
 
Supervised learning
Supervised learningSupervised learning
Supervised learning
 
Decision tree
Decision treeDecision tree
Decision tree
 
Statistical Learning on Credit Data
Statistical Learning on Credit DataStatistical Learning on Credit Data
Statistical Learning on Credit Data
 
A predictive system for detection of bankruptcy using machine learning techni...
A predictive system for detection of bankruptcy using machine learning techni...A predictive system for detection of bankruptcy using machine learning techni...
A predictive system for detection of bankruptcy using machine learning techni...
 
Machine_Learning.pptx
Machine_Learning.pptxMachine_Learning.pptx
Machine_Learning.pptx
 
Case2_Best_Model_Final
Case2_Best_Model_FinalCase2_Best_Model_Final
Case2_Best_Model_Final
 
Data mining approaches and methods
Data mining approaches and methodsData mining approaches and methods
Data mining approaches and methods
 
Machine Learning Approach.pptx
Machine Learning Approach.pptxMachine Learning Approach.pptx
Machine Learning Approach.pptx
 
Credit risk models
Credit risk modelsCredit risk models
Credit risk models
 
The Cost of Capital
The Cost of CapitalThe Cost of Capital
The Cost of Capital
 
Proficiency comparison ofladtree
Proficiency comparison ofladtreeProficiency comparison ofladtree
Proficiency comparison ofladtree
 
Week14_Business Simulation Modeling MSBA.pptx
Week14_Business Simulation Modeling MSBA.pptxWeek14_Business Simulation Modeling MSBA.pptx
Week14_Business Simulation Modeling MSBA.pptx
 
Credit Risk Evaluation Model
Credit Risk Evaluation ModelCredit Risk Evaluation Model
Credit Risk Evaluation Model
 
Tutorial Knowledge Discovery
Tutorial Knowledge DiscoveryTutorial Knowledge Discovery
Tutorial Knowledge Discovery
 
presentation of stock valuation
presentation of stock valuationpresentation of stock valuation
presentation of stock valuation
 
Credit iconip
Credit iconipCredit iconip
Credit iconip
 
Credit iconip
Credit iconipCredit iconip
Credit iconip
 
Fraud Detection by Stacking Cost-Sensitive Decision Trees
Fraud Detection by Stacking Cost-Sensitive Decision TreesFraud Detection by Stacking Cost-Sensitive Decision Trees
Fraud Detection by Stacking Cost-Sensitive Decision Trees
 

Recently uploaded

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
 
Chapter 25: Economic Growth Summary from Samuelson and Nordhaus
Chapter 25: Economic Growth Summary from Samuelson and NordhausChapter 25: Economic Growth Summary from Samuelson and Nordhaus
Chapter 25: Economic Growth Summary from Samuelson and Nordhaus
iraangeles4
 
Singapore 2024 Sustainability Slides.pdf
Singapore 2024 Sustainability Slides.pdfSingapore 2024 Sustainability Slides.pdf
Singapore 2024 Sustainability Slides.pdf
International Federation of Accountants
 
一比一原版宾夕法尼亚大学毕业证(UPenn毕业证书)学历如何办理
一比一原版宾夕法尼亚大学毕业证(UPenn毕业证书)学历如何办理一比一原版宾夕法尼亚大学毕业证(UPenn毕业证书)学历如何办理
一比一原版宾夕法尼亚大学毕业证(UPenn毕业证书)学历如何办理
vpqasyb
 
Monthly Market Risk Update: June 2024 [SlideShare]
Monthly Market Risk Update: June 2024 [SlideShare]Monthly Market Risk Update: June 2024 [SlideShare]
Monthly Market Risk Update: June 2024 [SlideShare]
Commonwealth
 
China's Investment Leader - Dr. Alyce SU
China's Investment Leader - Dr. Alyce SUChina's Investment Leader - Dr. Alyce SU
China's Investment Leader - Dr. Alyce SU
msthrill
 
Seven Camp April 2024 Cohort Booklet.pdf
Seven Camp April 2024 Cohort Booklet.pdfSeven Camp April 2024 Cohort Booklet.pdf
Seven Camp April 2024 Cohort Booklet.pdf
FinTech Belgium
 
Calculation of compliance cost: Veterinary and sanitary control of aquatic bi...
Calculation of compliance cost: Veterinary and sanitary control of aquatic bi...Calculation of compliance cost: Veterinary and sanitary control of aquatic bi...
Calculation of compliance cost: Veterinary and sanitary control of aquatic bi...
Alexander Belyaev
 
Economic trends from a business point of view (May 2024)
Economic trends from a business point of view (May 2024)Economic trends from a business point of view (May 2024)
The-National-Commission-for-Culture-and-the-Arts.ppt
The-National-Commission-for-Culture-and-the-Arts.pptThe-National-Commission-for-Culture-and-the-Arts.ppt
The-National-Commission-for-Culture-and-the-Arts.ppt
rubensimborio1
 
Singapore Event 2024 State of Play Slides
Singapore Event 2024 State of Play SlidesSingapore Event 2024 State of Play Slides
Singapore Event 2024 State of Play Slides
International Federation of Accountants
 
Fabular Frames and the Four Ratio Problem
Fabular Frames and the Four Ratio ProblemFabular Frames and the Four Ratio Problem
Fabular Frames and the Four Ratio Problem
Majid Iqbal
 
Enhanced metrics to measure the Regulatory impact
Enhanced metrics to measure the Regulatory impactEnhanced metrics to measure the Regulatory impact
Enhanced metrics to measure the Regulatory impact
Alexander Belyaev
 
How to Invest in Cryptocurrency for Beginners: A Complete Guide
How to Invest in Cryptocurrency for Beginners: A Complete GuideHow to Invest in Cryptocurrency for Beginners: A Complete Guide
How to Invest in Cryptocurrency for Beginners: A Complete Guide
Daniel
 
CONTABILIDAD FINANCIERA / ENSAYO DE CONTABILIDAD
CONTABILIDAD FINANCIERA / ENSAYO DE CONTABILIDADCONTABILIDAD FINANCIERA / ENSAYO DE CONTABILIDAD
CONTABILIDAD FINANCIERA / ENSAYO DE CONTABILIDAD
godiperoficial
 
Tdasx: Interpreting the 2024 Cryptocurrency Market Funding Trends and Technol...
Tdasx: Interpreting the 2024 Cryptocurrency Market Funding Trends and Technol...Tdasx: Interpreting the 2024 Cryptocurrency Market Funding Trends and Technol...
Tdasx: Interpreting the 2024 Cryptocurrency Market Funding Trends and Technol...
nimaruinazawa258
 
Singapore 2024 Event The Way Forward Slides
Singapore 2024 Event The Way Forward SlidesSingapore 2024 Event The Way Forward Slides
Singapore 2024 Event The Way Forward Slides
International Federation of Accountants
 
GUIA_LEGAL_CHAPTER_2_FOREIGN EXCHANGE.pdf
GUIA_LEGAL_CHAPTER_2_FOREIGN EXCHANGE.pdfGUIA_LEGAL_CHAPTER_2_FOREIGN EXCHANGE.pdf
GUIA_LEGAL_CHAPTER_2_FOREIGN EXCHANGE.pdf
ProexportColombia1
 
BIHC Briefing June 2024 from Bank+Insurance Hybrid Capital in association wit...
BIHC Briefing June 2024 from Bank+Insurance Hybrid Capital in association wit...BIHC Briefing June 2024 from Bank+Insurance Hybrid Capital in association wit...
BIHC Briefing June 2024 from Bank+Insurance Hybrid Capital in association wit...
Neil Day
 
Singapore Event 2024 IPSASB Update Slides
Singapore Event 2024 IPSASB Update SlidesSingapore Event 2024 IPSASB Update Slides
Singapore Event 2024 IPSASB Update Slides
International Federation of Accountants
 

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...
 
Chapter 25: Economic Growth Summary from Samuelson and Nordhaus
Chapter 25: Economic Growth Summary from Samuelson and NordhausChapter 25: Economic Growth Summary from Samuelson and Nordhaus
Chapter 25: Economic Growth Summary from Samuelson and Nordhaus
 
Singapore 2024 Sustainability Slides.pdf
Singapore 2024 Sustainability Slides.pdfSingapore 2024 Sustainability Slides.pdf
Singapore 2024 Sustainability Slides.pdf
 
一比一原版宾夕法尼亚大学毕业证(UPenn毕业证书)学历如何办理
一比一原版宾夕法尼亚大学毕业证(UPenn毕业证书)学历如何办理一比一原版宾夕法尼亚大学毕业证(UPenn毕业证书)学历如何办理
一比一原版宾夕法尼亚大学毕业证(UPenn毕业证书)学历如何办理
 
Monthly Market Risk Update: June 2024 [SlideShare]
Monthly Market Risk Update: June 2024 [SlideShare]Monthly Market Risk Update: June 2024 [SlideShare]
Monthly Market Risk Update: June 2024 [SlideShare]
 
China's Investment Leader - Dr. Alyce SU
China's Investment Leader - Dr. Alyce SUChina's Investment Leader - Dr. Alyce SU
China's Investment Leader - Dr. Alyce SU
 
Seven Camp April 2024 Cohort Booklet.pdf
Seven Camp April 2024 Cohort Booklet.pdfSeven Camp April 2024 Cohort Booklet.pdf
Seven Camp April 2024 Cohort Booklet.pdf
 
Calculation of compliance cost: Veterinary and sanitary control of aquatic bi...
Calculation of compliance cost: Veterinary and sanitary control of aquatic bi...Calculation of compliance cost: Veterinary and sanitary control of aquatic bi...
Calculation of compliance cost: Veterinary and sanitary control of aquatic bi...
 
Economic trends from a business point of view (May 2024)
Economic trends from a business point of view (May 2024)Economic trends from a business point of view (May 2024)
Economic trends from a business point of view (May 2024)
 
The-National-Commission-for-Culture-and-the-Arts.ppt
The-National-Commission-for-Culture-and-the-Arts.pptThe-National-Commission-for-Culture-and-the-Arts.ppt
The-National-Commission-for-Culture-and-the-Arts.ppt
 
Singapore Event 2024 State of Play Slides
Singapore Event 2024 State of Play SlidesSingapore Event 2024 State of Play Slides
Singapore Event 2024 State of Play Slides
 
Fabular Frames and the Four Ratio Problem
Fabular Frames and the Four Ratio ProblemFabular Frames and the Four Ratio Problem
Fabular Frames and the Four Ratio Problem
 
Enhanced metrics to measure the Regulatory impact
Enhanced metrics to measure the Regulatory impactEnhanced metrics to measure the Regulatory impact
Enhanced metrics to measure the Regulatory impact
 
How to Invest in Cryptocurrency for Beginners: A Complete Guide
How to Invest in Cryptocurrency for Beginners: A Complete GuideHow to Invest in Cryptocurrency for Beginners: A Complete Guide
How to Invest in Cryptocurrency for Beginners: A Complete Guide
 
CONTABILIDAD FINANCIERA / ENSAYO DE CONTABILIDAD
CONTABILIDAD FINANCIERA / ENSAYO DE CONTABILIDADCONTABILIDAD FINANCIERA / ENSAYO DE CONTABILIDAD
CONTABILIDAD FINANCIERA / ENSAYO DE CONTABILIDAD
 
Tdasx: Interpreting the 2024 Cryptocurrency Market Funding Trends and Technol...
Tdasx: Interpreting the 2024 Cryptocurrency Market Funding Trends and Technol...Tdasx: Interpreting the 2024 Cryptocurrency Market Funding Trends and Technol...
Tdasx: Interpreting the 2024 Cryptocurrency Market Funding Trends and Technol...
 
Singapore 2024 Event The Way Forward Slides
Singapore 2024 Event The Way Forward SlidesSingapore 2024 Event The Way Forward Slides
Singapore 2024 Event The Way Forward Slides
 
GUIA_LEGAL_CHAPTER_2_FOREIGN EXCHANGE.pdf
GUIA_LEGAL_CHAPTER_2_FOREIGN EXCHANGE.pdfGUIA_LEGAL_CHAPTER_2_FOREIGN EXCHANGE.pdf
GUIA_LEGAL_CHAPTER_2_FOREIGN EXCHANGE.pdf
 
BIHC Briefing June 2024 from Bank+Insurance Hybrid Capital in association wit...
BIHC Briefing June 2024 from Bank+Insurance Hybrid Capital in association wit...BIHC Briefing June 2024 from Bank+Insurance Hybrid Capital in association wit...
BIHC Briefing June 2024 from Bank+Insurance Hybrid Capital in association wit...
 
Singapore Event 2024 IPSASB Update Slides
Singapore Event 2024 IPSASB Update SlidesSingapore Event 2024 IPSASB Update Slides
Singapore Event 2024 IPSASB Update Slides
 

Analyzing the CDS market using CGP

  • 1. Analyzing the Credit Default Swap Market Using Cartesian Genetic Programming based on the paper by L. Zangeneh and P. J. Bentley from University College London Karol Grzegorczyk 20-06-2013
  • 2. Derivatives A derivative is a financial instrument which derives its value from the value of underlying entities Classification by the relationship with underlying asset: • • • Options Swaps Forwards Classification by the type of underlying asset: • • • Equity derivatives Credit derivatives Commodity derivatives
  • 3. Credit Default Swap Default means to fail to do something, such as pay a debt, that you legally have to do There is a risk of default. The risk that debtor won't met their legal obligations according to the contract The lender can buy insurance in case of default. This insurance is called Credit Default Swap. In case of the event of default the buyer of the CDS (the loan lender) receives compensation (usually the value of the loan) CDS Spread is an amount of money that the buyer of the CDS regularly pays to the seller
  • 4. loan lender & CDS buyer loan interest borrower CDS spread CDS seller payment in case of a default
  • 5. CDS trading CDS contract can be treated as an investment instead of as an insurance! Investors can buy CDS contracts referencing some debt without actually owning this debt! It is called 'Naked CDS'. The value of a contract fluctuates based on the increasing or decreasing probability that a reference entity will have a credit event. Increased probability of such an event would make the contract worth more for the buyer of protection, and worth less for the seller. The opposite occurs if the probability of a credit event decreases. An investor with a negative view of some company's credit can buy protection for a relatively small periodic fee and receive a big payoff if the company defaults on its bonds or has some other credit event! Arbitrage is the practice of taking advantage of a price difference between two or more markets.
  • 6. CDS pricing To be able to invest in CDS it is needed to model corporate default risk There are several approaches to modeling default risk. One of the approaches is the Duffie model, a.k.a. no-arbitrage model. It is defined by a simple equation: CDSspread = RiskFreeRate - DebtReturn RiskFreeRate - the interest that an investor would expect from an absolutely risk-free investment over a given period of time DebtReturn - measure of a company's performance based on the amount of debt it borrowed (bond yield)
  • 7. Problem statement Duffie theory assumes that there is no risk free arbitrage. In practice relationship presented on the previous slide does not hold exactly. There is some possibility of an arbitrage. It is called arbitrage channel or arbitrage gap. Arbitrage gap is a problem. It would be desirable to to reduce it, to build the CDS pricing model more close to reality. What is the exact relationship between CDS spread, debt return and risk free rate?
  • 8. Stochastic optimization Problem optimization is a search for the best solution among candidate solutions based on the quality of the candidate solution. To find optimal solution it is needed to do four things: • • • • Provide one or more initial candidate solutions. Assess the quality of a candidate solutions. Make a copy of a candidate solution. Tweak a candidate solution, which produces a randomly slightly different candidate solution. In order to invoke those functions on a single candidate solution it is needed to have the representation of the candidate solution. Often the representation is referred to as the data structure used to define the candidate solution (a vector, a tree, etc.)
  • 9. Evolutionary Computation dictionary individual a candidate solution child and parent a child is the Tweaked copy of a candidate solution (its parent) population set of candidate solutions fitness quality fitness landscape quality function mutation plain tweaking recombination or crossover a special Tweak which takes two parents, swaps sections of them, and (usually) produces two children. This is often thought as “sexual” breeding. breeding producing one or more children from a population of parents through an iterated process of selection and Tweaking (typically mutation or recombination) genotype or genome an individual’s data structure, as used during breeding chromosome a genotype in the form of a fixed-length vector gene a particular slot position in a chromosome phenotype how the individual operates during fitness assessment
  • 10. The representation of an individual In order to tackle a problem using a EA, candidate solutions must be encoded in a suitable form. For example in the traditional GA solutions are represented by binary bit strings ('chromosomes'). Other form of representation can be: • • • • • • a vector (e.g. a fixed-length vector of real-valued numbers) an arbitrary-length list of objects an unordered set or collection of objects a tree a forest (set of trees) a graph
  • 11. Genetic Programming Evolutionary algorithm-based methodology using stochastic methods to search for and optimize small computer programs or other computational devices. In order to optimize a computer program, it needs to be evaluated as suboptimal rather than simply right or wrong. Computer programs are represented by trees or lists, that are formed from basic functions or CPU operations GP’s initialization and Tweaking operators are particularly concerned with maintaining closure, that is, producing valid individuals from previous ones The Lisp family of languages is particularly suitable for tree representation of computer programs.
  • 12. Evolutionary operations applied for GP initialization - randomly build trees by selecting from a function set; function define how many children they require. fitness evaluation - run program and see how it do -> data is needed! mutation - rarely used, e.g. pick a random subtree and replace it with a randomly-generated subtree crossover - Using subtree crossover. In each individual, select a random subtree (which can possibly be the root). Then swap those two subtrees
  • 13. Example program: sin(cos( x − sin x ) + x x ) in Lisp: (sin (+ (cos (−x (sin x))) (∗ x (sqrt x)) ) ) graph representation
  • 14. Cartesian Genetic Programming Cartesian Genetic Programming (CGP) represents computational structures as directed acyclic graphs which are represented as a two-dimensional grid of computational nodes which are encoded in the form of a string of integers. When representing graph as a grid some genes become 'non-coding' genes. Integers represents the program primitives and how they are connected together. Program that results from the decoding of a genotype is called a phenotype. Fitness report is the CGP output.
  • 15. CGP encoding and decoding example 001 100 131 201 044 254 2573 0 1 2 3 + Add the data presented to inputs - Subtract the data presented to inputs * Multiply data presented to inputs / Divide data presented to inputs (protected) y2 = x0 + x1 y5 = x0 * x1 y7 = x0 * x1 * ((x0 - x0) - x1) = - x0x12 y3 = 0
  • 16. Analyzing CDS market using CGP Goal: find an algorithm/program/equation that calculate CDS spread Only fundamental operators were selected as a function set: add, subtract, multiplication, division, power, square root. Data divided into training (400 data points) and test (1000 data points) datasets. Experiments were performed for different mutation rates and the number of nodes Fitness is calculated for each datapoint by defining the error rate Error = | CGPoutput - Data|
  • 18. Experiments Results CGP has evolved completely different equation in each run, but some components were repeated frequently: • • x2 / x3 x2 - x3 Where: x2 - buying price of bond x3 - selling price of bond In general created CDS pricing model is much more accurate compared to the standard Duffi approach.
  • 19. Bibliography 1. "Analyzing the Credit Default Swap Market Using Cartesian Genetic Programming", L. Zangeneh, P.J. Bentley, Parallel Problem Solving from Nature, PPSN XI, 2010 2. "Essentials of Metaheuristics, A Set of Undergraduate Lecture Notes", S. Luke, Department of Computer Science, George Mason University, 2012 3. http://en.wikipedia.org/wiki/Credit_default_swap 4. http://www.investopedia.com/video/play/credit-default-swaps/ 5. Book: "Cartesian genetic programming", J. F. Miller, Springer, 2011 6. Tutorial: "Cartesian Genetic Programming", J. F. Miller, S. L. Harding, GECCO, 2012