Earn Higher Grades With Instant Assignment Help.Ask Question!

Computer Network
(5/5)

Contagion and computational modelling in financial networks.how the financial network should build is in the working paper1.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Contagion and computational modelling in financial networks

 

YOU CAN CHOOSE ANY PROGRAMMING LANGUAGE TO SOLVE THE CASE.

 

First part:

 

 

The step how the financial network should build is in the working paper1.

Generate ER (erdos renyi)network

N=number of node  (banks)

P= connection probability

 

The links between the nodes are the weights.

 

The weights are calculated by this rule:

 

 

  Also these two values A(IB)= 0.2 and A(M)=0.8 are not changing.

 
 

It has been explained in the attached the working paper (working paper 1) that you have to follow very carefully in this part!

 

The start is to generate and simulate network with small size first a for example with 6 nodes then if it is working try the simulation with 100-200 nodes.

 

The solution for the first part is ended if you got this graph:

 

 
 

 

An example for Simulation:

 

Choose a node randomly to be failed

How many banks failed after the initial bank fail

N= at least 100     bank number 2 fail  10 bank more failed  contagion happened

 

We are doing this simulation 200 times  150 cases contagion happened  frequency 150/200  average over contagion cases.

 

After you got the perfect exactly the same shaped graph for this part you can start to do the second part.

 

Second part:

Stochastic block model simulation (do the same things as in the first part with the same data, but in this case the average degree is fix but the µ is different.)

 

I attached a working paper2 for this part that you should follow.

To explain the a stochastic block model (SBM) is an extended version of Erdos-Renyi (ER) network (i.e. ER network with communities).

While ER network is characterized by the connection probability p, the SBM is characterized by p and mu together.

The parameter p determines the average degree (i.e. number of link in the SBM), whereas μ determines how separated two communities are.

 

Please try, for example, μ=0.5, 0.1, 0.01 and compare the results with the case of ER network.

When mu=0.5, the result should be same as the result of ER network.

 

 

The most important part from working paper 2:

 

 
 
 
 
 

Mu (µ)  is a quantity showing how many links are outside of communities (i.e. not within communities) and called 'mixing parameter' because it shows how mixed (not separated) communities are mixed.

mu is defined as: mu = (number of inter-community links)/(number of all links)

 
 

Let us consider a network with two communities.

If mu=0, there is no link between these communities. All links are located within communities (i.e. all links are intra-community links: nodes in the same communities are connected to each other)

If mu=0.5, the number of intra-community links and the number of inter-community links are same (i.e. communities has no meaning).

 

We use this mu to generate a stochastic block model (SBM), a random model for networks with communities.

In fact, SBM is a kind of extended version of Erdos-Reyni (ER) model. 

While ER model requires N and p as input parameters, SBM requires N, pintra, and pinter as input parameters. (pintra is connection probability among intra-community nodes and pinter is connection probability among inter-community nodes).

 

For an SBM having N nodes, the average outdegree z, and the mixing parameter mu, we can get (I skip the detail but you can derive the following probabilities if you try): 

pintra = 2*(1-mu)*z/(N-1)

pinter = 2*mu*z/N

 

As an example, let us consider a SBM with two communities (Nodes 1,2, .., 50 belong to community A and nodes 51, 52, ..., 100 belong to community B). 

The parameters for the SBM are given as N=100, z=4, mu=0.1.

 

Then, the expected number of links in the network M=N*z = 400 (Note that we are dealing with directed network).

Since mu=0.1, the expected number of intra-community links = (1-mu)*M = 360 and the expected number of inter-community links = mu*M = 40.

 

A brief algorithm to generate this SBM is given as below:

 

Node pair

(1, 2) -> Both nodes 1 and 2 are in the same community (i.e. intra). Thus we make a directed link from node 1 to node 2 with probability pintra=2*(1-0.1)*4/99

(1, 3) -> Both nodes 1 and 3 are in the same community (i.e. intra). Thus we make a directed link from node 1 to node 3 with probability pintra=2*(1-0.1)*4/99

...

(1, 50) -> Both nodes 1 and 50 are in the same community (i.e. intra). Thus we make a directed link from node 1 to node 50 with probability pintra=2*(1-0.1)*4/99

(1, 51) -> Node 1 and 51 are not in the same community (i.e. inter). Thus we make a directed link from node 1 to node 51 with probability pinter=2*0.1*4/100

(1, 52) -> Node 1 and 52 are not in the same community (i.e. inter). Thus we make a directed link from node 1 to node 52 with probability pinter=2*0.1*4/100

...

(1, 100) -> Node 1 and 100 are not in the same community (i.e. inter). Thus we make a directed link from node 1 to node 100 with probability pinter=2*0.1*4/100 

(2, 1) -> Both nodes 2 and 1 are in the same community (i.e. intra). Thus we make a directed link from node 2 to node 1 with probability pintra=2*(1-0.1)*4/99

(2, 3) -> Both nodes 2 and 3 are in the same community (i.e. intra). Thus we make a directed link from node 2 to node 3 with probability pintra=2*(1-0.1)*4/99

...

(99, 100) -> Both nodes 99 and 100 are in the same community (i.e. intra). Thus we make a directed link from node 99 to node 100 with probability pintra=2*(1-0.1)*4/99 

 
 
 

The goal is to compare the extent and the frequency of contagion in an SBM with low mu (i.e. strong community) with the extent and the frequency of contagion in an SBM with high mu (i.e. weak community).

Thus we can tell which network is more resistant.

 
 
 

I am also asking for AT LEAST 5000 word explanations but it can be more if its required about the solution, so to explain step by step what results you got and how did you do that. The essay should be fully understandable without grammar mistakes. Also the explanation should be clear step by step explanation and related to the question so the stochastic block model and erdos renyi (ER) model comparison (first and second part) IN THE FINANCIAL NETWORK AND WORLD. I also ask to show clearly the results for the question like what is happening for example in the first part if 1 random bank fails and also in the second part if the µ is changing. The results and graphs should be included with explanations. It should have a summary as well.

 

The raw code should have been sent in script!

 

If you have any question do not hesitate to ask me! Thank you for your help.

 

Attachments:
(5/5)

Related Questions

CSI 1420 Introduction to C Programming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two majorconstructs of the C programming language – Fu

The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Ask This Assignment To Be Done By Our ExpertsGet A+ Grade Solution Guaranteed

expert
joyComputer science
(4/5)
12 Answers Hire Me
expert
Robert DLaw
(4.8/5)
910 Answers Hire Me
expert
Dr Samuel BarberaStatistics
(5/5)
628 Answers Hire Me
expert
Tutor For YouEconomics
(5/5)
519 Answers Hire Me