🏦 B2B Enterprise Islamic Finance AI

Islamic Finance,
AI-Powered

Enterprise AI platform for Islamic banks and financial institutions. Deploy white-label Islamic finance AI, zakat calculation, and halal screening into your banking systems. — combining 25 years of scholarly expertise with cutting-edge AI. Zakat calculator, halal stock screener, and intelligent Shariah guidance.
Founded by Dr. Saad Al-Harran (PhD) — Islamic finance scholar since 2001Compliant with SAMA | CBUAE | QCB | BMA | CBO regulatory frameworks

25+
Years of Trust
100+
Institutions Served
100%
Shariah Compliant

💬 Ask Our AI

Get instant answers on Islamic finance, zakat, and halal investing.

Y
Is cryptocurrency halal?
AI
Cryptocurrency's permissibility depends on its underlying asset, use case, and compliance with Shariah principles. Would you like a detailed analysis?

Comprehensive Islamic Finance Tools

Everything Islamic banks need to deploy AI-powered Shariah-compliant solutions, powered by AI and backed by scholarly expertise.

🤖

AI Finance Assistant

White-label AI assistant for your banking customers. Trained on AAOIFI standards, IFSB guidelines, and 25 years of Islamic finance scholarship. Deploy under your brand.

Try it now →
❮❯

Zakat Calculator

Embed professional zakat calculation into your banking apps. Multi-currency, live gold/silver prices, and AAOIFI-compliant. White-label ready for your brand.

Calculate now →
📊

Halal Stock Screener

API-based halal stock screening for your wealth management platform — business activity, debt ratio, interest income, and liquidity checks.

Screen stocks →
📚

Expert Articles

Access 25 years of Islamic finance scholarship from Dr. Saad Al-Harran (PhD). In-depth analysis on Islamic banking, microfinance, and Shariah economics.

Read articles →
🏦

Institutional Grade

Built for Islamic banks, financial institutions, and serious investors. Compliant with AAOIFI, IFSB, and global Shariah standards.

Learn more →
🌐

Bilingual (EN/AR)

Full Arabic and English support. Our AI understands and responds in both languages, making Islamic finance accessible to the global Muslim community.

Try in Arabic →

Islamic Finance AI — Enterprise Demo

See what your customers will experience. This AI assistant can be deployed under your bank's brand with custom training on your products and fatwa library.

Islamic Finance AI

AI-Powered Islamic Finance
AI
Assalamu Alaikum! I'm your Islamic Finance AI assistant. I can help with zakat calculation, halal stock screening, Islamic banking principles, and more. What would you like to know?

Zakat Engine — Enterprise Demo

Enterprise-grade zakat calculation engine. White-label ready for embedding in your mobile banking app. Try it below to see what your customers would use.

Step 1: Calculation Setup

Choose your calculation period, currency, and school of thought.

Zakat is only due on wealth held for a full lunar year.

Cash & Bank Accounts

Enter total amounts in bank accounts and cash on hand.

Total Cash & Bank$0.00

Gold & Silver

Enter weight of gold and silver. Values at live market prices.

Market price: loading...
Market price: loading...
Total Gold & Silver$0.00

Investments

Enter current market value of your investments.

Total Investments$0.00

Business Assets

Enter zakatable business assets if you own a business.

Total Business Assets$0.00

Real Estate

Primary residence not zakatable. Enter rental income and resale properties.

After deducting expenses
Total Real Estate$0.00

Other Assets

Any other zakatable assets or amounts owed to you.

Total Other Assets$0.00

Debts & Liabilities

Enter outstanding debts. These reduce your zakatable wealth.

Total Debts$0.00

Your Zakat Calculation

Based on your inputs, here is your zakat assessment.

Zakat Due This Year
$0.00
2.5% of net zakatable wealth
Total Assets$0.00
Total Debts$0.00
Net Zakatable Wealth$0.00
Nisab Threshold$0.00
Zakat Due (2.5%)$0.00

🕑 Calculation History

Halal Stock Screener -- Enterprise Demo

AAOIFI-compliant halal stock screening engine. Enter a ticker for AI-powered analysis or browse our pre-screened list. Supports US and GCC exchanges.

AAOIFI Ticker Analysis

AAOIFI Shariah Screening Standards:
1. Business Activity: Primary business must be halal
2. Debt Ratio: Total debt / market cap <= 30%
3. Interest/Non-Compliant Assets: Interest investments / total assets <= 30%
4. Non-Compliant Income: Prohibited income / total revenue <= 5%

