Türkiye-Style Banking System Stress & Resilience Model
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
This model is a simplified agent-based model of a banking system inspired by the structure of a relatively regulated and resilient banking sector such as Türkiye’s banking system.
The model does not try to forecast real bank failures. Instead, it tries to show how a banking system with capital buffers, liquidity buffers, deposit flows, credit losses, interbank exposures and central bank liquidity support may behave under different stress conditions.
In the model, each blue circle represents one operating bank. Each red circle represents a failed bank. The lines between banks represent simplified interbank financial exposures. If Bank A is exposed to Bank B, then Bank B’s failure can create a loss for Bank A.
The model is designed around one important idea:
In a regulated banking system, banks do not usually fail immediately when one ratio deteriorates. A bank may breach a capital or liquidity threshold, come under regulatory pressure, lose confidence, experience deposit outflows, or draw liquidity support before reaching the point of failure.
Therefore, this model separates three different concepts:
Normal stress A bank may experience losses, lower confidence or deposit outflows, but it remains operating.
Regulatory breach A bank may fall below the model’s CAR or LCR threshold. This does not mean the bank has failed. It means the bank is under pressure and should be monitored.
Failure A bank is considered failed only if it suffers very severe capital erosion, a very large liquidity shortfall, or a long period of serious weakness.
This distinction is important because in real-world banking systems, especially regulated systems, bank failure is usually not an immediate mechanical outcome of one weak indicator. There are buffers, supervision, liquidity facilities, capital actions, profitability, restructuring options and confidence effects.
The model focuses on the following financial mechanisms:
- Capital adequacy
- Liquidity adequacy
- Credit losses
- Profit generation
- Deposit inflows and outflows
- Fire-sale losses
- Central bank liquidity support
- Interbank contagion
- Regulatory breaches
- System-wide stress
The model is intentionally simplified. It should be used for learning, experimentation and understanding financial stability logic, not for real-world bank supervision, regulatory reporting, capital planning or investment decisions.
HOW IT WORKS
The main agents in the model are banks. Each bank is represented by a turtle.
Each bank has a simplified balance sheet and several behavioral variables.
The main bank variables are:
- capital: the bank’s loss-absorbing capital.
- liquidity: cash and liquid resources that can be used to meet deposit outflows.
- deposits: customer deposits.
- loans: the loan portfolio.
- risky-assets: simplified securities or other market-sensitive assets.
- interbank-assets: claims on other banks.
- interbank-liabilities: funding received from other banks.
- cb-funding: liquidity support received from the central bank or liquidity facility.
- car: capital adequacy ratio.
- lcr: liquidity coverage ratio.
- confidence: market/depositor confidence in the bank.
- stress: the bank’s internal stress level.
- npl-ratio: simplified non-performing loan ratio.
- profitability: simplified recurring income capacity.
- watch-periods: number of periods during which the bank remains under regulatory weakness.
- failed?: whether the bank has failed.
The model also gives banks different profiles:
- state
- large-private
- foreign
- mid-size
These bank types are not intended to represent specific real Turkish banks. They are only stylized categories. The idea is that different bank types may have different balance sheet sizes and resilience levels.
The model runs in ticks. Each tick can be interpreted as a simplified period. It does not correspond exactly to a day, month or year.
At each tick, the model follows this sequence:
1. Banks earn income and recognize credit costs
Unlike the earlier version of the model, banks are not only passive entities that suffer losses. They also generate recurring operating income.
This is important for a Türkiye-like banking model because banks normally earn income through loans, securities and other balance sheet activities. This recurring income helps absorb ordinary credit costs and stabilizes the system.
At each tick:
- Banks earn a simplified operating income.
- Banks recognize credit costs.
- Their capital is adjusted.
- A portion of income increases liquidity.
- Their stress level partially decays over time.
- Confidence can recover if the bank remains stable.
This makes the model less mechanically pessimistic. Banks do not collapse simply because time passes. They can recover from moderate stress.
2. Macro-financial shocks may occur
The model may randomly apply shocks to some banks.
A macro-financial shock represents a deterioration in the economic or financial environment. It may stand for things such as:
- credit deterioration,
- market volatility,
- asset price decline,
- funding pressure,
- confidence shock,
- country risk pressure,
- or a severe macroeconomic environment.
The probability and severity of these shocks depend on the systemic-risk slider.
When systemic-risk is low, shocks are rare and mild.
When systemic-risk is high, shocks become more frequent and more severe.
A shock reduces capital and increases stress. It may also reduce confidence.
3. Deposits move in or out
Deposits do not simply disappear every period. The model allows both deposit outflows and deposit inflows.
Deposit outflows increase when:
- confidence falls,
- stress rises,
- nearby or connected banks fail,
- systemic-risk is high.
Deposit inflows increase when:
- confidence is high,
- systemic-risk is low,
- the bank remains stable.
This is a key difference from the earlier model. In the earlier version, deposits tended to flow out continuously, which made the model too fragile. In this version, a stable banking system can keep or attract deposits.
When net deposit flow is negative, liquidity decreases. When net deposit flow is positive, deposits and liquidity increase.
4. Liquidity management occurs
If a bank has a liquidity shortfall, it first tries to draw liquidity support.
This is controlled by the central-bank-support slider.
This does not create capital. It only helps with liquidity.
This distinction is important:
- A solvent bank can survive a temporary liquidity squeeze with support.
- An insolvent bank cannot be saved merely by liquidity support.
If liquidity support is not enough, the bank sells risky assets. If it sells assets under stress, it may suffer a fire-sale loss.
Fire-sale losses reduce capital and increase stress.
5. CAR and LCR are updated
The model calculates two important ratios.
CAR — Capital Adequacy Ratio
CAR measures how much capital the bank has compared with its risk-weighted assets.
In simple terms:
Does the bank have enough capital to absorb losses from the risks it has taken?
In the model, the minimum CAR threshold is set as a monitoring threshold. Falling below this threshold does not immediately mean failure.
LCR — Liquidity Coverage Ratio
LCR measures whether the bank has enough liquid resources to meet short-term liquidity pressure.
In simple terms:
Can the bank handle sudden cash outflows?
In the model, the minimum LCR threshold is set at 100%. Again, falling below this threshold does not immediately mean failure. It means the bank is under liquidity pressure.
6. Regulatory breaches are identified
If a bank’s CAR or LCR falls below the model threshold, the bank enters a weaker regulatory state.
This is counted in the Regulatory Breaches monitor.
A regulatory breach means:
- the bank is still alive,
- but it is below an important capital or liquidity threshold,
- its stress increases,
- confidence weakens slightly,
- and the bank accumulates watch-periods.
This is a more realistic interpretation than treating every ratio breach as an immediate failure.
7. Failure is resolved only under severe conditions
A bank fails only under severe conditions.
The model treats a bank as failed if one of the following happens:
- CAR falls to an extremely low level,
- capital becomes deeply negative,
- liquidity becomes severely negative compared with deposits,
- or the bank remains weak for a long time while both capital and liquidity are very poor.
This makes bank failure rare under normal conditions and more likely only under extreme stress.
This is why in a normal Türkiye-like scenario, you should usually see:
- zero failed banks,
- possibly a few regulatory breaches,
- moderate system stress,
- and CAR/LCR remaining above key thresholds.
8. Interbank contagion occurs after failure
If a bank fails, other banks that had exposure to it suffer losses.
The model uses directed links to represent these exposures.
If Bank A has a claim on Bank B, and Bank B fails, then Bank A may lose part of its claim. This loss is controlled by a simplified interbank loss-given-default mechanism.
However, this model assumes some degree of resolution, collateralization or recovery. Therefore, interbank losses are not automatically catastrophic in normal scenarios.
This is another reason why the model is more stable than the earlier version.
HOW TO USE IT
To use the model:
- Adjust the sliders.
- Press setup.
- Press go or go forever.
- Watch the network, plots and monitors.
The Interface contains buttons, sliders, plots and monitors.
Buttons
setup
The setup button initializes the model.
When you press setup:
- all previous banks and links are cleared,
- a new banking system is created,
- each bank receives a balance sheet,
- each bank is assigned a stylized type,
- interbank exposures are created,
- CAR and LCR are calculated,
- the plots are cleared,
- and the simulation returns to tick 0.
Each setup creates a new random version of the banking network.
go
The go button runs the model one tick at a time.
If the button is set to forever, the model runs continuously until you stop it or all banks fail.
In a normal resilient scenario, all banks should not fail. If all banks fail under low systemic-risk, high capital-buffer and high liquidity-buffer, the model would be too pessimistic. The current version is designed to avoid that problem.
Sliders
The model uses only five sliders.
num-banks
This controls the number of banks in the system.
A small value creates a small banking system. A larger value creates a more complex system.
Example interpretation:
- 10 banks: small system
- 30 banks: medium system
- 80 banks: larger and more complex system
Increasing the number of banks increases the number of possible interbank relationships and can make the system more complex.
systemic-risk
This is the main stress slider.
It controls the general severity of the environment.
When systemic-risk increases, several things become worse at the same time:
- macro shocks become more likely,
- macro shocks become more severe,
- deposit outflows become more sensitive to confidence,
- fire-sale discounts become larger,
- interbank contagion becomes more damaging,
- and the overall system becomes more fragile.
Suggested interpretation:
- 0–20: calm environment
- 20–40: mild stress
- 40–60: moderate stress
- 60–80: severe stress
- 80–100: crisis environment
In a Türkiye-like resilient banking scenario, a systemic-risk value around 10–30 should usually not cause widespread bank failures.
capital-buffer
This controls the initial capital strength of banks.
The value is interpreted as a percentage.
For example, if capital-buffer is 18, banks begin with an approximate capital buffer around 18%, adjusted by bank-level differences.
Higher capital-buffer means banks can absorb more losses before becoming seriously weak.
Lower capital-buffer makes banks more vulnerable to credit losses, market losses and interbank contagion.
Suggested interpretation:
- 4–8: very weak capital position
- 9–12: low to moderate buffer
- 13–18: normal to strong buffer
- 19–25: strong buffer
liquidity-buffer
This controls the initial liquidity strength of banks.
The value is interpreted as a percentage of deposits.
For example, if liquidity-buffer is 25, banks begin with a liquidity buffer around 25% of deposits, adjusted by random bank-level differences.
Higher liquidity-buffer makes banks more resilient to deposit outflows.
Lower liquidity-buffer makes the system more vulnerable to bank-run dynamics.
Suggested interpretation:
- 2–10: very low liquidity buffer
- 10–20: moderate liquidity buffer
- 20–35: strong liquidity buffer
- 35–50: very strong liquidity buffer
central-bank-support
This controls the maximum liquidity support available to each bank.
This is not capital support. It is liquidity support.
It helps banks survive temporary liquidity pressure.
A high value reduces liquidity-driven failures.
A low value makes liquidity crises more dangerous.
Suggested interpretation:
- 0: no liquidity support
- 50–150: limited support
- 200–400: meaningful support
- 500+: strong support
Plots
The model has four main plots.
Failures
This plot shows the number of failed banks over time.
X-axis: time / ticks Y-axis: number of failed banks
In a resilient banking scenario, this plot should usually remain at zero.
If the line rises slowly, failures are occurring gradually.
If the line jumps sharply, the system is experiencing a severe contagion or collapse scenario.
Important interpretation:
A high number of regulatory breaches does not necessarily mean high failures. Banks can be weak without being failed.
Capital
This plot shows the system-wide capital adequacy condition.
It has two lines:
- system CAR
- min CAR
The system CAR line shows the average capital adequacy of the banking system.
The min CAR line shows the model’s capital monitoring threshold.
If system CAR remains above min CAR, the system is generally well capitalized.
If system CAR falls below min CAR, the system is under capital pressure. However, this still does not automatically mean banks have failed.
In this Türkiye-like version, the Capital plot is often more important than the Failures plot because it shows early weakening before actual bank failure.
Liquidity
This plot shows the system-wide liquidity condition.
It has two lines:
- avg LCR
- min LCR
The avg LCR line shows the average liquidity coverage condition of the banks.
The min LCR line shows the model’s liquidity monitoring threshold.
If avg LCR remains above min LCR, the system is generally liquid.
If avg LCR falls below min LCR, the system is experiencing liquidity pressure.
Liquidity pressure may or may not result in bank failures depending on capital strength, deposit flows and central bank support.
Withdrawals
This plot shows deposit withdrawals in each tick.
It is not a cumulative plot. It shows the amount of net deposit outflow in the current period.
If the Withdrawals plot rises, depositors are losing confidence or stress is increasing.
If Withdrawals falls toward zero, deposit conditions are stabilizing.
In this model, deposits can also flow in. Therefore, when there is net inflow, the withdrawal value may be zero.
Monitors
The monitors provide numerical information about the current state of the model.
Failed Banks
Shows the number of banks that have failed.
In a normal resilient scenario, this should remain zero.
System CAR %
Shows the system-wide capital adequacy ratio as a percentage.
A high value indicates stronger loss-absorbing capacity.
Average LCR %
Shows the average liquidity coverage ratio as a percentage.
A high value indicates stronger liquidity resilience.
Total Withdrawals
Shows deposit outflows in the current tick.
This is not cumulative. It is the current-period withdrawal pressure.
Regulatory Breaches
Shows the number of operating banks below the model’s CAR or LCR threshold.
This is an early warning indicator.
A bank can be counted as a regulatory breach but still remain alive.
System Stress
Shows the average stress level of banks.
Suggested interpretation:
- 0.00–0.20: calm system
- 0.20–0.50: moderate stress
- 0.50–0.80: severe stress
- 0.80–1.00: crisis conditions
THINGS TO NOTICE
While running the model, pay attention to the following points.
1. Bank failures should be rare in normal conditions
With low systemic-risk, strong capital-buffer, strong liquidity-buffer and meaningful central-bank-support, the model should usually show no failed banks.
This reflects the idea that regulated banking systems do not normally experience mass bank failures every period.
2. Regulatory breaches can appear before failures
A bank can become weak before it fails.
Watch the Regulatory Breaches monitor.
If regulatory breaches rise but failed banks remain at zero, the system is under pressure but has not collapsed.
This is a realistic distinction.
3. Capital and liquidity are different problems
Capital pressure and liquidity pressure are not the same.
A bank with weak liquidity may still be solvent.
A bank with weak capital may still have cash temporarily.
Look at the Capital and Liquidity plots together.
If Capital is strong but Liquidity is weak, the system has a liquidity problem.
If Liquidity is strong but Capital is weak, the system has a solvency problem.
If both are weak, the situation is more serious.
4. Central bank support helps liquidity, not solvency
Increasing central-bank-support can reduce liquidity-driven failures.
However, it does not directly repair capital losses.
If banks suffer severe credit losses or market losses, liquidity support alone may not be enough.
5. The system can absorb moderate shocks
Because banks generate income and have buffers, moderate stress does not necessarily lead to failure.
This is intentional.
The model is designed to show resilience under normal and moderate stress, and failures only under severe or persistent stress.
6. Network contagion matters mostly after failure
Interbank exposures do not automatically create losses every period.
They become dangerous when one bank fails and transmits losses to creditor banks.
Therefore, if no bank fails, the interbank network may look dense but not necessarily dangerous.
7. Large systems can behave differently
Increasing num-banks can create more complex patterns.
A larger system may diversify risk, but it may also create more channels through which stress can spread.
THINGS TO TRY
Try the following experiments.
1. Türkiye-like resilient baseline
Use:
- num-banks = 30
- systemic-risk = 15
- capital-buffer = 20
- liquidity-buffer = 25
- central-bank-support = 300
Expected result:
- Failed Banks should usually remain 0.
- System CAR should remain strong.
- Average LCR should generally remain above the threshold.
- Regulatory breaches may be low or zero.
- System Stress should remain low.
This is the baseline resilient banking system scenario.
2. Mild stress scenario
Use:
- num-banks = 30
- systemic-risk = 30
- capital-buffer = 18
- liquidity-buffer = 22
- central-bank-support = 250
Expected result:
- Banks may experience moderate stress.
- Withdrawals may increase temporarily.
- Regulatory breaches may appear.
- Bank failures should still be rare.
3. Moderate stress scenario
Use:
- num-banks = 40
- systemic-risk = 50
- capital-buffer = 15
- liquidity-buffer = 18
- central-bank-support = 200
Expected result:
- Some banks may fall below CAR or LCR thresholds.
- Regulatory breaches may rise.
- System stress may increase.
- Failures may still be limited.
4. Severe crisis scenario
Use:
- num-banks = 40
- systemic-risk = 80
- capital-buffer = 8
- liquidity-buffer = 8
- central-bank-support = 50
Expected result:
- Capital and liquidity ratios may deteriorate.
- Withdrawals may rise.
- Regulatory breaches may increase sharply.
- Some banks may fail.
- Interbank contagion may become visible.
5. No central bank support experiment
Run the same scenario twice.
First run:
- central-bank-support = 0
Second run:
- central-bank-support = 400
Compare the Liquidity plot and Failed Banks monitor.
You should see that central bank support can reduce liquidity-driven failures, especially when the underlying capital position is not too weak.
6. Capital buffer experiment
Keep all sliders fixed except capital-buffer.
Try:
- capital-buffer = 8
- capital-buffer = 15
- capital-buffer = 22
Observe how higher capital buffers reduce failures and regulatory breaches.
7. Liquidity buffer experiment
Keep all sliders fixed except liquidity-buffer.
Try:
- liquidity-buffer = 5
- liquidity-buffer = 20
- liquidity-buffer = 35
Observe how higher liquidity buffers reduce deposit-run pressure and LCR deterioration.
8. Long-run stability test
Use a low-risk scenario and run the model for many ticks.
For example:
- systemic-risk = 10
- capital-buffer = 22
- liquidity-buffer = 30
- central-bank-support = 300
In a well-calibrated resilient model, the system should not mechanically collapse only because time passes.
EXTENDING THE MODEL
This model is still simplified. It can be extended in several ways.
1. Add real Turkish banking categories
The current model has stylized bank types.
A more detailed version could distinguish:
- public deposit banks,
- private domestic deposit banks,
- foreign-owned banks,
- participation banks,
- development and investment banks.
Each type could have different balance sheet structures and behavior.
2. Add household depositors
Currently, deposit flows are calculated by formulas.
A more advanced model could add household agents.
Each household could choose a bank, observe confidence, move deposits, or withdraw funds.
This would make bank-run behavior more micro-founded.
3. Add firms and corporate credit risk
Currently, loans are an aggregate balance sheet item.
A more advanced model could include firm agents.
Firms could borrow from banks, earn income, default under stress, and create non-performing loans.
This would make the NPL channel more realistic.
4. Add FX liquidity risk
Türkiye-like banking systems often require attention to foreign currency liquidity.
A more realistic version could separate:
- TRY liquidity,
- USD liquidity,
- EUR liquidity.
This would allow the model to simulate FX funding pressure and currency mismatch.
5. Add securities portfolio detail
The risky-assets variable could be separated into:
- government bonds,
- CPI-linked securities,
- FX securities,
- corporate bonds,
- other market-sensitive assets.
Each asset type could react differently to interest rate or exchange rate shocks.
6. Add macro variables
The systemic-risk slider could be replaced by explicit macro variables:
- inflation,
- policy rate,
- GDP growth,
- exchange rate volatility,
- unemployment,
- sovereign risk premium.
This would make the model more economically interpretable.
7. Add regulatory intervention
The model could include regulatory tools such as:
- capital injection,
- liquidity facility,
- resolution mechanism,
- forced merger,
- dividend restriction,
- loan growth restriction,
- macroprudential buffers.
8. Add BehaviorSpace experiments
NetLogo’s BehaviorSpace can run the model hundreds or thousands of times.
Possible experiments:
- What level of systemic-risk causes the first bank failure?
- How much capital-buffer is needed to avoid failures?
- How much central-bank-support reduces liquidity failures?
- Does a larger banking network increase or reduce systemic risk?
- How sensitive is the system to deposit confidence?
9. Add data calibration
The current model is stylized.
A more advanced version could calibrate starting CAR, LCR, loan/deposit ratios, NPL ratios and profitability using published sector-level data.
This would make the model more realistic, although it would still remain a simulation rather than a forecast.
NETLOGO FEATURES
The model uses several important NetLogo features.
1. breed
The model defines banks as a separate turtle breed:
breed [banks bank]
This allows the model to apply commands specifically to banks.
2. banks-own
Each bank has its own variables:
- capital
- liquidity
- deposits
- loans
- risky-assets
- confidence
- stress
- failed?
This means every bank has its own balance sheet and condition.
3. directed-link-breed
The model uses directed links for interbank exposures:
directed-link-breed [exposures exposure]
This is important because financial exposures are directional.
If Bank A lends to Bank B, Bank B’s failure affects Bank A. The reverse is not automatically true.
4. exposures-own
Each interbank exposure has its own variables:
- amount
- loss-applied?
The amount variable stores the size of the exposure.
The loss-applied? variable prevents the same exposure loss from being applied multiple times.
5. ask
The model uses the NetLogo ask command to make each bank act according to the same rules.
Even though banks follow the same broad rules, they produce different outcomes because their balance sheets, bank types, confidence levels and exposures differ.
6. Reporter procedures
The model uses reporter procedures such as:
bank-rwasystem-carpreliminary-rwa
These procedures calculate financial ratios or balance sheet measures.
7. Directed network contagion
The model uses incoming and outgoing exposures.
When a bank fails, the model asks its incoming exposures to transmit losses to creditor banks.
This is a simple but useful way to represent interbank contagion.
8. Plotting
The model uses plots to show system-level outcomes:
- failures,
- capital adequacy,
- liquidity adequacy,
- withdrawals.
The plot procedure is named update-financial-plots.
This avoids conflict with NetLogo’s built-in update-plots command.
9. Emergence
No single command tells the system to have a crisis.
Systemic stress emerges from many small interactions:
- shocks,
- confidence changes,
- deposit flows,
- liquidity support,
- fire-sales,
- capital losses,
- interbank contagion.
This is the core idea of agent-based modeling.
RELATED MODELS
This model is not a direct copy of any NetLogo Models Library model. However, it is related to several NetLogo models in terms of logic.
Virus on a Network
This model is useful for understanding contagion across a network.
In the banking model, financial stress spreads through interbank links instead of biological infection.
Spread of Disease
This model helps explain how local interactions can produce system-wide contagion.
Financial panic and confidence shocks can behave similarly to contagion processes.
Giant Component
This model helps explain network connectivity.
A highly connected banking network may spread shocks more efficiently, but it may also diversify some exposures.
Preferential Attachment
This model helps explain why some nodes become more central than others.
In real banking systems, large banks often become more central in interbank networks.
Bank Reserves
This model is more directly related to banking. It can help users understand how reserves, deposits and lending can interact in a simplified banking environment.
CREDITS AND REFERENCES
This is an original educational NetLogo model prepared for learning purposes.
It is inspired by:
- agent-based modeling,
- banking system stress testing,
- interbank contagion models,
- liquidity risk models,
- and stylized features of a regulated banking system such as Türkiye’s banking sector.
The model should not be used as:
- a real stress testing model,
- a regulatory model,
- a bank valuation model,
- a default prediction model,
- or an investment decision tool.
Suggested references:
- Wilensky, U. NetLogo. Center for Connected Learning and Computer-Based Modeling, Northwestern University.
- NetLogo User Manual and Dictionary.
- NetLogo Models Library: Virus on a Network.
- NetLogo Models Library: Bank Reserves.
- NetLogo Models Library: Giant Component.
- NetLogo Models Library: Preferential Attachment.
- Türkiye Bankalar Birliği banking sector statistical reports.
- Banking Regulation and Supervision Agency of Türkiye banking sector indicators.
- Literature on interbank contagion, financial networks, funding liquidity risk and agent-based financial stability modeling.
Comments and Questions
directed-link-breed [exposures exposure] breed [banks bank] globals [ regulatory-breaches system-stress total-withdrawals total-fire-sale-losses min-car min-lcr ] banks-own [ bank-type systemic-importance capital liquidity deposits loans risky-assets interbank-assets interbank-liabilities cb-funding car lcr confidence stress withdrawals fire-sale-losses npl-ratio profitability watch-periods failed? ] exposures-own [ amount loss-applied? ] to setup clear-all ; Türkiye benzeri yorum: ; min-car burada yasal minimumdan ziyade ihtiyatlı izleme eşiği gibi kullanılır. ; Banka bu eşiğin altına düşünce hemen batmaz, sadece kırılgan sayılır. set min-car 0.12 set min-lcr 1.00 create-banks num-banks [ setxy random-xcor random-ycor set shape "circle" set size 1.5 assign-bank-profile set deposits 1000 * systemic-importance * (0.75 + random-float 0.50) ; Türkiye benzeri sade bilanço: ; Krediler ana aktif kalemi, menkul kıymetler/risky-assets ikinci büyük aktif kalemi. set loans deposits * (0.55 + random-float 0.18) set risky-assets deposits * (0.18 + random-float 0.12) ; Likidite tamponu slider'dan gelir ama banka tipine göre küçük fark yaratılır. set liquidity deposits * (liquidity-buffer / 100) * (0.85 + random-float 0.30) ; Başlangıç sermayesi risk ağırlıklı varlık benzeri baz üzerinden kurulur. set interbank-assets 0 set interbank-liabilities 0 set cb-funding 0 set capital preliminary-rwa * (capital-buffer / 100) * (0.90 + random-float 0.20) set car 0 set lcr 0 set confidence 0.95 + random-float 0.05 set stress 0 set withdrawals 0 set fire-sale-losses 0 ; Türkiye benzeri düşük fakat şokla artabilen kredi riski. set npl-ratio 0.012 + random-float 0.018 ; Bankalar her dönem küçük de olsa faaliyet geliri üretir. set profitability 0.0010 + random-float 0.0012 set watch-periods 0 set failed? false ] create-interbank-network update-bank-ratios update-visuals update-system-indicators clear-all-plots reset-ticks end to assign-bank-profile let r random-float 1 if r < 0.25 [ set bank-type "state" set systemic-importance 1.35 ] if r >= 0.25 and r < 0.55 [ set bank-type "large-private" set systemic-importance 1.20 ] if r >= 0.55 and r < 0.80 [ set bank-type "foreign" set systemic-importance 1.00 ] if r >= 0.80 [ set bank-type "mid-size" set systemic-importance 0.75 ] end to create-interbank-network ; Türkiye benzeri yaklaşım: ; Bankalar birbirine bağlıdır ama bu bağlantılar tek başına her yıl çok sayıda banka batıracak kadar yıkıcı değildir. let average-links max list 1 round (1 + systemic-risk / 35) ask banks [ let possible-borrowers other banks let number-of-borrowers min list average-links count possible-borrowers if number-of-borrowers > 0 [ create-exposures-to n-of number-of-borrowers possible-borrowers [ ; Önceki modele göre daha düşük interbank exposure. set amount ([deposits] of end1) * (0.006 + random-float 0.020) set loss-applied? false set color gray set thickness 0.10 ] ] ] ask banks [ set interbank-assets sum [amount] of my-out-exposures set interbank-liabilities sum [amount] of my-in-exposures ] end to go if not any? banks with [not failed?] [ stop ] reset-period-flows earn-income-and-recognize-credit-costs apply-macro-shocks process-deposit-flows manage-liquidity update-bank-ratios resolve-failures update-bank-ratios update-visuals update-system-indicators update-financial-plots tick end to reset-period-flows set total-withdrawals 0 set total-fire-sale-losses 0 ask banks [ set withdrawals 0 set fire-sale-losses 0 ] end to earn-income-and-recognize-credit-costs let risk systemic-risk / 100 ask banks with [not failed?] [ ; Faaliyet geliri: kredi ve menkul kıymet portföyünden gelen sadeleştirilmiş dönemsel gelir. let operating-income (loans + risky-assets) * profitability * (1 - 0.35 * risk) ; Kredi riski maliyeti: sistemik risk yükseldikçe artar ama normal dönemde sınırlıdır. let credit-cost loans * (0.00015 + (risk ^ 2) * 0.0018) * (0.60 + random-float 0.80) ; NPL oranı stresle yavaş artar, sakinleşmeyle hafif geriler. set npl-ratio npl-ratio + risk * 0.0003 + stress * 0.0005 set npl-ratio npl-ratio * 0.998 set npl-ratio min list 0.20 max list 0.005 npl-ratio set capital capital + operating-income - credit-cost set liquidity liquidity + operating-income * 0.35 ; Stresin her dönem kalıcı şekilde birikmesini engelliyoruz. set stress stress * 0.90 ; Güven iyi bankalarda toparlanır. set confidence confidence + 0.020 set confidence confidence - stress * 0.015 set confidence max list 0 min list 1 confidence ] end to apply-macro-shocks let risk systemic-risk / 100 ; Düşük riskte şok çok nadir ve hafif. ; Yüksek riskte olasılık ve şiddet non-lineer artar. let shock-probability 0.001 + (risk ^ 2) * 0.045 let shock-severity 0.004 + (risk ^ 2) * 0.090 ask banks with [not failed?] [ if random-float 1 < shock-probability [ let asset-base loans + risky-assets ; Büyük / kamu / sistemik bankaların şok absorpsiyonu daha iyi varsayılmıştır. let resilience 1 if bank-type = "state" [ set resilience 0.75 ] if bank-type = "large-private" [ set resilience 0.85 ] if bank-type = "foreign" [ set resilience 0.90 ] if bank-type = "mid-size" [ set resilience 1.05 ] let loss asset-base * shock-severity * resilience * (0.40 + random-float 0.90) absorb-loss loss set stress min list 1 (stress + loss / max list 1 asset-base) set confidence confidence - 0.025 - stress * 0.060 set confidence max list 0 min list 1 confidence ] ] end to process-deposit-flows let risk systemic-risk / 100 ask banks with [not failed?] [ let neighbor-count count link-neighbors let failed-neighbor-share 0 if neighbor-count > 0 [ set failed-neighbor-share count link-neighbors with [failed?] / neighbor-count ] ; Mevduat çıkışı güven, stres ve komşu banka iflaslarıyla artar. let withdrawal-sensitivity 0.010 + risk * 0.180 let contagion-fear 0.010 + risk * 0.150 let outflow-rate 0.002 set outflow-rate outflow-rate + withdrawal-sensitivity * (1 - confidence) set outflow-rate outflow-rate + contagion-fear * failed-neighbor-share set outflow-rate outflow-rate + stress * 0.025 set outflow-rate outflow-rate + random-float 0.002 ; Güçlü sermaye ve likidite tamponları mevduat kaçışını azaltır. if capital-buffer >= 18 [ set outflow-rate outflow-rate * 0.65 ] if liquidity-buffer >= 25 [ set outflow-rate outflow-rate * 0.65 ] ; Türkiye benzeri daha stabil mevduat bazı: ; Normal dönemde mevduat tamamen erimez; hatta güven yüksekse giriş de olur. let inflow-rate 0.003 + (1 - risk) * 0.004 + confidence * 0.002 let net-flow deposits * (outflow-rate - inflow-rate) ifelse net-flow > 0 [ set deposits deposits - net-flow set liquidity liquidity - net-flow set withdrawals net-flow set total-withdrawals total-withdrawals + net-flow ] [ let inflow abs net-flow set deposits deposits + inflow set liquidity liquidity + inflow * 0.45 set withdrawals 0 ] set confidence confidence + 0.015 set confidence confidence - stress * 0.020 set confidence confidence - failed-neighbor-share * 0.035 set confidence max list 0 min list 1 confidence ] end to manage-liquidity let risk systemic-risk / 100 let fire-sale-discount 0.03 + risk * 0.30 ask banks with [not failed?] [ ; Önce merkez bankası / piyasa likidite desteği devreye girsin. ; Türkiye benzeri modelde kısa süreli likidite açığı hemen iflas değildir. if liquidity < 0 [ let cb-draw min list central-bank-support abs liquidity set liquidity liquidity + cb-draw set cb-funding cb-funding + cb-draw ] ; Destek yetmezse varlık satışı yapılır. if liquidity < 0 [ let liquidity-need abs liquidity let sale-face-value min list risky-assets (liquidity-need / max list 0.01 (1 - fire-sale-discount)) let cash-raised sale-face-value * (1 - fire-sale-discount) let loss sale-face-value * fire-sale-discount set risky-assets risky-assets - sale-face-value set liquidity liquidity + cash-raised absorb-loss loss set fire-sale-losses fire-sale-losses + loss set total-fire-sale-losses total-fire-sale-losses + loss set stress min list 1 (stress + loss / max list 1 (loans + risky-assets + 1)) set confidence max list 0 (confidence - 0.025) ] ] end to update-bank-ratios ask banks [ set car capital / bank-rwa ; Basitleştirilmiş LCR: ; 15% mevduat stresi + 20% interbank borç + 10% merkez bankası fonlama ihtiyacı. set lcr liquidity / max list 1 (0.15 * deposits + 0.20 * interbank-liabilities + 0.10 * cb-funding) ] end to resolve-failures ask banks with [not failed?] [ ; CAR veya LCR eşiği ihlali hemen batış değil, izleme/stres birikimi doğurur. ifelse car < min-car or lcr < min-lcr [ set watch-periods watch-periods + 1 set stress min list 1 (stress + 0.020) set confidence max list 0 (confidence - 0.010) ] [ set watch-periods max list 0 (watch-periods - 1) ] ] ; Türkiye benzeri daha gerçekçi iflas mantığı: ; Banka ancak çok ağır sermaye erozyonu, çok ciddi likidite açığı veya uzun süreli ağır kırılganlıkta batmış sayılır. ask banks with [ not failed? and ( car < 0.025 or capital < (-0.03 * bank-rwa) or liquidity < (-0.25 * deposits) or (watch-periods > 36 and car < 0.06 and lcr < 0.45) ) ] [ fail-bank ] end to fail-bank let risk systemic-risk / 100 let interbank-lgd 0.08 + risk * 0.32 set failed? true set color red set size 2.3 set confidence 0 set liquidity 0 ; Banka batınca alacaklı bankalar zarar yazar. ; Ancak Türkiye benzeri çözümleme varsayımıyla LGD önceki modele göre daha düşüktür. ask my-in-exposures with [not loss-applied?] [ let contagion-loss amount * interbank-lgd ask end1 [ if not failed? [ absorb-loss contagion-loss set stress min list 1 (stress + contagion-loss / max list 1 abs capital) set confidence max list 0 (confidence - 0.050) ] ] set loss-applied? true set color red set thickness 0.35 ] end to absorb-loss [loss] set capital capital - loss end to update-visuals ask banks [ ifelse failed? [ set color red set size 2.3 ] [ set color blue set size 1.5 ] ] ask exposures [ ifelse loss-applied? [ set color red ] [ set color gray ] ] end to update-system-indicators set regulatory-breaches count banks with [ not failed? and ( car < min-car or lcr < min-lcr ) ] ifelse any? banks [ set system-stress mean [stress] of banks ] [ set system-stress 0 ] end to update-financial-plots set-current-plot "Failures" set-current-plot-pen "failed" plot count banks with [failed?] set-current-plot "Capital" set-current-plot-pen "system CAR" plot 100 * system-car set-current-plot-pen "min CAR" plot 100 * min-car set-current-plot "Liquidity" set-current-plot-pen "avg LCR" plot 100 * mean [lcr] of banks set-current-plot-pen "min LCR" plot 100 * min-lcr set-current-plot "Withdrawals" set-current-plot-pen "withdrawals" plot total-withdrawals end to-report preliminary-rwa report max list 1 ( 0.65 * loans + 0.25 * risky-assets ) end to-report bank-rwa report max list 1 ( 0.65 * loans + 0.25 * risky-assets + 0.20 * interbank-assets ) end to-report system-car if not any? banks [ report 0 ] let total-rwa sum [bank-rwa] of banks if total-rwa <= 0 [ report 0 ] report sum [capital] of banks / total-rwa end
There is only one version of this model, created 15 days ago by Mehmet Berkay Durdu.
Attached files
| File | Type | Description | Last updated | |
|---|---|---|---|---|
| Türkiye-Style Banking System Stress & Resilience Model.png | preview | Preview for 'Türkiye-Style Banking System Stress & Resilience Model' | 15 days ago, by Mehmet Berkay Durdu | Download |
This model does not have any ancestors.
This model does not have any descendants.
Download this model