# 🕌 Shira: Shariah Compliance Prediction Model
> **Real-time Islamic finance compliance screening for 605 Indonesian companies using machine learning**
## 📊 Executive Summary
This project delivers a **production-ready machine learning system** that predicts Shariah (Islamic finance) compliance for Indonesian Stock Exchange (IDX) listed companies using **real financial data (2020-2023)** from 605 companies.
### ✨ Key Achievement
Transformed the project from synthetic data to **real Indonesian financial statements** (89,243 records) and trained an XGBoost model achieving:
| Metric | Value | Status |
|--------|-------|--------|
| **Test Accuracy** | 92.00% | ✅ Validated |
| **ROC-AUC** | 92.83% | ✅ High Confidence |
| **Training Companies** | 496 | ✅ Real IDX Data |
| **Features Engineered** | 12 Shariah-compliant ratios | ✅ Domain-aligned |
| **Compliance Rate** | 22.2% compliant | ✅ Realistic for Indonesia |
| **Model Size** | 4.2 MB | ✅ Lightweight |
---
## 🎯 Business Problem & Solution
### The Problem
- Indonesian Islamic finance requires **Shariah compliance screening** for all investments
- Manual audits are **expensive, slow, and subjective**
- Regulators need **consistent, auditable, transparent** decision-making
- Current rules-based approaches miss **nuanced financial patterns**
### The Solution
**ML-powered compliance screening** that:
- ✅ Analyzes 12 financial ratios per company
- ✅ Applies OJK/DSN-MUI Islamic finance rules
- ✅ Provides confidence scores and explanations
- ✅ Processes 605 companies in 60%) OR (Interest Income Ratio > 10%) OR ...
→ Non-Compliant (FAIL)
ELSE IF (All Financial Rules Pass)
→ Compliant (PASS)
ELSE
→ Borderline (Manual Review)
```
---
## 📈 Results & Insights
### Compliance Distribution
```
Total Companies Analyzed: 495
✅ Shariah Compliant: 110 companies (22.2%)
❌ Non-Compliant: 385 companies (77.8%)
Compliance Breakdown:
├── By Sector Compliance:
│ ├── Oil & Gas: 1/5 (20.0%)
│ ├── Other: …