# Systemic Risk and Bank Networks: A Use of Knowledge Graph with ChatGPT

^{1}

^{2}

^{3}

^{4}

^{*}

## Abstract

**:**

## 1. Introduction and Related Work

#### 1.1. Systemic Risk and Banks’ Networks

#### 1.2. Related Work to Banks’ Networks

#### 1.3. Related Work to NLP and LLMs

## 2. Knowledge Graphs

#### 2.1. Directed and Undirected Graphs

- where arrows demonstrate dependencies. For example, node #1 depends upon nodes #3 and #0, but it is depended upon by nodes #2 and #4.

#### 2.2. Banks’ Networks

## 3. Textual Analysis

#### 3.1. Natural Language Processing

#### 3.1.1. word2vec

- Distributed Memory (DM)
- Distributed Bag of Words (DBOWs)

#### 3.1.2. spaCy

#### 3.2. Large Language Models

#### 3.3. Embedding

- the endpoints of the arc associated with an edge, $e$, are the points associated with the end vertices of $e$,
- no arcs include points associated with other vertices, and
- two arcs never intersect at a point which is interior to either of the arcs.

#### 3.3.1. Knowledge Graph Embedding

#### 3.3.2. Text Embedding

## 4. Empirical Results

#### 4.1. Data

#### 4.2. Natural Language Processing

#### 4.3. Embedding

^{−7}, so 10

^{6}tokens = USD 0.1, and 10

^{9}tokens = USD 100, which is probably still a small-scale service. This is an acceptable price range for the research project (OpenAI charge in terms of tokens, 1 token = 4.63 Chars, with std= 0.48).

#### 4.4. Preliminary Investigation

#### 4.5. Knowledge Graph

#### 4.6. Comments

## 5. Exploring a Large Language Model—ChatGPT4

#### 5.1. Article Understanding and Summarization

#### 5.2. Semantic Graph

## 6. Conclusions, Limitations, and Future Research

## Author Contributions

## Funding

## Conflicts of Interest

## References

