SlideShare a Scribd company logo
1 of 46
Center for Financial Studies at the Goethe University
PhD Mini-course
Frankfurt, 25 January 2013



Financial Networks

III. Centrality and Systemic
Importance




                                                        Dr. Kimmo Soramäki
                                                        Founder and CEO
                                                        FNA, www.fna.fi
Agenda for today


• Centrality and Network Core
• Developing SinkRank
• Analyzing and visualizing cross-border banking
  exposures




                                                   2
Centrality in Networks
Common centrality metrics
Centrality aims to summarize some notion of importance.
Operationalizing the concept is more challenging.

Degree: number of links

Closeness: distance from/to other
nodes via shortest paths

Betweenness: number of shortest
paths going through the node

Eigenvector: nodes that are linked by
other important nodes are more central,
probability of a random process
Centrality depends on network process
• Trajectory                                      • Transmission
     –   Geodesic paths (shortest paths)             – Parallel duplication
     –   Any path (visit a given node once)          – Serial duplication
     –   Trails (visit a given link once)            – Transfer
     –   Walks (free movement)




 Borgatti (2005). Centrality and network flow .
 Social Networks 27, pp. 55–71.
Path based centrality measures




                                 6
Closeness
• The Farness of a node is
  defined as the sum of its
  distances to all other nodes

• The Closeness of a node is
  defined as the inverse of the
  farness

• Needs a connected graph (or
  component)

• Directed/undirected

• Weighed/un-weighted
                                  7
Betweenness Centrality
• Measures the number of shortest paths going through a vertex or an
  arc
• Algorithm
      – For each pair of vertices (s,t),
        compute the shortest paths
        between them
      – For each pair of vertices (s,t),
        determine the fraction of shortest
        paths that pass through the vertex
        in question
      – Sum this fraction over all pairs of
        vertices (s,t).


• Directed/undirected; Weighed/unweighted
Freeman, Linton (1977). "A set of measures of centrality
based upon betweenness". Sociometry 40: 35–4                           8
Calculating BWC and Closeness
# Load sample network
loada -file pathnetwork-a.txt[delimiter=tab] -preserve false
loadvp -file pathnetwork-v.txt[delimiter=tab]

# Calculate unweighted and undirected Betweenness centrality
bwc -direction undirected

# Calculate unweighted and undirected Closeness centrality
closeness -direction undirected

# Set values for arcs
calcap -e [?random:uniform:1,5:123?] -saveas weight

# Calculate weighed and undirected Betweenness centrality
bwc -direction undirected -p weight -saveas bwc-weighted

# Calculate unweighted and undirected Closeness centrality
closeness -direction undirected -p weight -saveas closeness-weighted

# Visualize
viz -arrows false -vsize bwc

                                                                       9
Cut Edge/Arc
Cut edge or bridge is an edge
whose deletion increases the
number of connected components

