Writing

Data Engineering, Data Science, Quantitative Analytics and Islamic Finance

In-depth writing on data engineering, quantitative finance, Islamic capital markets, and building production data systems in financial services.

Machine Learning, Herding, and Permissible Trading Signals in Islamic Equities

Herding behavior when investors abandon their own analysis to follow the crowd is measurable, predictable, and more structurally pronounced in Islamic equity markets due to a smaller eligible universe and homogeneous investor base. Neural networks and sentiment analysis detect it earlier than classical regression. Here's the full framework, the code, and a complete backtested scenario.

Read →

Beyond Normal: Cornish-Fisher Expansion and Tail Risk in Islamic Equity Portfolios

Standard VaR assumes normally distributed returns. Islamic equity portfolios structurally screened, lower-leverage, sector-concentrated have return distributions that are decidedly non-normal. The Cornish-Fisher expansion within a four-moment framework gives you a more honest picture of tail risk. Here's the mathematics, a full Python implementation, and what it reveals about Islamic equity indices under market stress.

Read →

Breaking CAPM: How Maqasid Al-Shariah Rewires the Asset Pricing Model

The Capital Asset Pricing Model has a foundational riba problem its risk-free rate is built on interest. The Maqasid al-Shariah Compliance Asset Pricing Model replaces that foundation with Islamic wealth distribution logic and investor sentiment. Here's the mathematics, the implications, and a Python implementation.

Read →

Shariah-Compliant Portfolio Optimization: When Fuzzy Logic Meets Islamic Finance

Classical portfolio theory assumes probabilistic risk but Shariah compliance introduces hard binary constraints that break standard optimizers. A genetic algorithm approach using fuzzy semi-spreads offers a principled alternative. Here's why it matters, and how it works.

Read →

The 33% Problem: How Quantitative Shariah Screening Shapes Malaysian Portfolio Performance

Shariah screening applies hard binary thresholds 33% on debt ratios, 33% on cash and receivables, 5% on haram revenue. These aren't soft guidelines. They're algorithmic cutoffs that restructure the investable universe and statistically reshape portfolio yield and volatility. Here's the data, the code, and what it means for fund managers.

Read →

CERN Is Building the Opposite of GPT And It Might Be More Important

While the AI industry races to make models bigger, CERN is burning microscopic neural networks directly into silicon to filter 40,000 exabytes of particle collision data per year in under 50 nanoseconds. The lessons reach far beyond physics.

Read →

Data Governance Is Not a Project. It's a Practice.

Most data governance initiatives fail not because of bad technology, but because they're treated as a one-time implementation rather than an ongoing discipline. Here's what actually works in a regulated financial services environment.

Read →

Implementing SCD Type 2 in Pure Polars

Slowly changing dimensions are a solved problem but most implementations lean on Spark or SQL. Here's how to do it cleanly in Polars with about 60 lines of Python.

Read →