- Chen, R.-R.; Zhang, X. From Liquidity Risk to Systemic Risk: A Use of Knowledge Graph. J. Financ. Stab.
**2024**, 70, 101195. [Google Scholar] [CrossRef] - Denev, A. Probabilistic Graphical Models: A New Way of Thinking in Financial Modeling; Risk: London, UK, 2015. [Google Scholar]
- Ozsoylev, H.N.; Walden, J.; Yavuz, M.D.; Bildik, R. Investor Networks in the Stock Market. Rev. Financ. Stud.
**2014**, 27, 1323–1366. [Google Scholar] [CrossRef] - Chung, S.-L.; Liu, W.; Liu, W.-R.; Tseng, K. Investor network: Implications for information diffusion and asset prices. Pac.-Basin Financ. J.
**2018**, 48, 186–209. [Google Scholar] [CrossRef] - Boss, M.; Elsinger, H.; Summer, M.; Thurner, S. Network topology of the interbank market. Quant. Financ.
**2004**, 4, 677–684. [Google Scholar] [CrossRef] - Ahelegbey, D.F. The Econometrics of Bayesian Graphical Models: A Review with Financial Application. J. Netw. Theory Financ.
**2016**, 2, 1–33. [Google Scholar] [CrossRef] - Nicola, G.; Cerchiello, P.; Aste, T. Information network modeling for U.S. banking systemic risk. Entropy
**2020**, 22, 1331. [Google Scholar] [CrossRef] [PubMed] - Dolfin, M.; Knopoff, D.; Limosani, M.; Xibilia, M.G. Credit Risk Contagion and Systemic Risk on Networks. Mathematics
**2019**, 7, 713. [Google Scholar] [CrossRef] - Caccioli, F.; Barucca, P.; Kobayashi, T. Network models of financial systemic risk: A review. J. Comput. Soc. Sci.
**2018**, 1, 81–114. [Google Scholar] [CrossRef] - Ellis, S.; Sharma, S.; Brzeszczyński, J. Systemic risk measures and regulatory challenges. J. Financ. Stab.
**2021**, 61, 100960. [Google Scholar] [CrossRef] - Billio, M.; Getmansky, M.; Lo, A.W.; Pelizzon, L. Measuring Systemic Risk in the Finance and Insurance Sectors. MIT Sloan School Working Paper 4774. 2010. Available online: https://www.bis.org/bcbs/events/sfrworkshopprogramme/billio.pdf (accessed on 1 March 2024).
- Benazzoli, C.; Di Persio, L. Default contagion in financial networks. Int. J. Math. Comput. Simul.
**2016**, 10, 112–117. [Google Scholar] - Eisenberg, L.; Noe, T.H. Systemic Risk in Financial Systems. Manag. Sci.
**2001**, 47, 236–249. [Google Scholar] [CrossRef] - Rogers, L.C.G.; Veraart, L.A.M. Failure and rescue in an interbank network. Manag. Sci.
**2013**, 59, 882–898. [Google Scholar] [CrossRef] - Gai, P.; Kapadia, S. Contagion in financial networks. Proc. R. Soc. A
**2010**, 466, 2401–2423. [Google Scholar] [CrossRef] - Hurd, T.R.; Gleeson, J.P. On Watts’ cascade model with random link weights. J. Complex Netw.
**2013**, 1, 25–43. [Google Scholar] [CrossRef] - Hurd, T.R. Contagion! Systemic Risk in Financial Networks; Springer: Berlin/Heidelberg, Germany, 2016. [Google Scholar]
- Unicomb, S.; Iñiguez, G.; Karsai, M. Threshold driven contagion on weighted networks. Sci. Rep.
**2018**, 8, 3094. [Google Scholar] [CrossRef] [PubMed] - Cifuentes, R.; Ferrucci, G.; Shin, H.S. Liquidity risk and contagion. J. Eur. Econ. Assoc.
**2005**, 3, 556–566. [Google Scholar] [CrossRef] - Caccioli, F.; Shrestha, M.; Moore, C.; Farmer, J.D. Stability analysis of financial contagion due to overlapping portfolios. J. Bank. Financ.
**2014**, 46, 233–245. [Google Scholar] [CrossRef] - Caccioli, F.; Farmer, J.D.; Foti, N.; Rockmore, D. Overlapping portfolios, contagion, and financial stability. J. Econ. Dyn. Control
**2015**, 51, 50–63. [Google Scholar] [CrossRef] - Anderson, H.; Paddrik, M.; Wang, J.J. Bank Networks and Systemic Risk: Evidence from the National Banking Acts. Am. Econ. Rev.
**2019**, 109, 3125–3161. [Google Scholar] [CrossRef] - Dabrowski, J.J.; Beyers, C.; de Villiers, J.P. Systemic banking crisis early warning systems using dynamic Bayesian networks. Expert Syst. Appl.
**2016**, 62, 225–242. [Google Scholar] [CrossRef] - Gandy, A.; Veraart, L.A.M. A Bayesian Methodology for Systemic Risk Assessment in Financial Networks. Manag. Sci.
**2017**, 63, 4428–4446. [Google Scholar] [CrossRef] - Anand, K.; Craig, B.; Von Peter, G. Filling in the blanks: Network structure and interbank contagion. Quant. Financ.
**2014**, 15, 625–636. [Google Scholar] [CrossRef] - Elsinger, H.; Lehar, A.; Summer, M. Network models and systemic risk assessment. In Handbook on Systemic Risk; Fouque, J.-P., Langsam, J.A., Eds.; Cambridge University Press: Cambridge, UK, 2013; Volume 1, pp. 287–305. [Google Scholar]
- Hałaj, G.; Kok, C. Assessing Interbank Contagion Using Simulated Networks; ECB Working Paper 1506; European Central Bank: Frankfurt am Main, Germany, 2013. [Google Scholar]
- Musmeci, N.; Battiston, S.; Caldarelli, G.; Puliga, M.; Gabrielli, A. Bootstrapping topological properties and systemic risk of complex networks using the fitness model. J. Statist. Phys.
**2013**, 151, 720–734. [Google Scholar] [CrossRef] - Mastromatteo, I.; Zarinelli, E.; Marsili, M. Reconstruction of financial networks for robust estimation of systemic risk. J. Statist. Mech. Theory Exp.
**2012**, 2012, P03011. [Google Scholar] [CrossRef] - Chen, Y. Bank interconnectedness and financial stability: The role of bank capital. J. Financ. Stab.
**2022**, 61, 101019. [Google Scholar] [CrossRef] - Bollen, J.; Mao, H.; Zeng, X. Twitter mood predicts the stock market. J. Comput. Sci.
**2011**, 2, 1–8. [Google Scholar] [CrossRef] - Chatrath, A.; Miao, H.; Ramchander, S.; Villupuram, S. Currency jumps, cojumps and the role of macro news. J. Int. Money Financ.
**2014**, 40, 42–62. [Google Scholar] [CrossRef] - Rachlin, G.; Last, M.; Alberg, D.; Kandel, A. Admiral: A data mining based financial trading system. In Proceedings of the 2007 IEEE Symposium on Computational Intelligence and Data Mining, Honolulu, HI, USA, 1 March–5 April 2007; pp. 720–725. [Google Scholar]
- Antweiler, W.; Frank, M.Z. Is All That Talk Just Noise? The Information Content of Internet Stock Message Boards. J. Financ.
**2004**, 59, 1259–1294. [Google Scholar] [CrossRef] - Ming, F.; Wong, F.; Liu, Z.; Chiang, M. Stock market prediction from WSJ: Text mining via sparse matrix factorization. In Proceedings of the 2014 IEEE International Conference on Data Mining, Shenzhen, China, 14–17 December 2014; pp. 430–439. [Google Scholar]
- Schumaker, R.P.; Zhang, Y.; Huang, C.-N.; Chen, H. Evaluating sentiment in financial news articles. Decis. Support Syst.
**2012**, 53, 458–464. [Google Scholar] [CrossRef] - Fisher, I.E.; Garnsey, M.R.; Hughes, M.E. Natural Language Processing in Accounting, Auditing and Finance: A Synthesis of the Literature with a Roadmap for Future Research. Intell. Syst. Account. Financ. Manag.
**2016**, 23, 157–214. [Google Scholar] [CrossRef] - Sydserff, R.; Weetman, P. Methodological themes: A texture index for evaluating accounting narratives—An alternative to readability formulas. Account. Audit. Account. J.
**1999**, 12, 459–488. [Google Scholar] [CrossRef] - Back, B.; Toivonen, J.; Vanharanta, H.; Visa, A. Comparing numerical data and text information from annual reports using self-organizing maps. Int. J. Account. Inf. Syst.
**2001**, 2, 249–269. [Google Scholar] [CrossRef] - Cohen, R.F.; Eades, P.; Lin, T.; Ruskey, F. Three-dimensional graph drawing. In Graph Drawing. GD 1994; Lecture Notes in Computer Science; Tamassia, R., Tollis, I.G., Eds.; Springer: Berlin/Heidelberg, Germany, 1995; Volume 894, pp. 1–11. ISBN 978-3-540-58950-1. [Google Scholar] [CrossRef]
- Neelakantan, A.; Xu, T.; Puri, R.; Radford, A.; Han, J.M.; Tworek, J.; Yuan, Q.; Tezak, N.; Kim, J.W.; Hallacy, C.; et al. Text and Code Embeddings by Contrastive Pre-Training; Working Paper; Cornell University: Ithaca, NY, USA, 2022. [Google Scholar]