Tarjan ('74) provides a linear time
algorithm
Cut Points/Vertices
Cut points are the end vertices of
a cut arc (if their degree is not 1)

# Add network „CutPoint' to database.
addn -n CutPoint -preserve false

# Add vertices and arcs to network.
adda -a v1-v2
adda -a v1-v5
adda -a v2-v3
adda -a v3-v4
adda -a v4-v5
adda -a v3-v6
adda -a v6-v8
adda -a v8-v7
adda -a v6-v7



# Identify cut arc and vertex
cutarc
cutvertex

# Visualize
viz -vcolor cutvertex -vsizedefault 10 -vlabel vertex_id -awidthdefault 2 -arrows false -fontsize 25 -saveas CutPointViz
Walk based centrality measures




                                 12
Sample network
Adjacency matrix

      A   B    C
 A    0   1    2
 B    1   0    0
 C    0   1    0

Transition matrix :
Right stochastic    Left stochastic

      A    B   C          A    B      C   adda -a A-C -preserve false
                                          adda -a C-B
 A    0 1/3 2/3       A    0   1      0   adda -a A-B
                                          adda -a B-A
 B    1    0   0      B 1/3 0         0
                                          setap -p value -value 1
 C    0    1   0      C 2/3 1         0   setap -a A-C -p value -value 2

                                                                           13
Degree
• Local measure
• Can be calculated for all types of networks

• Undirected, outgoing and incoming direction
• Weighted degree = Strength

                                                    A   B   C
                                     degree         3   3   2
                                     out-degree     2   1   1
                                     in-degree      1   2   1
                                     strength       4   3   3
                                     out-strength   3   1   1
                                     in-strength    1   2   2   14
Eigenvector Centrality (EVC)
• Connections are not equal, a connection to a more important node is
  more important
• We make centrality (xi) proportional to the average of the centrality
  (e.g. degree) of i‟s network neighbors:




   where λ is a constant and A the adjacency matrix (Aij =1 if link i-j
   exists, and 0 otherwise)

• Defining a vector of centralities x=(x1, x2, ..., xn), we can rewrite

                                 x=Ax
• We see that x is an eigenvector of the adjacency matrix with
  eigenvalue λ                                                            15
EVC - Properties
• All entries of x are positive for eigenvector associated with the
  largest eigenvalue (Perron–Frobenius theorem). The entry xi gives
  EVC for node i.

• Adjacency matrix A can also contain weights instead of 0-1 links ->
  weighed EVC

• The graph can be directed (asymmetric A) -> directed EVC

• Can contain loops (self-links, Ai=j)

• The graph must be strongly connected!
  Can be calculated only for GSCC.

                                                                        16
Markov chains
•   Markov chains are memoryless random
    processes that undergo transitions from
    one state to another

•   We describe a Markov chain as follows:                   (66.6%)              (100%)
    We have a set of states, S = {s1, s2,.. sn}
                                                                       (33.3%)

•   A process starts in one of these states
    and moves successively from one state
                                                                        (100%)
    to another. Each move is called a step.

•   If the chain is currently in state si, it moves to state sj at the next step with a
    probability denoted by pij

•   The probabilities pij are called transition probabilities and a matrix T
    specifying pij's a transition matrix
                                                                                           17
State probability vector
• Let q(t)=(q1(t),, q2(t) , ... , qn(t)) be the state probability vector whose ith
  component is the probability that the chain is in state i at time t.
• Markov chain is fully defined by q(0) and T

                            q(t)=q(t−1)T=q(0)Tt

• q(t) is also called the distribution of the chain at time t

• Question: at which probabilities do we find a random process at
  states si when t is large?
• An important node would have the process visit it often



                                                                                18
Stationary probability vector
• A stationary probability vector π is defined as a vector that
  does not change under application of the transition matrix

                               π= πT

• For any
   – irreducible (~ strongly connected component)
   – aperiodic (~ process does not visit nodes at determined intervals)
   – positive-recurrent (~ process re-enters each node eventually)
   Markov Chain there exists a unique stationary probability
   vector (Fundamental Theorem of Markov Chains)

                                                                     19
Simple way of Calculating
• The distribution vector after 1 step is the matrix product, q(0)T

• The distribution one step later, obtained by again multiplying by T,
  is given by (q(0)T)T = q(0)T2.

• Similarly, the distribution after t steps can be obtained by
  multiplying q(0) on the right by T t times, or multiplying q(0) by Tt.

• Distribution After t Steps: q(t)=q(0)Tt

• EVC = elements of q(t) for a large t

• Power iteration -method

                                                                           20
Combining iterative and Markov chain
interpretations
• The Perron–Frobenius theorem says that in a stochatic matrix, the
  largest absolute eigenvalue is always 1

• Transition matrix can be right (T) or left (T') stochastic

• As a result we have:

    π=Aπ        (Eigenvector)
   π=πT         (Markov Chain)

    π=T'π       (Largest Eigenvector, i.e. 1, of left stochastic transition
                matrix)



                                                                              21
Most networks are not strongly connected

• EVC can be calculated only for “Giant Strongly Connected
  Component” (GSCC)
• Due to need for irreducible, aperiodic, positive-recurrent Markov
  Chain




• Solution: PageRank and the 'Random Surfer" -model
PageRank
• Solves the problem with a “Damping factor”   which is used to
  modify the transition matrix (S)
   – Gi,j=    i,j

                                                         C
• Effectively allowing the random process
  out of dead-ends (dangling nodes), but       (66.6%)                (100%)
  at the cost of introducing error
                                                         (33.3%)

• Effect of                                    A                          B
   –          Centrality of each node is 1/N                 (100%)

   –          Eigenvector Centrality
   – Commonly            is used
Calculating EVC and PageRank
# Create sample network
adda -a A-C -preserve false
adda -a C-B                                                   A       B       C
adda -a A-B
adda -a B-A                                     EVC          0.375   0.375   0.250
setap -p value -value 1
setap -a A-C -p value -value 2
                                                PageRank     0.368   0.374   0.258
# Calculate weighted and directed EVC
evc -p value -saveas EVC                        PageRank-0   0.375   0.375   0.250
# Calculate PageRank (default alpha=0.15)
# Note: This relates to 0.85 in slides
                                                PageRank-1   0.333   0.333   0.333
pagerank -p value -saveas PageRank
                                                CheiRank     0.397   0.388   0.215
# Calculate PageRank (alpha=0)
pagerank -p value -alpha 0 -saveas PageRank-0   CheiRank-0   0.400   0.400   0.200
# Calculate PageRank (alpha=1)
pagerank -p value -alpha 1 -saveas PageRank-1   CheiRank-1   0.333   0.333   0.333

#Calculate same for CheiRank
cheirank -p value -saveas CheiRank
cheirank -p value -alpha 0 -saveas CheiRank-0
cheirank -p value -alpha 1 -saveas CheiRank-1

# save results in a csv file
savev -file walkcentrality.csv                                                       24
Final notes on PageRank/EVC
• Undirected vs. Directed
   – PageRank generally in-direction
   – out-direction = CheiRank

                                                                Important and
                                                   Important
                                                                   Fragile




                                       CheiRank
• Unweighted vs. Weighted                         Unimportant         Fragile
   – 0/1 or real values in A/T


                                                           PageRank


                                                                                25
Identifying the core




                       26
Maximum Clique
• A graph may contain many complete subgraphs ("cliques"), i.e. sets
  of nodes where each pair of nodes is connected
• The largest of these is called 'Maximum Clique'
• One way of finding the 'core'


# Create random network
random -nv 30 -na 120 -preserve false -seed 123

# Identify maximum undirected clique
# 0 - no clique, 1 - maximum clique, 2... smaller cliques
maxclique -direction any

# Set color property of nodes in clique as red
setvp -p color -value red -e maxclique=1

# Visualize
viz -vcolor color -vsizedefault 8 -arrows false

                                                                   27
Newman Modularity
• Method for detecting modules (also called groups, clusters or
  communities)
• Networks with high modularity have dense connections between the
  nodes within modules but sparse connections between nodes in
  different modules.

   # Create random tree
   tree -nv 30 -preserve false -seed 123

   # Identify communities with Newman's modularity algorithm
   newman

   # Visualize
   viz -vcolor newman -vsizedefault 8 -arrows false



 Newman, M. E. J. (2006). "Modularity and community structure in
 networks". PROCEEDINGS- NATIONAL ACADEMY OF SCIENCES USA 103
 (23): 8577–8696.                                                  28
Craig - von Peter Core
• Interbank markets are tiered in
  a core-periphery structure
• Determines the optimal set of
  core banks that achieves the
  best structural match between
  observed structure and
  perfectly tiered structure

   # Create network with core-periphery structure
   complete -nv 3 -preserve false -directed false
   adda -a 00001-00004
   adda -a 00002-00005
   adda -a 00003-00006

   # Calculate core
   cvpcore

   # Set color property of nodes in clique as red
   setvp -p color -value red -e cvpcore=true         Ben Craig and Goetz von Peter (2010). Interbank tiering
                                                     and money center banks, BIS Working Papers No 322.
   # Visualize
                                                                                                           29
   viz -vcolor color -vsizedefault 8 -arrows false
Developing a centrality metric
    for Payment Systems

                        SinkRank

Discussion Paper, No. 2012-43 | September 3, 2012
http://www.economics-ejournal.org/economics/discussionpapers/2012-43




                                                                       30
Interbank Payment Systems
• Provide the backbone of all
  economic transactions

• Banks settle claims arising from
  customers transfers, own
  securities/FX trades and liquidity
  management

• Target 2 settled 839 trillion in
  2010
Systemic Risk in Payment Systems
• Credit risk has been virtually eliminated by system design (real-time
  gross settlement)

• Liquidity risk remains
    – “Congestion”
    – “Liquidity Dislocation”


• Trigger may be
    – Operational/IT event
    – Liquidity event
    – Solvency event


• Time scale is intraday, spillovers possible
Process in payment systems

Transfer along walks




                             33
Distance to Sink
• Markov chains are well-suited to model transfers along walks
• Absorbing Markov Chains give distances:


                                       From B   1
                                To A
                                       From C   2


   (66.6%)             (100%)          From A
                                To B
                                       From C   1
             (33.3%)

                                       From A
                                To C
                                       From B
              (100%)
SinkRank
                                               SinkRanks on unweighted
•   SinkRank is the average distance           networks
    to a node via (weighted) walks
    from other nodes

•   We need an assumption on the
    distribution of liquidity in the
    network at time of failure

     – Assume uniform ->
       unweighted average

     – Estimate distribution -> PageRank -
       weighted average

     – Use real distribution ->
       Real distribution are used as weights
SinkRank – effect of weights


    Uniform                      PageRank                   “Real”
 (A,B,C: 33.3% )         (A: 37.5% B: 37.5% C:25%)   (A: 5% B: 90% C:5%)




 Note: Node sizes scale with 1/SinkRank
How good is it?
Experiments
• Design issues

   – Real vs. artificial networks?
   – Real vs. simulated failures?
   – How to measure disruption?

• Approach taken

   1.   Create artificial data with close resemblance to the US Fedwire
        system (BA-type, Soramäki et al 2007)
   2.   Simulate failure of a bank: the bank can only receive but not send
        any payments for the whole day
   3.   Measure “Liquidity Dislocation” and “Congestion” by non-failing
        banks
   4.   Correlate 3. (the “Disruption”) with SinkRank of the failing bank
Barabási–Albert (BA) model
• Based on Barabási–Albert (BA) model
• The BA algorithm generates random scale-free networks and is
  based on two forces: growth an preferential attachment:
   – The network begins with an initial network of m0 (>2) nodes.
   – New nodes are added to the network one at a time.
   – Each new node is connected to existing nodes with a probability that is
     proportional to the number of links that the existing nodes already have.


• Instead of links, we generate payments (multiple links between pairs
  of nodes)
• We use lower preferential attachment accumulation than the BA
  model



                                                                                 39
Generated data
Measures

• Congestion: duration of delays in the system aggregated
  over all banks

• Liquidity Dislocation: the average reduction in available
  funds of the other banks due to the failing bank

• Disruption: duration-weighted sum of Congestion and
  Liquidity Dislocation

• -> Carry out counterfactual simulations with generated
  data - failing banks and measuring impact
                                                              41
Distance from Sink vs. Disruption
                              Relationship between
                              Failure Distance and
                              Disruption when the most
                              central bank fails

                              Highest disruption to
                              banks whose liquidity is
                              absorbed first (low
                              Distance to Sink)




           Distance to Sink
SinkRank vs. Disruption
                          Relationship between
                          SinkRank and Disruption



                          Highest disruption by
                          banks who absorb
                          liquidity quickly from the
                          system (low SinkRank)
Implementing SinkRank
Implementation example




                         available at www.fna.fi
Blog, Library and Demos at www.fna.fi




Dr. Kimmo Soramäki
kimmo@soramaki.net
Twitter: soramaki

More Related Content

What's hot

Análisis de Fourier taller de Matlab
Análisis de Fourier   taller  de MatlabAnálisis de Fourier   taller  de Matlab
Análisis de Fourier taller de MatlabJOe Torres Palomino
 
Performance security tradeoff in Robotic Mobile Wireless Ad hoc Networks
Performance security tradeoff in Robotic Mobile Wireless Ad hoc Networks Performance security tradeoff in Robotic Mobile Wireless Ad hoc Networks
Performance security tradeoff in Robotic Mobile Wireless Ad hoc Networks Muhammad Jawad Ikram
 
Meeting w3 chapter 2 part 1
Meeting w3   chapter 2 part 1Meeting w3   chapter 2 part 1
Meeting w3 chapter 2 part 1mkazree
 
lec 2 Robotics time & motion
lec 2 Robotics time & motionlec 2 Robotics time & motion
lec 2 Robotics time & motioncairo university
 
modeling of system electromechanical, Armature Controlled D.C Motor -Reduced ...
modeling of system electromechanical, Armature Controlled D.C Motor -Reduced ...modeling of system electromechanical, Armature Controlled D.C Motor -Reduced ...
modeling of system electromechanical, Armature Controlled D.C Motor -Reduced ...Waqas Afzal
 
Hidden Markov Models with applications to speech recognition
Hidden Markov Models with applications to speech recognitionHidden Markov Models with applications to speech recognition
Hidden Markov Models with applications to speech recognitionbutest
 
Meeting w6 chapter 2 part 3
Meeting w6   chapter 2 part 3Meeting w6   chapter 2 part 3
Meeting w6 chapter 2 part 3mkazree
 
Signals & Systems PPT
Signals & Systems PPTSignals & Systems PPT
Signals & Systems PPTJay Baria
 
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWERUndecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWERmuthukrishnavinayaga
 
220206 transformer interpretability beyond attention visualization
220206 transformer interpretability beyond attention visualization220206 transformer interpretability beyond attention visualization
220206 transformer interpretability beyond attention visualizationtaeseon ryu
 
Transfer function and mathematical modeling
Transfer  function  and  mathematical  modelingTransfer  function  and  mathematical  modeling
Transfer function and mathematical modelingvishalgohel12195
 
Lecture01a correctness
Lecture01a correctnessLecture01a correctness
Lecture01a correctnessSonia Djebali
 
Signals and system unit 1
Signals and system unit 1 Signals and system unit 1
Signals and system unit 1 SOMENDAS27
 
An overview of Hidden Markov Models (HMM)
An overview of Hidden Markov Models (HMM)An overview of Hidden Markov Models (HMM)
An overview of Hidden Markov Models (HMM)ananth
 

What's hot (20)

Análisis de Fourier taller de Matlab
Análisis de Fourier   taller  de MatlabAnálisis de Fourier   taller  de Matlab
Análisis de Fourier taller de Matlab
 
Performance security tradeoff in Robotic Mobile Wireless Ad hoc Networks
Performance security tradeoff in Robotic Mobile Wireless Ad hoc Networks Performance security tradeoff in Robotic Mobile Wireless Ad hoc Networks
Performance security tradeoff in Robotic Mobile Wireless Ad hoc Networks
 
Meeting w3 chapter 2 part 1
Meeting w3   chapter 2 part 1Meeting w3   chapter 2 part 1
Meeting w3 chapter 2 part 1
 
lec 2 Robotics time & motion
lec 2 Robotics time & motionlec 2 Robotics time & motion
lec 2 Robotics time & motion
 
modeling of system electromechanical, Armature Controlled D.C Motor -Reduced ...
modeling of system electromechanical, Armature Controlled D.C Motor -Reduced ...modeling of system electromechanical, Armature Controlled D.C Motor -Reduced ...
modeling of system electromechanical, Armature Controlled D.C Motor -Reduced ...
 
5 2020 04_06!09_40_10_pm
5 2020 04_06!09_40_10_pm5 2020 04_06!09_40_10_pm
5 2020 04_06!09_40_10_pm
 
Implimenting_HJM
Implimenting_HJMImplimenting_HJM
Implimenting_HJM
 
Hmm
HmmHmm
Hmm
 
Hidden Markov Models with applications to speech recognition
Hidden Markov Models with applications to speech recognitionHidden Markov Models with applications to speech recognition
Hidden Markov Models with applications to speech recognition
 
Meeting w6 chapter 2 part 3
Meeting w6   chapter 2 part 3Meeting w6   chapter 2 part 3
Meeting w6 chapter 2 part 3
 
Signals & Systems PPT
Signals & Systems PPTSignals & Systems PPT
Signals & Systems PPT
 
NLP_KASHK:Markov Models
NLP_KASHK:Markov ModelsNLP_KASHK:Markov Models
NLP_KASHK:Markov Models
 
solver (1)
solver (1)solver (1)
solver (1)
 
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWERUndecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
 
220206 transformer interpretability beyond attention visualization
220206 transformer interpretability beyond attention visualization220206 transformer interpretability beyond attention visualization
220206 transformer interpretability beyond attention visualization
 
Transfer function and mathematical modeling
Transfer  function  and  mathematical  modelingTransfer  function  and  mathematical  modeling
Transfer function and mathematical modeling
 
Lecture01a correctness
Lecture01a correctnessLecture01a correctness
Lecture01a correctness
 
Signals and system unit 1
Signals and system unit 1 Signals and system unit 1
Signals and system unit 1
 
An overview of Hidden Markov Models (HMM)
An overview of Hidden Markov Models (HMM)An overview of Hidden Markov Models (HMM)
An overview of Hidden Markov Models (HMM)
 
Chap1see4113
Chap1see4113Chap1see4113
Chap1see4113
 

Similar to Financial Networks III. Centrality and Systemic Importance

machine learning.pptx
machine learning.pptxmachine learning.pptx
machine learning.pptxAbdusSadik
 
nural network ER. Abhishek k. upadhyay
nural network ER. Abhishek  k. upadhyaynural network ER. Abhishek  k. upadhyay
nural network ER. Abhishek k. upadhyayabhishek upadhyay
 
ANALYZE THE STABILITY OF DC SERVO MOTOR USING NYQUIST PLOT
ANALYZE THE STABILITY OF DC SERVO MOTOR USING NYQUIST PLOTANALYZE THE STABILITY OF DC SERVO MOTOR USING NYQUIST PLOT
ANALYZE THE STABILITY OF DC SERVO MOTOR USING NYQUIST PLOTsanjay kumar pediredla
 
7 convolutional codes
7 convolutional codes7 convolutional codes
7 convolutional codesVarun Raj
 
Book chapter-5
Book chapter-5Book chapter-5
Book chapter-5Hung Le
 
Module-5-1_230523_171754 (1).pdf
Module-5-1_230523_171754 (1).pdfModule-5-1_230523_171754 (1).pdf
Module-5-1_230523_171754 (1).pdfvikasmittal92
 
Effect of global market on indian market
Effect of global market on indian marketEffect of global market on indian market
Effect of global market on indian marketArpit Jain
 
Chapter No 7 Other Important Neural Networks Models
Chapter No 7 Other Important Neural Networks ModelsChapter No 7 Other Important Neural Networks Models
Chapter No 7 Other Important Neural Networks ModelsRamkrishnaPatil17
 
Paper study: Learning to solve circuit sat
Paper study: Learning to solve circuit satPaper study: Learning to solve circuit sat
Paper study: Learning to solve circuit satChenYiHuang5
 
Chip Package Co-simulation
Chip Package Co-simulationChip Package Co-simulation
Chip Package Co-simulationMing-Chi Chen
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentationasodariyabhavesh
 
Circuit Network Analysis - [Chapter5] Transfer function, frequency response, ...
Circuit Network Analysis - [Chapter5] Transfer function, frequency response, ...Circuit Network Analysis - [Chapter5] Transfer function, frequency response, ...
Circuit Network Analysis - [Chapter5] Transfer function, frequency response, ...Simen Li
 
image segmentation image segmentation.pptx
image segmentation image segmentation.pptximage segmentation image segmentation.pptx
image segmentation image segmentation.pptxNaveenKumar5162
 

Similar to Financial Networks III. Centrality and Systemic Importance (20)

machine learning.pptx
machine learning.pptxmachine learning.pptx
machine learning.pptx
 
nural network ER. Abhishek k. upadhyay
nural network ER. Abhishek  k. upadhyaynural network ER. Abhishek  k. upadhyay
nural network ER. Abhishek k. upadhyay
 
randomwalk.ppt
randomwalk.pptrandomwalk.ppt
randomwalk.ppt
 
ANALYZE THE STABILITY OF DC SERVO MOTOR USING NYQUIST PLOT
ANALYZE THE STABILITY OF DC SERVO MOTOR USING NYQUIST PLOTANALYZE THE STABILITY OF DC SERVO MOTOR USING NYQUIST PLOT
ANALYZE THE STABILITY OF DC SERVO MOTOR USING NYQUIST PLOT
 
Av 738- Adaptive Filtering - Background Material
Av 738- Adaptive Filtering - Background MaterialAv 738- Adaptive Filtering - Background Material
Av 738- Adaptive Filtering - Background Material
 
7 convolutional codes
7 convolutional codes7 convolutional codes
7 convolutional codes
 
Book chapter-5
Book chapter-5Book chapter-5
Book chapter-5
 
test generation
test generationtest generation
test generation
 
Module-5-1_230523_171754 (1).pdf
Module-5-1_230523_171754 (1).pdfModule-5-1_230523_171754 (1).pdf
Module-5-1_230523_171754 (1).pdf
 
Effect of global market on indian market
Effect of global market on indian marketEffect of global market on indian market
Effect of global market on indian market
 
Chapter No 7 Other Important Neural Networks Models
Chapter No 7 Other Important Neural Networks ModelsChapter No 7 Other Important Neural Networks Models
Chapter No 7 Other Important Neural Networks Models
 
Quantum computing
Quantum computingQuantum computing
Quantum computing
 
Paper study: Learning to solve circuit sat
Paper study: Learning to solve circuit satPaper study: Learning to solve circuit sat
Paper study: Learning to solve circuit sat
 
Chip Package Co-simulation
Chip Package Co-simulationChip Package Co-simulation
Chip Package Co-simulation
 
Chap8 slides
Chap8 slidesChap8 slides
Chap8 slides
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentation
 
Circuit Network Analysis - [Chapter5] Transfer function, frequency response, ...
Circuit Network Analysis - [Chapter5] Transfer function, frequency response, ...Circuit Network Analysis - [Chapter5] Transfer function, frequency response, ...
Circuit Network Analysis - [Chapter5] Transfer function, frequency response, ...
 
image segmentation image segmentation.pptx
image segmentation image segmentation.pptximage segmentation image segmentation.pptx
image segmentation image segmentation.pptx
 
1st course
1st course1st course
1st course
 
NN-Ch7.PDF
NN-Ch7.PDFNN-Ch7.PDF
NN-Ch7.PDF
 

More from Kimmo Soramaki

Applications of Network Theory in Finance
Applications of Network Theory in FinanceApplications of Network Theory in Finance
Applications of Network Theory in FinanceKimmo Soramaki
 
Applications of Network Theory in Finance and Production
Applications of Network Theory in Finance and ProductionApplications of Network Theory in Finance and Production
Applications of Network Theory in Finance and ProductionKimmo Soramaki
 
Global Network of Payment Flows - Presentation at Commerzbank Cash Forum
Global Network of Payment Flows - Presentation at Commerzbank Cash ForumGlobal Network of Payment Flows - Presentation at Commerzbank Cash Forum
Global Network of Payment Flows - Presentation at Commerzbank Cash ForumKimmo Soramaki
 
Visualizing Financial Stress - Talk at European Central Bank
Visualizing Financial Stress - Talk at European Central BankVisualizing Financial Stress - Talk at European Central Bank
Visualizing Financial Stress - Talk at European Central BankKimmo Soramaki
 
Financial Cartography at Bogazici University
Financial Cartography at Bogazici UniversityFinancial Cartography at Bogazici University
Financial Cartography at Bogazici UniversityKimmo Soramaki
 
Network Simulations for Business Continuity
Network Simulations for Business ContinuityNetwork Simulations for Business Continuity
Network Simulations for Business ContinuityKimmo Soramaki
 
Financial Cartography for Payments and Markets
Financial Cartography for Payments and MarketsFinancial Cartography for Payments and Markets
Financial Cartography for Payments and MarketsKimmo Soramaki
 
Quantitative Oversight of Financial Market Infrastructures
Quantitative Oversight of Financial Market InfrastructuresQuantitative Oversight of Financial Market Infrastructures
Quantitative Oversight of Financial Market InfrastructuresKimmo Soramaki
 
Emerging Stress Scenarios
Emerging Stress ScenariosEmerging Stress Scenarios
Emerging Stress ScenariosKimmo Soramaki
 
Network Approaches for Interbank Markets
Network Approaches for Interbank MarketsNetwork Approaches for Interbank Markets
Network Approaches for Interbank MarketsKimmo Soramaki
 
System shock analysis and complex network effects
System shock analysis and complex network effectsSystem shock analysis and complex network effects
System shock analysis and complex network effectsKimmo Soramaki
 
Adaptive Stress Testing
Adaptive Stress TestingAdaptive Stress Testing
Adaptive Stress TestingKimmo Soramaki
 
Illuminating Interconnectedness and Contagion
Illuminating Interconnectedness and ContagionIlluminating Interconnectedness and Contagion
Illuminating Interconnectedness and ContagionKimmo Soramaki
 
Financial Networks and Cartography
Financial Networks and CartographyFinancial Networks and Cartography
Financial Networks and CartographyKimmo Soramaki
 
Financial Networks VI - Correlation Networks
Financial Networks VI - Correlation NetworksFinancial Networks VI - Correlation Networks
Financial Networks VI - Correlation NetworksKimmo Soramaki
 
Financial Networks V - Inferring Links
Financial Networks V - Inferring LinksFinancial Networks V - Inferring Links
Financial Networks V - Inferring LinksKimmo Soramaki
 
Financial Cartography - PRMIA Webinar
Financial Cartography - PRMIA WebinarFinancial Cartography - PRMIA Webinar
Financial Cartography - PRMIA WebinarKimmo Soramaki
 
Financial Networks IV. Analyzing and Visualizing Exposures
Financial Networks IV. Analyzing and Visualizing ExposuresFinancial Networks IV. Analyzing and Visualizing Exposures
Financial Networks IV. Analyzing and Visualizing ExposuresKimmo Soramaki
 
Financial Cartography - Center for Financial Research
Financial Cartography - Center for Financial ResearchFinancial Cartography - Center for Financial Research
Financial Cartography - Center for Financial ResearchKimmo Soramaki
 

More from Kimmo Soramaki (20)

Applications of Network Theory in Finance
Applications of Network Theory in FinanceApplications of Network Theory in Finance
Applications of Network Theory in Finance
 
Applications of Network Theory in Finance and Production
Applications of Network Theory in Finance and ProductionApplications of Network Theory in Finance and Production
Applications of Network Theory in Finance and Production
 
Global Network of Payment Flows - Presentation at Commerzbank Cash Forum
Global Network of Payment Flows - Presentation at Commerzbank Cash ForumGlobal Network of Payment Flows - Presentation at Commerzbank Cash Forum
Global Network of Payment Flows - Presentation at Commerzbank Cash Forum
 
Visualizing Financial Stress - Talk at European Central Bank
Visualizing Financial Stress - Talk at European Central BankVisualizing Financial Stress - Talk at European Central Bank
Visualizing Financial Stress - Talk at European Central Bank
 
Financial Cartography
Financial CartographyFinancial Cartography
Financial Cartography
 
Financial Cartography at Bogazici University
Financial Cartography at Bogazici UniversityFinancial Cartography at Bogazici University
Financial Cartography at Bogazici University
 
Network Simulations for Business Continuity
Network Simulations for Business ContinuityNetwork Simulations for Business Continuity
Network Simulations for Business Continuity
 
Financial Cartography for Payments and Markets
Financial Cartography for Payments and MarketsFinancial Cartography for Payments and Markets
Financial Cartography for Payments and Markets
 
Quantitative Oversight of Financial Market Infrastructures
Quantitative Oversight of Financial Market InfrastructuresQuantitative Oversight of Financial Market Infrastructures
Quantitative Oversight of Financial Market Infrastructures
 
Emerging Stress Scenarios
Emerging Stress ScenariosEmerging Stress Scenarios
Emerging Stress Scenarios
 
Network Approaches for Interbank Markets
Network Approaches for Interbank MarketsNetwork Approaches for Interbank Markets
Network Approaches for Interbank Markets
 
System shock analysis and complex network effects
System shock analysis and complex network effectsSystem shock analysis and complex network effects
System shock analysis and complex network effects
 
Adaptive Stress Testing
Adaptive Stress TestingAdaptive Stress Testing
Adaptive Stress Testing
 
Illuminating Interconnectedness and Contagion
Illuminating Interconnectedness and ContagionIlluminating Interconnectedness and Contagion
Illuminating Interconnectedness and Contagion
 
Financial Networks and Cartography
Financial Networks and CartographyFinancial Networks and Cartography
Financial Networks and Cartography
 
Financial Networks VI - Correlation Networks
Financial Networks VI - Correlation NetworksFinancial Networks VI - Correlation Networks
Financial Networks VI - Correlation Networks
 
Financial Networks V - Inferring Links
Financial Networks V - Inferring LinksFinancial Networks V - Inferring Links
Financial Networks V - Inferring Links
 
Financial Cartography - PRMIA Webinar
Financial Cartography - PRMIA WebinarFinancial Cartography - PRMIA Webinar
Financial Cartography - PRMIA Webinar
 
Financial Networks IV. Analyzing and Visualizing Exposures
Financial Networks IV. Analyzing and Visualizing ExposuresFinancial Networks IV. Analyzing and Visualizing Exposures
Financial Networks IV. Analyzing and Visualizing Exposures
 
Financial Cartography - Center for Financial Research
Financial Cartography - Center for Financial ResearchFinancial Cartography - Center for Financial Research
Financial Cartography - Center for Financial Research
 

Financial Networks III. Centrality and Systemic Importance

  • 1. Center for Financial Studies at the Goethe University PhD Mini-course Frankfurt, 25 January 2013 Financial Networks III. Centrality and Systemic Importance Dr. Kimmo Soramäki Founder and CEO FNA, www.fna.fi
  • 2. Agenda for today • Centrality and Network Core • Developing SinkRank • Analyzing and visualizing cross-border banking exposures 2
  • 4. Common centrality metrics Centrality aims to summarize some notion of importance. Operationalizing the concept is more challenging. Degree: number of links Closeness: distance from/to other nodes via shortest paths Betweenness: number of shortest paths going through the node Eigenvector: nodes that are linked by other important nodes are more central, probability of a random process
  • 5. Centrality depends on network process • Trajectory • Transmission – Geodesic paths (shortest paths) – Parallel duplication – Any path (visit a given node once) – Serial duplication – Trails (visit a given link once) – Transfer – Walks (free movement) Borgatti (2005). Centrality and network flow . Social Networks 27, pp. 55–71.
  • 7. Closeness • The Farness of a node is defined as the sum of its distances to all other nodes • The Closeness of a node is defined as the inverse of the farness • Needs a connected graph (or component) • Directed/undirected • Weighed/un-weighted 7
  • 8. Betweenness Centrality • Measures the number of shortest paths going through a vertex or an arc • Algorithm – For each pair of vertices (s,t), compute the shortest paths between them – For each pair of vertices (s,t), determine the fraction of shortest paths that pass through the vertex in question – Sum this fraction over all pairs of vertices (s,t). • Directed/undirected; Weighed/unweighted Freeman, Linton (1977). "A set of measures of centrality based upon betweenness". Sociometry 40: 35–4 8
  • 9. Calculating BWC and Closeness # Load sample network loada -file pathnetwork-a.txt[delimiter=tab] -preserve false loadvp -file pathnetwork-v.txt[delimiter=tab] # Calculate unweighted and undirected Betweenness centrality bwc -direction undirected # Calculate unweighted and undirected Closeness centrality closeness -direction undirected # Set values for arcs calcap -e [?random:uniform:1,5:123?] -saveas weight # Calculate weighed and undirected Betweenness centrality bwc -direction undirected -p weight -saveas bwc-weighted # Calculate unweighted and undirected Closeness centrality closeness -direction undirected -p weight -saveas closeness-weighted # Visualize viz -arrows false -vsize bwc 9
  • 10. Cut Edge/Arc Cut edge or bridge is an edge whose deletion increases the number of connected components Tarjan ('74) provides a linear time algorithm
  • 11. Cut Points/Vertices Cut points are the end vertices of a cut arc (if their degree is not 1) # Add network „CutPoint' to database. addn -n CutPoint -preserve false # Add vertices and arcs to network. adda -a v1-v2 adda -a v1-v5 adda -a v2-v3 adda -a v3-v4 adda -a v4-v5 adda -a v3-v6 adda -a v6-v8 adda -a v8-v7 adda -a v6-v7 # Identify cut arc and vertex cutarc cutvertex # Visualize viz -vcolor cutvertex -vsizedefault 10 -vlabel vertex_id -awidthdefault 2 -arrows false -fontsize 25 -saveas CutPointViz
  • 12. Walk based centrality measures 12
  • 13. Sample network Adjacency matrix A B C A 0 1 2 B 1 0 0 C 0 1 0 Transition matrix : Right stochastic Left stochastic A B C A B C adda -a A-C -preserve false adda -a C-B A 0 1/3 2/3 A 0 1 0 adda -a A-B adda -a B-A B 1 0 0 B 1/3 0 0 setap -p value -value 1 C 0 1 0 C 2/3 1 0 setap -a A-C -p value -value 2 13
  • 14. Degree • Local measure • Can be calculated for all types of networks • Undirected, outgoing and incoming direction • Weighted degree = Strength A B C degree 3 3 2 out-degree 2 1 1 in-degree 1 2 1 strength 4 3 3 out-strength 3 1 1 in-strength 1 2 2 14
  • 15. Eigenvector Centrality (EVC) • Connections are not equal, a connection to a more important node is more important • We make centrality (xi) proportional to the average of the centrality (e.g. degree) of i‟s network neighbors: where λ is a constant and A the adjacency matrix (Aij =1 if link i-j exists, and 0 otherwise) • Defining a vector of centralities x=(x1, x2, ..., xn), we can rewrite x=Ax • We see that x is an eigenvector of the adjacency matrix with eigenvalue λ 15
  • 16. EVC - Properties • All entries of x are positive for eigenvector associated with the largest eigenvalue (Perron–Frobenius theorem). The entry xi gives EVC for node i. • Adjacency matrix A can also contain weights instead of 0-1 links -> weighed EVC • The graph can be directed (asymmetric A) -> directed EVC • Can contain loops (self-links, Ai=j) • The graph must be strongly connected! Can be calculated only for GSCC. 16
  • 17. Markov chains • Markov chains are memoryless random processes that undergo transitions from one state to another • We describe a Markov chain as follows: (66.6%) (100%) We have a set of states, S = {s1, s2,.. sn} (33.3%) • A process starts in one of these states and moves successively from one state (100%) to another. Each move is called a step. • If the chain is currently in state si, it moves to state sj at the next step with a probability denoted by pij • The probabilities pij are called transition probabilities and a matrix T specifying pij's a transition matrix 17
  • 18. State probability vector • Let q(t)=(q1(t),, q2(t) , ... , qn(t)) be the state probability vector whose ith component is the probability that the chain is in state i at time t. • Markov chain is fully defined by q(0) and T q(t)=q(t−1)T=q(0)Tt • q(t) is also called the distribution of the chain at time t • Question: at which probabilities do we find a random process at states si when t is large? • An important node would have the process visit it often 18
  • 19. Stationary probability vector • A stationary probability vector π is defined as a vector that does not change under application of the transition matrix π= πT • For any – irreducible (~ strongly connected component) – aperiodic (~ process does not visit nodes at determined intervals) – positive-recurrent (~ process re-enters each node eventually) Markov Chain there exists a unique stationary probability vector (Fundamental Theorem of Markov Chains) 19
  • 20. Simple way of Calculating • The distribution vector after 1 step is the matrix product, q(0)T • The distribution one step later, obtained by again multiplying by T, is given by (q(0)T)T = q(0)T2. • Similarly, the distribution after t steps can be obtained by multiplying q(0) on the right by T t times, or multiplying q(0) by Tt. • Distribution After t Steps: q(t)=q(0)Tt • EVC = elements of q(t) for a large t • Power iteration -method 20
  • 21. Combining iterative and Markov chain interpretations • The Perron–Frobenius theorem says that in a stochatic matrix, the largest absolute eigenvalue is always 1 • Transition matrix can be right (T) or left (T') stochastic • As a result we have: π=Aπ (Eigenvector) π=πT (Markov Chain) π=T'π (Largest Eigenvector, i.e. 1, of left stochastic transition matrix) 21
  • 22. Most networks are not strongly connected • EVC can be calculated only for “Giant Strongly Connected Component” (GSCC) • Due to need for irreducible, aperiodic, positive-recurrent Markov Chain • Solution: PageRank and the 'Random Surfer" -model
  • 23. PageRank • Solves the problem with a “Damping factor” which is used to modify the transition matrix (S) – Gi,j= i,j C • Effectively allowing the random process out of dead-ends (dangling nodes), but (66.6%) (100%) at the cost of introducing error (33.3%) • Effect of A B – Centrality of each node is 1/N (100%) – Eigenvector Centrality – Commonly is used
  • 24. Calculating EVC and PageRank # Create sample network adda -a A-C -preserve false adda -a C-B A B C adda -a A-B adda -a B-A EVC 0.375 0.375 0.250 setap -p value -value 1 setap -a A-C -p value -value 2 PageRank 0.368 0.374 0.258 # Calculate weighted and directed EVC evc -p value -saveas EVC PageRank-0 0.375 0.375 0.250 # Calculate PageRank (default alpha=0.15) # Note: This relates to 0.85 in slides PageRank-1 0.333 0.333 0.333 pagerank -p value -saveas PageRank CheiRank 0.397 0.388 0.215 # Calculate PageRank (alpha=0) pagerank -p value -alpha 0 -saveas PageRank-0 CheiRank-0 0.400 0.400 0.200 # Calculate PageRank (alpha=1) pagerank -p value -alpha 1 -saveas PageRank-1 CheiRank-1 0.333 0.333 0.333 #Calculate same for CheiRank cheirank -p value -saveas CheiRank cheirank -p value -alpha 0 -saveas CheiRank-0 cheirank -p value -alpha 1 -saveas CheiRank-1 # save results in a csv file savev -file walkcentrality.csv 24
  • 25. Final notes on PageRank/EVC • Undirected vs. Directed – PageRank generally in-direction – out-direction = CheiRank Important and Important Fragile CheiRank • Unweighted vs. Weighted Unimportant Fragile – 0/1 or real values in A/T PageRank 25
  • 27. Maximum Clique • A graph may contain many complete subgraphs ("cliques"), i.e. sets of nodes where each pair of nodes is connected • The largest of these is called 'Maximum Clique' • One way of finding the 'core' # Create random network random -nv 30 -na 120 -preserve false -seed 123 # Identify maximum undirected clique # 0 - no clique, 1 - maximum clique, 2... smaller cliques maxclique -direction any # Set color property of nodes in clique as red setvp -p color -value red -e maxclique=1 # Visualize viz -vcolor color -vsizedefault 8 -arrows false 27
  • 28. Newman Modularity • Method for detecting modules (also called groups, clusters or communities) • Networks with high modularity have dense connections between the nodes within modules but sparse connections between nodes in different modules. # Create random tree tree -nv 30 -preserve false -seed 123 # Identify communities with Newman's modularity algorithm newman # Visualize viz -vcolor newman -vsizedefault 8 -arrows false Newman, M. E. J. (2006). "Modularity and community structure in networks". PROCEEDINGS- NATIONAL ACADEMY OF SCIENCES USA 103 (23): 8577–8696. 28
  • 29. Craig - von Peter Core • Interbank markets are tiered in a core-periphery structure • Determines the optimal set of core banks that achieves the best structural match between observed structure and perfectly tiered structure # Create network with core-periphery structure complete -nv 3 -preserve false -directed false adda -a 00001-00004 adda -a 00002-00005 adda -a 00003-00006 # Calculate core cvpcore # Set color property of nodes in clique as red setvp -p color -value red -e cvpcore=true Ben Craig and Goetz von Peter (2010). Interbank tiering and money center banks, BIS Working Papers No 322. # Visualize 29 viz -vcolor color -vsizedefault 8 -arrows false
  • 30. Developing a centrality metric for Payment Systems SinkRank Discussion Paper, No. 2012-43 | September 3, 2012 http://www.economics-ejournal.org/economics/discussionpapers/2012-43 30
  • 31. Interbank Payment Systems • Provide the backbone of all economic transactions • Banks settle claims arising from customers transfers, own securities/FX trades and liquidity management • Target 2 settled 839 trillion in 2010
  • 32. Systemic Risk in Payment Systems • Credit risk has been virtually eliminated by system design (real-time gross settlement) • Liquidity risk remains – “Congestion” – “Liquidity Dislocation” • Trigger may be – Operational/IT event – Liquidity event – Solvency event • Time scale is intraday, spillovers possible
  • 33. Process in payment systems Transfer along walks 33
  • 34. Distance to Sink • Markov chains are well-suited to model transfers along walks • Absorbing Markov Chains give distances: From B 1 To A From C 2 (66.6%) (100%) From A To B From C 1 (33.3%) From A To C From B (100%)
  • 35. SinkRank SinkRanks on unweighted • SinkRank is the average distance networks to a node via (weighted) walks from other nodes • We need an assumption on the distribution of liquidity in the network at time of failure – Assume uniform -> unweighted average – Estimate distribution -> PageRank - weighted average – Use real distribution -> Real distribution are used as weights
  • 36. SinkRank – effect of weights Uniform PageRank “Real” (A,B,C: 33.3% ) (A: 37.5% B: 37.5% C:25%) (A: 5% B: 90% C:5%) Note: Node sizes scale with 1/SinkRank
  • 37. How good is it?
  • 38. Experiments • Design issues – Real vs. artificial networks? – Real vs. simulated failures? – How to measure disruption? • Approach taken 1. Create artificial data with close resemblance to the US Fedwire system (BA-type, Soramäki et al 2007) 2. Simulate failure of a bank: the bank can only receive but not send any payments for the whole day 3. Measure “Liquidity Dislocation” and “Congestion” by non-failing banks 4. Correlate 3. (the “Disruption”) with SinkRank of the failing bank
  • 39. Barabási–Albert (BA) model • Based on Barabási–Albert (BA) model • The BA algorithm generates random scale-free networks and is based on two forces: growth an preferential attachment: – The network begins with an initial network of m0 (>2) nodes. – New nodes are added to the network one at a time. – Each new node is connected to existing nodes with a probability that is proportional to the number of links that the existing nodes already have. • Instead of links, we generate payments (multiple links between pairs of nodes) • We use lower preferential attachment accumulation than the BA model 39
  • 41. Measures • Congestion: duration of delays in the system aggregated over all banks • Liquidity Dislocation: the average reduction in available funds of the other banks due to the failing bank • Disruption: duration-weighted sum of Congestion and Liquidity Dislocation • -> Carry out counterfactual simulations with generated data - failing banks and measuring impact 41
  • 42. Distance from Sink vs. Disruption Relationship between Failure Distance and Disruption when the most central bank fails Highest disruption to banks whose liquidity is absorbed first (low Distance to Sink) Distance to Sink
  • 43. SinkRank vs. Disruption Relationship between SinkRank and Disruption Highest disruption by banks who absorb liquidity quickly from the system (low SinkRank)
  • 45. Implementation example available at www.fna.fi
  • 46. Blog, Library and Demos at www.fna.fi Dr. Kimmo Soramäki kimmo@soramaki.net Twitter: soramaki