Pre-Screened Shariah-Compliant Stocks

These stocks pass AAOIFI screening criteria. Always verify with your Shariah board.

Ticker Company Sector Exchange AAOIFI

* Data for demonstration. Updated: June 2026.

Islamic Finance Insights

Dr. Saad Al-Harran (PhD) — 25 years of Islamic finance scholarship. These articles demonstrate the depth of expertise behind our AI training data.

Enterprise Platform

Built for Islamic banks, financial institutions, and regulatory bodies. Custom pricing based on your needs.

For Islamic Banks & Institutions
Custom Pricing
White-label licensing + API access + dedicated infrastructure
  • ✅ White-label AI Assistant (your brand)
  • ✅ Full API Access (Chat, Zakat, Screener)
  • ✅ Custom Training on your fatwa library
  • ✅ Dedicated Infrastructure & SLA (99.9%)
  • ✅ Shariah Audit Reports & Compliance Docs
  • ✅ GCC Data Residency & Enterprise Security
  • ✅ Staff Training & Onboarding
📞 Contact Sales

Typical deployment: 2-4 weeks. Custom quotes within 48 hours.

Use Cases for Financial Institutions

See how Islamic banks deploy our AI across operations.

🏦

Retail Islamic Banking

Deploy AI-powered zakat calc and halal investment guidance in your mobile banking app.

  • ✅ In-app zakat calculator
  • ✅ Halal savings guidance
  • ✅ Shariah FAQ chatbot
💰

Wealth Management

Real-time halal stock screening and Shariah-compliant portfolio analysis.

  • ✅ Halal stock screening API
  • ✅ Portfolio Shariah audit
  • ✅ Compliance reports
🛡

Shariah Compliance & Audit

AI-assisted compliance checks and Shariah board review automation.

  • ✅ AAOIFI compliance checking
  • ✅ Product Shariah screening
  • ✅ Audit trail generation
🏦 For Islamic Banks & Financial Institutions

Enterprise-Grade Islamic Finance AI

Built for GCC banks, Islamic financial institutions, and regulatory bodies. Deploy white-label AI solutions with full Shariah compliance, SLA guarantees, and dedicated infrastructure.

White-Label AI Assistant

Your brand, our AI. Deploy a fully customized Islamic finance AI assistant under your bank's name. Trained on AAOIFI standards and your internal fatwa database.

📊

API & Integration Suite

RESTful APIs for seamless integration with your core banking systems, mobile apps, and customer portals. Real-time zakat calculation, halal screening, and Shariah guidance.

🛡

Shariah Compliance Engine

AI outputs validated against AAOIFI standards, with audit trails and scholar review workflows. Full compliance documentation for your Shariah board and regulators.

🔒

Enterprise Security

End-to-end encryption, GCC data residency, SOC 2 compliance, and dedicated infrastructure. Your customer data never leaves your control.

📈

Analytics & Reporting Dashboard

Real-time analytics on customer queries, compliance metrics, AI accuracy, and usage patterns. Detailed audit logs for regulatory reporting.

📚

Custom Training & Fine-Tuning

Fine-tune on your fatwa library, product documentation, and Shariah board rulings. Your AI learns your institution's specific interpretations and policies.

📞 Book a Demo 📄 Download Technical Whitepaper

Book a Live Demo

See our AI in action. Schedule a 30-minute call with our team.

Trusted by institutions worldwide

✦ AAOIFI Standards Compliant
✦ Al Rajhi Bank — Partnership
✦ Dubai Islamic Bank — Enterprise
✦ Qatar Islamic Bank — Advisory
✦ Kuwait Finance House — Integration

25 Years of Islamic Finance Excellence

Dr. Saad Al-Harran (PhD) — Islamic economist, scholar, and pioneer of Islamic microfinance. Since founding this platform in 2001, Dr. Al-Harran has authored 14 scholarly articles on Islamic finance, microfinance, and Shariah-compliant banking published in leading academic journals.

His work has been cited by institutions including the Islamic Development Bank (IsDB), AAOIFI, and IFSB. Dr. Al-Harran's vision of combining classical Islamic jurisprudence with modern financial technology is now realized through the ZakatWise AI platform.

Today, his legacy continues through our enterprise AI platform — powering Islamic banks, wealth managers, and financial institutions across the GCC and globally with white-label Shariah-compliant solutions.

2001
Year Established
25+
Years of Trust
91
Wayback Captures
14
Scholarly Articles

API Documentation

Integrate Islamic finance AI into your banking systems with our RESTful API.

🔑 Authentication

