feat: production-grade IFRS 17 + NAICOM/Reinsurance/USSD engines — full DB integration + bidirectional data#74
Open
devin-ai-integration[bot] wants to merge 2 commits into
Conversation
… onerous testing, CSM rollforward, scenarios, reinsurance held, transition, ERP sync - Replace simplified IFRS 17 with 12 production-grade routes - Add CBN yield curve (7 terms) + illiquidity premium for discounting - Implement all 3 measurement models: PAA (short-duration), GMM (long-duration), VFA (investment-linked) - Add onerous contract testing: loss component when CSM goes negative (Marine Cargo correctly flagged) - Period-over-period CSM rollforward waterfall with coverage unit release pattern - 4 probability-weighted cashflow scenarios per group (Base, Adverse, Favourable, Catastrophe/Pandemic) - Reinsurance held integration (6 treaties: Africa Re, Swiss Re, Munich Re, Lloyds) - IFRS 4 → IFRS 17 transition adjustments (full retrospective, modified, fair value) - Multi-period P&L (Insurance Service Result) across 4 quarters - ERP sync route pushes IFRS 17 journals to ERPNext - Trial balance with NAICOM-FIN-TB-IFRS17 format - Dedicated frontend dashboard with 7 tabs: Overview, CSM Rollforward, Scenarios, Reinsurance, Transition, P&L, Discount Curves - 8 contract groups across Motor, Health, Life, Property, Marine, Cyber portfolios - Nav link added under Actuarial & Reinsurance Co-Authored-By: Patrick Munis <pmunis@gmail.com>
Contributor
Author
Original prompt from Patrick
|
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
…s, 12 DB tables, bidirectional data exchange NAICOM Automated Reports: - reportingSchedule reads from naicom_reporting_schedule DB table (12 entries) - dataExchange: bidirectional with outbound/inbound tracking - sendData: aggregates real platform data (premiums, claims, reinsurance, IFRS 17 CSM) - receiveData: ingests NAICOM notifications - penalties: tracks outstanding regulatory penalties (₦1.5M) - integratedReport: pulls from ALL subsystems (8 sections, XBRL format, submission-ready) Reinsurance Cession Engine: - calculateCession reads treaty params from DB (not hardcoded ratios) - treatyList with summary (active count, total capacity, expiring in 90 days) - portfolio with settlements aggregation - bordereaux: monthly statements to reinsurers (draft/sent/reconciled) - generateBordereaux: creates from actual cession data - claimsRecovery: ₦84.7M recoverable, ₦15.5M recovered, ₦69.2M outstanding - initiateRecovery: creates recovery notification from treaty share - settlements: 8 entries with overdue tracking (₦25M overdue) - facultative: ₦1.8B total sum assured across 5 placements - placeFacultative: creates open slip for reinsurance market USSD Gateway: - 8 menu options (added Renew Policy + Mini Statement) - PIN verification for sensitive operations (account, payments, renewal) - 3-minute session timeout with automatic expiry - Real DB integration: policy lookup, claim filing, payment initiation - Transaction references tracked in session log - ussd.analytics: daily metrics from ussd_analytics table - ussd.sessionHistory: full session audit trail Co-Authored-By: Patrick Munis <pmunis@gmail.com>
Contributor
Author
Testing Results: 9/9 API Tests PASSED, CI 54/54 GreenTested all 15 new production-grade routes (NAICOM, Reinsurance, USSD) via curl against localhost:5002 with PostgreSQL backend. NAICOM Automated Reports
Reinsurance Cession Engine
USSD Gateway
Minor Issues (non-blocking)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Production-grade implementation of 4 major insurance engines, replacing all hardcoded stubs with real PostgreSQL-backed routes.
IFRS 17 Engine (12 routes, 7 tables)
/ifrs17NAICOM Automated Reports (6 routes)
naicom.reportingSchedule— reads fromnaicom_reporting_schedule(12 entries, penalty tracking)naicom.dataExchange— bidirectional exchange log (outbound filings + inbound responses)naicom.sendData— aggregates real platform data (premiums, claims, IFRS 17 CSM, reinsurance) for submissionnaicom.receiveData— ingests NAICOM notificationsnaicom.penalties— ₦1.5M outstanding penalties trackednaicom.integratedReport— pulls from ALL subsystems (8 sections, XBRL format, capital adequacy 185%)Reinsurance Cession Engine (10 routes)
calculateCessionreads treaty params from DB (not hardcoded); detects facultative placement needed; validates NAICOM 15% minimum retentionbordereaux/generateBordereaux— monthly statements to reinsurers (draft/sent/reconciled)claimsRecovery/initiateRecovery— ₦84.7M recoverable, ₦69.2M outstandingsettlements— overdue tracking (₦25M overdue, ₦463M pending)facultative/placeFacultative— ₦1.8B total for risks exceeding treaty capacityUSSD Gateway (3 routes, 8 menu levels)
ussd.analytics— 342 sessions/day, 45s avg durationussd.sessionHistory— full audit trailSchema: 12+ new tables
naicom_reporting_schedule,naicom_data_exchange,naicom_penalties,reinsurance_bordereaux,reinsurance_claims_recovery,reinsurance_settlements,reinsurance_facultative,ussd_session_log,ussd_pins,ussd_analytics,ifrs17_*(7 tables)Link to Devin session: https://app.devin.ai/sessions/0475192a778b45cea30202f85ad52b63