Writing

Data Engineering, Data Science, Quantitative Analytics and Quant Finance

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

27 posts 70 topics 4 live reports

27 posts

Latest post

CUDA C/C++ for Quants: From Hello World to Pricing on the GPU

A researcher's hands-on introduction to GPU programming with CUDA C/C++, written for quantitative finance. We build from Hello World through kernels, blocks, threads, indexing and shared memory and discover why the humble 1-D stencil is really a finite-difference PDE pricer.

Read

Shariah-Compliant Algorithmic Trading Formula Sheet

A complete reference sheet adapting the eight core algorithmic trading metrics — Sharpe Ratio, VaR, CVaR, Sortino Ratio, Expectancy, MAE, Drawdown, and Calmar Ratio — for Shariah-compliant portfolios. Every formula is reworked to eliminate riba-based inputs, incorporate purification adjustments, and reflect Islamic risk principles. Full Python implementation with computed outputs.

Read

Towards a Modern Takaful Data Platform

A practitioner's perspective on cloud-native architecture, AI activation, and the future of Islamic insurance data infrastructure.

Read

Building the Quant Stack from Zero to One

A complete blueprint for designing and deploying a systematic trading system: data pipeline, backtesting framework, execution infrastructure, signal layer, and the monetisation of trading flow. Written for practitioners building the full stack, not just running notebooks.

Read

What Breaks If This Data Is Wrong

A single diagnostic question cuts through every data governance framework, every data quality initiative, and every ownership debate. What would break if this data was wrong? The answer tells you whether a piece of data is critical, and whether your organisation actually governs it.

Read

Building a Shariah Equity Screener for the S&P 500

How we built a systematic Shariah compliance screener for US equities, what the AAOIFI thresholds actually mean, how they differ from SC Malaysia's approach, and why 0 compliant out of 310 was a useful debugging signal rather than a theological statement.

Read

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

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