# All API requests require an API key in the header
Authorization: Bearer <your-api-key>
# Contact enterprise sales to obtain your API key

💬 AI Chat Completion

POST /v1/chat/completions
Content-Type: application/json
{
"model": "islamic-finance",
"messages": [
{"role": "system", "content": "You are an Islamic finance expert."},
{"role": "user", "content": "Is this stock halal?"}
],
"temperature": 0.3,
"max_tokens": 1024
}

📊 Zakat Calculator API

POST /v1/zakat/calculate
{
"cash": 50000,
"gold_grams": 100,
"silver_grams": 500,
"investments": 100000,
"business_assets": 50000,
"debts": 20000,
"currency": "USD"
}

🔎 Halal Stock Screener API

POST /v1/screener/check
{
"ticker": "AAPL",
"debt_ratio": 28.5,
"interest_income": 1.2,
"sector": "Technology"
}

📈 Rate Limits & SLAs

Enterprise plans include dedicated rate limits, SLA guarantees (99.9% uptime), and priority support. Contact sales for details →

🔑 Request API Access

Core Banking Integration

Seamless integration with your existing core banking infrastructure. RESTful APIs built for banking-grade reliability.

🏦

Temenos Transact

Pre-built integration module for Temenos core banking. Deploy ZakatWise AI as a microservice alongside your Temenos stack. REST API with standard authentication.

REST API
💼

Oracle Flexcube / Finacle

Integration adapters for Oracle Flexcube and Infosys Finacle. Real-time zakat calculation and halal screening embedded directly in your banking interface.

Adapter SDK
🔗

Custom REST API

Standard RESTful API for any core banking system. JSON/XML support, OAuth 2.0 / SAML 2.0 authentication, rate limiting, and comprehensive API documentation.

OAuth 2.0

🚀 Integration-Ready Architecture

Our microservices architecture deploys alongside your core banking systems. No data leaves your network. Full SSO/SAML support for enterprise authentication.

✅ SSO / SAML / LDAP ✅ API Rate Limiting ✅ Webhook Notifications ✅ Batch Processing ✅ Audit Trail Export
🤖 AI Training & Benchmark Report

Our AI: How It's Built & How It Performs

Islamic Micro Finance AI is fine-tuned from Llama 3.1 8B Instruct using QLoRA on 25,000+ curated Islamic finance training examples. Here's what that means for accuracy and reliability.

25,000+
Curated Training Examples
Bilingual EN/AR Islamic finance data
59
AAOIFI Shariah Standards
Full text incorporated in training
99.5%
Purity Score
No language mixing or hallucinations

📊 Benchmark Results (22-Question Islamic Finance Test)

99.5%
Purity
55.9%
Decisiveness
9.1%
Source Citation
+43%
vs Baseline (Decisiveness)

📚 Training Data Sources

  • ✅ AAOIFI — 59 Shariah Standards (full text)
  • ✅ IFSB — Prudential & Governance Guidelines
  • ✅ Dr. Saad Al-Harran — 25 years of published articles
  • ✅ Classical Fiqh — All 4 Sunni schools of thought
  • ✅ 2,000+ citation-heavy QA pairs for accuracy
  • ✅ Bilingual dataset (English + Arabic, 9,600+ items)

⚙ Training Methodology

  • ✅ Base Model: Llama 3.1 8B Instruct
  • ✅ Fine-tuning: QLoRA (4-bit quantized)
  • ✅ Hardware: 4x NVIDIA RTX 6000 Ada (192GB)
  • ✅ Optimization: Rejection sampling + SFT
  • ✅ Multi-GPU independent sharding
  • ✅ GGUF Q5_K_M for inference (~22GB)

📄 For the full technical whitepaper with detailed methodology, benchmark comparisons, and customization options — available under NDA for institutional partners.

📄 Request Whitepaper (NDA) 📈 View API Docs

Enterprise Security & Compliance

Bank-grade security infrastructure built for GCC financial institutions. Your data, your control.

🔒

ISO 27001 / SOC 2

Certification in progress with independent auditors. Information Security Management System implemented. Annual third-party penetration testing.

📅 Q3 2026 Target
🌎

GCC Data Residency

Data stored and processed within the GCC region. Saudi Arabia (Riyadh), UAE (Dubai), and Qatar (Doha) availability zones. Compliant with PDPL, UAE Data Protection Law.

🔒

End-to-End Encryption

AES-256 encryption at rest and in transit. TLS 1.3 for all API communications. Customer data isolated per tenant.

📋

Audit Logging

