-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDriver_ring.R
More file actions
72 lines (56 loc) · 1.59 KB
/
Driver_ring.R
File metadata and controls
72 lines (56 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#################################
# Author: Bulent Ozel
# e-mail: bulent.ozel@gmail.com
# Collaborators:
# Mario Eboli
# Andrea Teglio
# Andrea Toto
#################################
#### System Specific Configurations :::::
# Set working directory:
WORKING_DIR = "/Users/toto/Documents/R/Sim_FinNet_BW/"
setwd(WORKING_DIR)
rm(list = ls())
# Load the model library:
LIBRARY = "/Users/toto/Documents/R/Sim_FinNet_BW/scripts/ModelLibrary.R"
source(LIBRARY)
# Load the experiment library:
SIMULATOR = "/Users/toto/Documents/R/Sim_FinNet_BW/scripts/Simulator.R"
source(SIMULATOR)
# Set reporting options:
DATA_MODE = 1
# Only .csv files of the summary results are produced.
SCAN = TRUE
# FALSE means it reports T1 and Tfin
# TRUE means it produces T1,T2,.... Tfin.
# A whole simulation setup:
# Configure output locations:
TABLES_DIR = "/Users/toto/Documents/R/Sim_FinNet_BW/tables/"
# This configuration can be used to produce
# additional outputs (Balance Sheets) for inspection.
INSPECT_MODE = 0
PLOTS_DIR = TABLES_DIR
#### Running a Plan B centralization experiment on the ring
# Note that shock type is "banks" where all external assets of bank are hit
# incrementallt until moving to the next bank in the permutation.
N = 64
Total.External.Assets = 100
amplitude = Total.External.Assets / (2 * N)
connectivity.and.centralization(
N,
KMin = 1,
KMax = 1,
rCentMin = 63,
rCentMax = 63,
eps = 0.1,
phi = 0.4,
A0 = Total.External.Assets,
E0 = 10,
b.sheet.equity = "hetero",
d.min = 1,
nRuns = 1000,
shock.type = "banks",
unit.shock = amplitude,
r.shock = 1.0,
n.sources = N
)