Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
299 lines
7.0 KiB
TypeScript
299 lines
7.0 KiB
TypeScript
/**
|
||
* Copyright since 2025 Mifos Initiative
|
||
*
|
||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||
*/
|
||
|
||
import { Component, inject } from '@angular/core';
|
||
import { CommonModule, DecimalPipe } from '@angular/common';
|
||
import { MatDialogRef, MatDialogModule } from '@angular/material/dialog';
|
||
import { MatButtonModule } from '@angular/material/button';
|
||
import { MatTabsModule } from '@angular/material/tabs';
|
||
import { MatTooltipModule } from '@angular/material/tooltip';
|
||
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||
|
||
@Component({
|
||
selector: 'mifosx-crar-dialog',
|
||
standalone: true,
|
||
templateUrl: './crar-dialog.component.html',
|
||
styleUrls: ['./crar-dialog.component.scss'],
|
||
imports: [
|
||
CommonModule,
|
||
DecimalPipe,
|
||
MatDialogModule,
|
||
MatButtonModule,
|
||
MatTabsModule,
|
||
MatTooltipModule,
|
||
FaIconComponent
|
||
]
|
||
})
|
||
export class CrarDialogComponent {
|
||
private dialogRef = inject(MatDialogRef<CrarDialogComponent>);
|
||
|
||
activeTab: 'tier1' | 'tier2' | 'creditRisk' | 'marketRisk' | 'opRisk' = 'tier1';
|
||
|
||
/** Capital Adequacy computations */
|
||
readonly totalTier1 = 8284.8;
|
||
readonly totalTier2 = 1556.0;
|
||
readonly totalCapital = 9840.8;
|
||
readonly totalRWA = 58420;
|
||
readonly crar = 16.84;
|
||
readonly cet1Ratio = 12.42;
|
||
readonly tier1Ratio = 14.18;
|
||
readonly tier2Ratio = 2.66;
|
||
readonly capitalBuffer = 6.34;
|
||
|
||
/** Credit Risk RWA */
|
||
readonly totalCreditRWA = 47820.4;
|
||
/** Market Risk RWA */
|
||
readonly totalMarketRWA = 7005.0;
|
||
/** Operational Risk RWA */
|
||
readonly totalOpRWA = 3595.6;
|
||
|
||
tier1Capital = [
|
||
{
|
||
sl: '01',
|
||
name: 'Paid-up Equity Share Capital',
|
||
sub: 'Ordinary equity shares fully paid',
|
||
code: '5001-ESC',
|
||
category: 'CET1',
|
||
prev: '1,200.00',
|
||
curr: '1,200.00',
|
||
change: '\u2014'
|
||
},
|
||
{
|
||
sl: '02',
|
||
name: 'Statutory Reserves (Sec 17)',
|
||
sub: 'Reserves under Sec 17 of BR Act',
|
||
code: '5002-SR',
|
||
category: 'CET1',
|
||
prev: '2,840.60',
|
||
curr: '3,012.40',
|
||
change: '+171.80',
|
||
changeDir: 'up'
|
||
},
|
||
{
|
||
sl: '03',
|
||
name: 'Capital Reserve',
|
||
sub: 'Non-distributable capital reserves',
|
||
code: '5003-CR',
|
||
category: 'CET1',
|
||
prev: '680.20',
|
||
curr: '720.80',
|
||
change: '+40.60',
|
||
changeDir: 'up'
|
||
},
|
||
{
|
||
sl: '04',
|
||
name: 'Share Premium Account',
|
||
sub: 'Premium collected on equity issuance',
|
||
code: '5004-SP',
|
||
category: 'CET1',
|
||
prev: '1,480.00',
|
||
curr: '1,480.00',
|
||
change: '\u2014'
|
||
},
|
||
{
|
||
sl: '05',
|
||
name: 'Retained Earnings (Current Year)',
|
||
sub: 'Profit retained after dividend payout',
|
||
code: '5005-RE',
|
||
category: 'CET1',
|
||
prev: '1,060.40',
|
||
curr: '1,284.60',
|
||
change: '+224.20',
|
||
changeDir: 'up'
|
||
},
|
||
{
|
||
sl: '06',
|
||
name: 'PNCPS',
|
||
sub: 'Perpetual Non-Cumulative Preference Shares',
|
||
code: '5101-PNCPS',
|
||
category: 'AT1',
|
||
prev: '500.00',
|
||
curr: '500.00',
|
||
change: '\u2014'
|
||
},
|
||
{
|
||
sl: '07',
|
||
name: 'Perpetual Debt Instruments',
|
||
sub: 'Basel III compliant perpetual bonds',
|
||
code: '5102-PDI',
|
||
category: 'AT1',
|
||
prev: '800.00',
|
||
curr: '800.00',
|
||
change: '\u2014'
|
||
},
|
||
{
|
||
sl: '08',
|
||
name: 'Innovative PDI',
|
||
sub: 'Innovative perpetual debt instruments',
|
||
code: '5103-IPDI',
|
||
category: 'AT1',
|
||
prev: '200.00',
|
||
curr: '200.00',
|
||
change: '\u2014'
|
||
}
|
||
];
|
||
|
||
tier2Capital = [
|
||
{
|
||
sl: '01',
|
||
name: 'Subordinated Debt',
|
||
sub: 'Long-term subordinated bonds',
|
||
code: '6001-SD',
|
||
prev: '620.00',
|
||
curr: '620.00',
|
||
change: '\u2014'
|
||
},
|
||
{
|
||
sl: '02',
|
||
name: 'General Provisions & Loan Loss',
|
||
sub: 'General provisions for standard assets',
|
||
code: '6002-GP',
|
||
prev: '480.40',
|
||
curr: '520.60',
|
||
change: '+40.20',
|
||
changeDir: 'up'
|
||
},
|
||
{
|
||
sl: '03',
|
||
name: 'Revaluation Reserves',
|
||
sub: 'Reserves from asset revaluation (55%)',
|
||
code: '6003-RR',
|
||
prev: '184.20',
|
||
curr: '196.80',
|
||
change: '+12.60',
|
||
changeDir: 'up'
|
||
},
|
||
{
|
||
sl: '04',
|
||
name: 'Investment Fluctuation Reserve',
|
||
sub: 'IFR as per RBI guidelines',
|
||
code: '6004-IFR',
|
||
prev: '120.00',
|
||
curr: '142.60',
|
||
change: '+22.60',
|
||
changeDir: 'up'
|
||
},
|
||
{
|
||
sl: '05',
|
||
name: 'Upper Tier 2 Bonds',
|
||
sub: 'Upper Tier 2 capital instruments',
|
||
code: '6005-UTB',
|
||
prev: '80.00',
|
||
curr: '76.00',
|
||
change: '-4.00',
|
||
changeDir: 'dn'
|
||
}
|
||
];
|
||
|
||
creditRiskRWA = [
|
||
{
|
||
sl: '01',
|
||
name: 'Claims on Sovereign',
|
||
sub: 'Central & State Government exposures',
|
||
code: '7001-SOV',
|
||
rw: '0%',
|
||
gross: '18,420.60',
|
||
rwa: '0.00'
|
||
},
|
||
{
|
||
sl: '02',
|
||
name: 'Claims on Banks',
|
||
sub: 'Inter-bank exposures — scheduled banks',
|
||
code: '7002-BNK',
|
||
rw: '20%',
|
||
gross: '4,210.40',
|
||
rwa: '842.08'
|
||
},
|
||
{
|
||
sl: '03',
|
||
name: 'Corporate Loans Rated',
|
||
sub: 'Rated corporate term loans',
|
||
code: '7003-CORP',
|
||
rw: '100%',
|
||
gross: '12,840.20',
|
||
rwa: '12,840.20'
|
||
},
|
||
{
|
||
sl: '04',
|
||
name: 'Retail Portfolio',
|
||
sub: 'Retail loans — personal, auto, education',
|
||
code: '7004-RTL',
|
||
rw: '75%',
|
||
gross: '8,640.80',
|
||
rwa: '6,480.60'
|
||
},
|
||
{
|
||
sl: '05',
|
||
name: 'Housing Loans',
|
||
sub: 'Home loans — LTV based risk weight',
|
||
code: '7005-HLE',
|
||
rw: '35%',
|
||
gross: '6,820.40',
|
||
rwa: '2,387.14'
|
||
}
|
||
];
|
||
|
||
marketRiskRWA = [
|
||
{
|
||
sl: '01',
|
||
name: 'Interest Rate Risk',
|
||
sub: 'Duration & modified duration approach',
|
||
code: '8001-IRR',
|
||
approach: 'SDA',
|
||
cc: '284.60',
|
||
rwa: '3,557.50'
|
||
},
|
||
{
|
||
sl: '02',
|
||
name: 'Forex Risk',
|
||
sub: 'Net open position in foreign currencies',
|
||
code: '8002-FX',
|
||
approach: 'Std',
|
||
cc: '148.40',
|
||
rwa: '1,855.00'
|
||
},
|
||
{
|
||
sl: '03',
|
||
name: 'Equity Risk',
|
||
sub: 'Listed & unlisted equity exposures',
|
||
code: '8003-EQR',
|
||
approach: 'Std',
|
||
cc: '84.20',
|
||
rwa: '1,052.50'
|
||
},
|
||
{
|
||
sl: '04',
|
||
name: 'Commodity Price Risk',
|
||
sub: 'Commodity position risk charges',
|
||
code: '8004-CMR',
|
||
approach: 'Simplified',
|
||
cc: '24.80',
|
||
rwa: '310.00'
|
||
},
|
||
{
|
||
sl: '05',
|
||
name: 'Options Risk',
|
||
sub: 'Options portfolio — scenario analysis',
|
||
code: '8005-OPR',
|
||
approach: 'Scenario',
|
||
cc: '18.40',
|
||
rwa: '230.00'
|
||
}
|
||
];
|
||
|
||
/** Operational Risk — Basic Indicator Approach */
|
||
readonly opRiskGrossIncome = 2984.4;
|
||
readonly opRiskAlpha = 15;
|
||
readonly opRiskCapitalCharge = 447.66;
|
||
readonly opRiskRWA = 3595.6; // 447.66 × 12.5 = 5595.75 — using provided value
|
||
|
||
close(): void {
|
||
this.dialogRef.close();
|
||
}
|
||
}
|