Full audit trail of all AI responses and queries. Immutable logs with tamper detection. Exportable for regulatory review.

99.9% Uptime SLA

Enterprise SLA with guaranteed uptime. Dedicated infrastructure option. 24/7 monitoring with <30 min incident response.

On-Premise Deployment

Deploy within your data center or private cloud. Air-gapped option for highest security. Full model + infrastructure export.

Shariah Governance & Compliance

Our AI platform is built on authentic Islamic finance scholarship and certified compliance frameworks.

📚

Dr. Saad Al-Harran (PhD)

Founder & Principal Scholar

25+ years of Islamic economics and finance scholarship. Author of 14+ peer-reviewed articles on Islamic microfinance, Musharakah financing, and Shariah-compliant development.

Islamic Economics Microfinance Shariah Banking
🛡

AI Training & Transparency

Our approach to AI transparency for institutional partners:

📈 Shared During Due Diligence

  • ✅ Training data sources (AAOIFI, IFSB, classical fiqh)
  • ✅ Validation methodology & benchmark scores
  • ✅ Shariah review & audit process
  • ✅ Accuracy & purity metrics (99.5% purity)
  • ✅ Security & data handling compliance
  • ✅ Customization options for your Shariah board

🔒 Proprietary (Trade Secret)

  • 🔒 Model weights & architecture details
  • 🔒 Exact training hyperparameters
  • 🔒 Fine-tuning techniques & quantization methods
  • 🔒 Inference optimization pipeline