**Figure 4.**OpenAI’s text-embedding-ada-002. “Text and Code Embeddings by Contrastive Pre-Training”, by Arvind Neelakantan et al. [41]. https://arxiv.org/abs/2201.10005, accessed on 1 March 2024.

**Figure 6.**Presentation of 100 news articles using the financial firm label from the dataset. Note: there are 100 dots (each is a news article, randomly selected from a total of 7031 articles) in the graph. Each color (associated with a number, whose name is given in Table 2) represents a financial firm.

**Figure 7.**Presentation of out-sample news articles using classification. Note: the number of out-sample news articles is roughly 2100, which equals 30% of the total sample of 7031.

**Figure 10.**Graph using OpenAI with t-SNE. (The numbers in the graphs represent companies (see Table 2).

**Figure 12.**Graph using spaCy with PCA. (The numbers in the graphs represent companies (see Table 2).

(A) The entire sample: | |

Number of organizations | 1324 |

Number of documents | 296,584 |

Number of sentences | 22,210,824 |

Number of words | 236,338,448 |

Number of characters | 1,677,880,582 |

(B) Top 22 financial firms: | |

Number of organizations | 22 |

Number of documents | 7031 |

Number of sentences | 178,089 |

Number of words | 4,886,736 |

Number of characters | 27,637,528 |

Firm ID | Firm Name |
---|---|

0 | AFLAC |

1 | AMERICAN EXPRESS |

2 | AMERICAN INTERNATIONAL GROUP |

3 | AMERICAN TOWER |

4 | BANK OF AMERICA |

5 | BANK OF NEW YORK MELLON |

6 | BERKSHIRE HATHAWAY |

7 | BLACKROCK |

8 | CAPITAL ONE FINANCIAL |

9 | CHUBB LTD |

10 | CITIGROUP |

11 | FRANKLIN RESOURCES |

12 | JPMORGAN CHASE |

13 | METLIFE |

14 | PNC FINANCIAL SVCS |

15 | PRUDENTIAL FINANCIAL |

16 | PUBLIC STORAGE |

17 | SIMON PROPERTY |

18 | STATE STREET |

19 | TRAVELERS COS |

20 | U S BANCORP |

21 | WELLS FARGO |

Embedding | openAI-1536 | openAI-1536 | openAI, PCA-300 | openAI, PCA-300 | spaCy-300 | spaCy-300 |
---|---|---|---|---|---|---|

Data subset | train-set | test-set | train-set | test-set | train-set | test-set |

Classifiers: | ||||||

K-Neighbors Classifier | 85.65% | 79.00% | 65.65% | 46.68% | 86.45% | 79.19% |

SVC | 90.75% | 84.45% | 44.42% | 40.52% | 96.75% | 86.30% |

Logistic Regression | 84.56% | 82.70% | 70.61% | 65.21% | 83.78% | 82.56% |

Random Forest Classifier | 99.92% | 79.29% | 99.91% | 53.83% | 99.92% | 80.81% |

XGB Classifier | 99.92% | 82.23% | 99.91% | 58.90% | 99.92% | 82.13% |

MLP Classifier | 98.80% | 86.87% | 86.85% | 71.32% | 98.86% | 84.93% |

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Lyu, R.-Y.; Chen, R.-R.; Chung, S.-L.; Zhou, Y.
Systemic Risk and Bank Networks: A Use of Knowledge Graph with ChatGPT. *FinTech* **2024**, *3*, 274-301.
https://doi.org/10.3390/fintech3020016

**AMA Style**

Lyu R-Y, Chen R-R, Chung S-L, Zhou Y.
Systemic Risk and Bank Networks: A Use of Knowledge Graph with ChatGPT. *FinTech*. 2024; 3(2):274-301.
https://doi.org/10.3390/fintech3020016

**Chicago/Turabian Style**

Lyu, Ren-Yuan, Ren-Raw Chen, San-Lin Chung, and Yilu Zhou.
2024. "Systemic Risk and Bank Networks: A Use of Knowledge Graph with ChatGPT" *FinTech* 3, no. 2: 274-301.
https://doi.org/10.3390/fintech3020016