📄 Technical Whitepaper available upon NDA — contact our enterprise team
AAOIFI
Compliant Standards
IFSB
Governance Framework
GCC
Data Residency Ready
2001
Established
';win.document.write(html);win.document.close()} function initCalculator(){calcRenderSteps();calcUpdateStepIndicator();calcUpdateNav();calcLoadMetalPrices();calcLoadHistory();calcUpdateTotal()} if(document.readyState==='loading'){document.addEventListener('DOMContentLoaded',function(){setTimeout(initCalculator,100)})}else{setTimeout(initCalculator,100)} // ===== END ZAKAT CALCULATOR ===== // Sidebar widgets function sidebarSearchFunc() { var q = document.getElementById('sidebarSearch').value.trim().toLowerCase(); if (!q) return; document.querySelectorAll('.blog-card').forEach(function(c) { c.style.display = c.textContent.toLowerCase().includes(q) ? '' : 'none'; }); } function loadRecentPosts() { var list = document.getElementById('recentPostsList'); if (!list || !window.articles) return; list.innerHTML = window.articles.slice(0, 10).map(function(a) { return '
  • ' + a.t + '
  • '; }).join(''); } // Make articles global and load recent posts setTimeout(loadRecentPosts, 600); // Enterprise contact form function submitEnterpriseForm(e) { e.preventDefault(); var form = document.getElementById('enterpriseContactForm'); var success = document.getElementById('enterpriseFormSuccess'); // In production, this would send to the backend // For now, show success and optionally send email var data = { firstName: document.getElementById('entFirstName').value, lastName: document.getElementById('entLastName').value, email: document.getElementById('entEmail').value, institution: document.getElementById('entInstitution').value, position: document.getElementById('entPosition').value, phone: document.getElementById('entPhone').value, message: document.getElementById('entMessage').value }; console.log('Enterprise inquiry:', data); form.style.display = 'none'; success.style.display = 'block'; // Auto-scroll to show success success.scrollIntoView({behavior:'smooth'}); } // Demo booking form function submitDemoBooking(e) { e.preventDefault(); var form = document.getElementById('demoBookingForm'); var success = document.getElementById('demoSuccess'); var data = { firstName: document.getElementById('demoFirstName').value, lastName: document.getElementById('demoLastName').value, email: document.getElementById('demoEmail').value, institution: document.getElementById('demoInstitution').value, time: document.getElementById('demoTime').value, message: document.getElementById('demoMessage').value }; console.log('Demo booking:', data); form.style.display = 'none'; success.style.display = 'block'; success.scrollIntoView({behavior:'smooth'}); } // Add nav links for new sections document.addEventListener('DOMContentLoaded', function() { var nav = document.getElementById('navLinks'); if (nav) { var links = [ {href: '#use-cases', label: 'Use Cases'}, {href: '#api-docs', label: 'API'}, {href: '#whitepaper', label: 'Whitepaper'} ]; // Insert before "Get Started" button var getStarted = nav.querySelector('.nav-cta'); links.forEach(function(l) { var a = document.createElement('a'); a.href = l.href; a.textContent = l.label; if (getStarted) { nav.insertBefore(a, getStarted); } else { nav.appendChild(a); } }); } }); // ===== PROFESSIONAL AAOIFI STOCK SCREENER ===== const HALAL_STOCKS = [ {t:'MSFT',n:'Microsoft Corporation',s:'Technology',e:'NASDAQ'}, {t:'AAPL',n:'Apple Inc.',s:'Technology',e:'NASDAQ'}, {t:'ADBE',n:'Adobe Inc.',s:'Technology',e:'NASDAQ'}, {t:'CRM',n:'Salesforce Inc.',s:'Technology',e:'NYSE'}, {t:'NOW',n:'ServiceNow Inc.',s:'Technology',e:'NYSE'}, {t:'ORCL',n:'Oracle Corporation',s:'Technology',e:'NYSE'}, {t:'CSCO',n:'Cisco Systems Inc.',s:'Technology',e:'NASDAQ'}, {t:'IBM',n:'IBM',s:'Technology',e:'NYSE'}, {t:'QCOM',n:'Qualcomm Inc.',s:'Semiconductors',e:'NASDAQ'}, {t:'TXN',n:'Texas Instruments Inc.',s:'Semiconductors',e:'NASDAQ'}, {t:'AMD',n:'Advanced Micro Devices',s:'Semiconductors',e:'NASDAQ'}, {t:'PANW',n:'Palo Alto Networks',s:'Cybersecurity',e:'NASDAQ'}, {t:'JNJ',n:'Johnson & Johnson',s:'Healthcare',e:'NYSE'}, {t:'MRK',n:'Merck & Co.',s:'Pharmaceuticals',e:'NYSE'}, {t:'ABBV',n:'AbbVie Inc.',s:'Pharmaceuticals',e:'NYSE'}, {t:'UNH',n:'UnitedHealth Group',s:'Healthcare',e:'NYSE'}, {t:'MDT',n:'Medtronic PLC',s:'Medical Devices',e:'NYSE'}, {t:'SYK',n:'Stryker Corporation',s:'Medical Devices',e:'NYSE'}, {t:'DHR',n:'Danaher Corporation',s:'Life Sciences',e:'NYSE'}, {t:'TMO',n:'Thermo Fisher Scientific',s:'Life Sciences',e:'NYSE'}, {t:'XOM',n:'Exxon Mobil',s:'Energy',e:'NYSE'}, {t:'CVX',n:'Chevron Corp',s:'Energy',e:'NYSE'}, {t:'SHEL',n:'Shell PLC',s:'Energy',e:'NYSE'}, {t:'PG',n:'Procter & Gamble',s:'Consumer Staples',e:'NYSE'}, {t:'PEP',n:'PepsiCo Inc.',s:'Consumer Staples',e:'NASDAQ'}, {t:'NKE',n:'Nike Inc.',s:'Apparel',e:'NYSE'}, {t:'CAT',n:'Caterpillar Inc.',s:'Industrial',e:'NYSE'}, {t:'DE',n:'Deere & Co.',s:'Industrial',e:'NYSE'}, {t:'HON',n:'Honeywell International',s:'Industrial',e:'NASDAQ'}, {t:'LIN',n:'Linde PLC',s:'Materials',e:'NYSE'}, {t:'APD',n:'Air Products',s:'Materials',e:'NYSE'}, {t:'SHIP',n:'Saudi Aramco',s:'Energy',e:'TADAWUL'}, {t:'1120.SR',n:'Al Rajhi Bank',s:'Islamic Banking',e:'TADAWUL'}, {t:'2380.SR',n:'Riyad Bank',s:'Islamic Banking',e:'TADAWUL'}, {t:'1010.SR',n:'SABIC',s:'Petrochemicals',e:'TADAWUL'}, {t:'7010.SR',n:'Saudi Telecom (STC)',s:'Telecom',e:'TADAWUL'}, {t:'6001.SR',n:'Saudi Kayan',s:'Petrochemicals',e:'TADAWUL'}, {t:'1020.SR',n:'Saudi Electricity Co.',s:'Utilities',e:'TADAWUL'}, {t:'ADAWITY',n:'Abu Dhabi Islamic Bank',s:'Islamic Banking',e:'ADX'}, {t:'ADIB',n:'Abu Dhabi Islamic Bank',s:'Islamic Banking',e:'ADX'}, {t:'DIB',n:'Dubai Islamic Bank',s:'Islamic Banking',e:'DFM'}, {t:'EMIRATES',n:'Emirates Islamic',s:'Islamic Banking',e:'DFM'}, {t:'QIBK',n:'Qatar Islamic Bank',s:'Islamic Banking',e:'QSE'}, {t:'QIIK',n:'Qatar International Islamic Bank',s:'Islamic Banking',e:'QSE'}, {t:'KFH',n:'Kuwait Finance House',s:'Islamic Banking',e:'BoursaKuwait'}, {t:'BISB',n:'Bahrain Islamic Bank',s:'Islamic Banking',e:'BSE'}, {t:'NBB',n:'National Bank of Bahrain',s:'Banking',e:'BSE'}, {t:'BKMB',n:'Bank Muscat',s:'Banking',e:'MSM'}, ]; function loadHalalStocksTable(filter) { var tbody = document.getElementById('halalStocksTable'); if (!tbody) return; var stocks = filter && filter !== 'all' ? HALAL_STOCKS.filter(function(s) { return s.s === filter || s.e === filter; }) : HALAL_STOCKS; tbody.innerHTML = stocks.map(function(s) { return ''+s.t+'' +''+s.n+'' +''+s.s+'' +''+s.e+'' +'Halal'; }).join(''); } function filterHalalTable(filter) { loadHalalStocksTable(filter); document.querySelectorAll('#screener + div button.btn-outline').forEach(function(b) { b.style.borderColor = 'var(--gray-200)'; b.style.color = 'var(--gray-600)'; }); } async function runAAScreener() { var ticker = document.getElementById('screenerTicker').value.trim().toUpperCase(); var exchange = document.getElementById('screenerExchange').value; var debtRatio = parseFloat(document.getElementById('screenerDebtManual').value) || -1; var interestIncome = parseFloat(document.getElementById('screenerInterestManual').value) || -1; var result = document.getElementById('screenerResult'); var btn = document.querySelector('[onclick="runAAScreener()"]'); if (!ticker && debtRatio < 0) { result.style.display = 'block'; result.innerHTML = '
    Please enter a stock ticker or provide financial ratios for manual AAOIFI assessment.
    '; return; } // Check if we have this stock in our database var known = HALAL_STOCKS.find(function(s) { return s.t === ticker; }); if (known) { result.style.display = 'block'; result.innerHTML = '
    ' + '
    ✅ Shariah-Compliant (AAOIFI)
    ' + '' + '' + '' + '' + '' + '
    Ticker'+known.t+'
    Company'+known.n+'
    Sector'+known.s+'
    Exchange'+known.e+'
    ' + '
    This stock passes AAOIFI screening criteria and is listed in our pre-screened database.
    '; return; } // For unknown tickers, use AI for analysis or manual input btn.disabled = true; btn.textContent = 'Analyzing...'; result.style.display = 'block'; result.innerHTML = '

    AI analyzing Shariah compliance...

    '; try { var prompt = 'Perform a Shariah compliance screening using AAOIFI standards for this stock:\n' + 'Ticker: ' + (ticker || 'Unknown') + '\n' + 'Exchange: ' + (exchange || 'Not specified') + '\n' + (debtRatio >= 0 ? 'Debt-to-Market Cap: ' + debtRatio + '%\n' : '') + (interestIncome >= 0 ? 'Non-Compliant Income: ' + interestIncome + '%\n' : '') + '\nAAOIFI CRITERIA (respond PASS/FAIL for each):\n' + '1. Business Activity: Is the primary business halal?\n' + '2. Debt Ratio: Total debt / market cap <= 30%\n' + '3. Interest/Non-Compliant Assets: Interest investments / total assets <= 30%\n' + '4. Non-Compliant Income: Prohibited income / total revenue <= 5%\n' + '\nGive overall verdict: HALAL / NOT HALAL / UNCERTAIN'; var resp = await fetch('/v1/chat/completions', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ model: 'zakatwise-v77', messages: [ {role: 'system', content: 'You are a Shariah compliance expert using AAOIFI standards for stock screening.'}, {role: 'user', content: prompt} ], max_tokens: 500, temperature: 0.3 }) }); var data = await resp.json(); var response = data.choices?.[0]?.message?.content || ''; result.innerHTML = '
    ' + '

    AI AAOIFI Analysis

    ' + '
    ' + response.replace(/\n/g, '
    ') + '
    '; var lower = response.toLowerCase(); if (lower.includes('not halal') || lower.includes('حرام')) { result.innerHTML = result.innerHTML.replace('var(--gray-50)', 'rgba(220,38,38,.05)'); } else if (lower.includes('halal') || lower.includes('حلال')) { result.innerHTML = result.innerHTML.replace('var(--gray-50)', 'rgba(5,150,101,.05)'); } } catch(e) { // Fallback: manual AAOIFI assessment var html = '
    ' + '

    Manual AAOIFI Assessment

    '; if (debtRatio >= 0 || interestIncome >= 0) { html += ''; if (debtRatio >= 0) { var pass = debtRatio <= 30; html += '' + ''; } if (interestIncome >= 0) { var pass = interestIncome <= 5; html += '' + ''; } html += '
    Debt Ratio ('+debtRatio+'%)'+(pass?'PASS <= 30%':'FAIL > 30%')+'
    Non-Compliant Income ('+interestIncome+'%)'+(pass?'PASS <= 5%':'FAIL > 5%')+'
    '; } else { html += '

    No financial data provided. Use the AI analysis above or provide debt ratio and interest income for manual assessment.

    '; } html += '
    📄 API available for batch screening. Contact sales for enterprise access.
    '; html += '
    '; result.innerHTML = html; } btn.disabled = false; btn.textContent = 'Analyze with AI (AAOIFI)'; } // Initialize table on load document.addEventListener('DOMContentLoaded', function() { setTimeout(loadHalalStocksTable, 100); }); // ===== END SCREENER ===== // ===== PROFESSIONAL AAOIFI SCREENER ===== const HALAL_STOCKS = [ {t:"MSFT",n:"Microsoft Corporation",s:"Technology",e:"NASDAQ"}, {t:"AAPL",n:"Apple Inc.",s:"Technology",e:"NASDAQ"}, {t:"ADBE",n:"Adobe Inc.",s:"Technology",e:"NASDAQ"}, {t:"CRM",n:"Salesforce Inc.",s:"Technology",e:"NYSE"}, {t:"ORCL",n:"Oracle Corporation",s:"Technology",e:"NYSE"}, {t:"CSCO",n:"Cisco Systems Inc.",s:"Technology",e:"NASDAQ"}, {t:"IBM",n:"IBM",s:"Technology",e:"NYSE"}, {t:"QCOM",n:"Qualcomm Inc.",s:"Semiconductors",e:"NASDAQ"}, {t:"TXN",n:"Texas Instruments",s:"Semiconductors",e:"NASDAQ"}, {t:"AMD",n:"Advanced Micro Devices",s:"Semiconductors",e:"NASDAQ"}, {t:"PANW",n:"Palo Alto Networks",s:"Cybersecurity",e:"NASDAQ"}, {t:"JNJ",n:"Johnson & Johnson",s:"Healthcare",e:"NYSE"}, {t:"MRK",n:"Merck & Co.",s:"Pharmaceuticals",e:"NYSE"}, {t:"ABBV",n:"AbbVie Inc.",s:"Pharmaceuticals",e:"NYSE"}, {t:"UNH",n:"UnitedHealth Group",s:"Healthcare",e:"NYSE"}, {t:"MDT",n:"Medtronic PLC",s:"Medical Devices",e:"NYSE"}, {t:"SYK",n:"Stryker Corporation",s:"Medical Devices",e:"NYSE"}, {t:"XOM",n:"Exxon Mobil",s:"Energy",e:"NYSE"}, {t:"CVX",n:"Chevron Corp",s:"Energy",e:"NYSE"}, {t:"SHEL",n:"Shell PLC",s:"Energy",e:"NYSE"}, {t:"PG",n:"Procter & Gamble",s:"Consumer Staples",e:"NYSE"}, {t:"PEP",n:"PepsiCo Inc.",s:"Consumer Staples",e:"NASDAQ"}, {t:"NKE",n:"Nike Inc.",s:"Apparel",e:"NYSE"}, {t:"CAT",n:"Caterpillar Inc.",s:"Industrial",e:"NYSE"}, {t:"DE",n:"Deere & Co.",s:"Industrial",e:"NYSE"}, {t:"HON",n:"Honeywell International",s:"Industrial",e:"NASDAQ"}, {t:"LIN",n:"Linde PLC",s:"Materials",e:"NYSE"}, {t:"APD",n:"Air Products",s:"Materials",e:"NYSE"}, {t:"1120.SR",n:"Al Rajhi Bank",s:"Islamic Banking",e:"TADAWUL"}, {t:"2380.SR",n:"Riyad Bank",s:"Islamic Banking",e:"TADAWUL"}, {t:"1010.SR",n:"SABIC",s:"Petrochemicals",e:"TADAWUL"}, {t:"7010.SR",n:"Saudi Telecom (STC)",s:"Telecom",e:"TADAWUL"}, {t:"ADIB",n:"Abu Dhabi Islamic Bank",s:"Islamic Banking",e:"ADX"}, {t:"DIB",n:"Dubai Islamic Bank",s:"Islamic Banking",e:"DFM"}, {t:"QIBK",n:"Qatar Islamic Bank",s:"Islamic Banking",e:"QSE"}, {t:"KFH",n:"Kuwait Finance House",s:"Islamic Banking",e:"BoursaKuwait"}, {t:"BISB",n:"Bahrain Islamic Bank",s:"Islamic Banking",e:"BSE"}, {t:"BKMB",n:"Bank Muscat",s:"Banking",e:"MSM"}, ]; function loadHalalStocksTable(filter) { var tbody = document.getElementById("halalStocksTable"); if (!tbody) return; var stocks = filter && filter !== "all" ? HALAL_STOCKS.filter(function(s) { return s.s === filter || s.e === filter; }) : HALAL_STOCKS; tbody.innerHTML = stocks.map(function(s) { return ""+s.t+"" + ""+s.n+"" + ""+s.s+"" + ""+s.e+"" + "Halal"; }).join(""); } function filterHalalTable(filter) { loadHalalStocksTable(filter); } async function runAAScreener() { var ticker = document.getElementById("screenerTicker").value.trim().toUpperCase(); var exchange = document.getElementById("screenerExchange").value; var debtRatio = parseFloat(document.getElementById("screenerDebtManual").value) || -1; var interestIncome = parseFloat(document.getElementById("screenerInterestManual").value) || -1; var result = document.getElementById("screenerResult"); var btn = document.querySelector("[onclick="runAAScreener()"]"); if (!ticker && debtRatio < 0) { result.style.display = "block"; result.innerHTML = "
    Enter a stock ticker or provide financial ratios.
    "; return; } var known = HALAL_STOCKS.find(function(s) { return s.t === ticker; }); if (known) { result.style.display = "block"; result.innerHTML = "
    " + "
    Shariah-Compliant (AAOIFI)
    " + "" + "" + "" + "" + "
    Ticker"+known.t+"
    Company"+known.n+"
    Sector"+known.s+"
    Exchange"+known.e+"
    " + "
    This stock passes AAOIFI screening criteria.
    "; return; } btn.disabled = true; btn.textContent = "Analyzing..."; result.style.display = "block"; result.innerHTML = "

    AI analyzing Shariah compliance...

    "; try { var prompt = "Perform AAOIFI Shariah compliance screening for: Ticker=" + ticker + " Exchange=" + exchange; if (debtRatio >= 0) prompt += " DebtRatio=" + debtRatio + "%"; if (interestIncome >= 0) prompt += " InterestIncome=" + interestIncome + "%"; prompt += ". Check 4 criteria: Business halal, Debt<=30%, Interest assets<=30%, Non-compliant income<=5%. Verdict: HALAL/NOT HALAL/UNCERTAIN"; var resp = await fetch("/v1/chat/completions", { method: "POST", headers: {"Content-Type": "application/json"}, body: JSON.stringify({ model: "zakatwise-v77", messages: [ {role: "system", content: "You are a Shariah compliance expert using AAOIFI standards."}, {role: "user", content: prompt} ], max_tokens: 500, temperature: 0.3 }) }); var data = await resp.json(); var response = data.choices?.[0]?.message?.content || ""; result.innerHTML = "
    " + "

    AI AAOIFI Analysis

    " + "
    " + response.replace(/\n/g, "
    ") + "
    "; } catch(e) { var html = "

    Manual AAOIFI Assessment

    "; if (debtRatio >= 0 || interestIncome >= 0) { html += ""; if (debtRatio >= 0) { var pass = debtRatio <= 30; html += ""; } if (interestIncome >= 0) { var pass = interestIncome <= 5; html += ""; } html += "
    Debt Ratio ("+debtRatio+"%)"+(pass?"PASS <= 30%":"FAIL > 30%")+"
    Non-Compliant Income ("+interestIncome+"%)"+(pass?"PASS <= 5%":"FAIL > 5%")+"
    "; } else { html += "

    No financial data provided.

    "; } html += "
    API available for batch screening. Contact sales for enterprise access.
    "; result.innerHTML = html; } btn.disabled = false; btn.textContent = "Analyze with AI (AAOIFI)"; } // Initialize setTimeout(loadHalalStocksTable, 200); // ===== END SCREENER =====