Skip to content

19 articles

Conceptual illustration: a product idea moves through a Codex workspace and becomes a video and a purchase page, with small plants suggesting growth.
Projects & analysis

From ad to purchase: how I built Motion Commerce Lab

Motion Commerce Lab turns marketing ideas into work people can open, review and change: six product ads and a proposed purchase page, built so the ad moment and the product-page moment are worked on together. This post tells how it was built.

A column of conversions attributed to an ad is matched by threads to boxes of confirmed orders; a few conversions sit apart, with no order.
Projects & analysis

Why Ad Platform Conversions Don't Match Sales Data (and How to Reconcile)

Ad platform and sales counts differ because each observes a different moment, unit and attribution window, so neither is necessarily broken. A fictional example with 20 attributed conversions against 15 confirmed orders reconciles them and shows which number answers which question.

A product ad on a phone leads to a landing page with a form and to a CRM record; verified tracking tags hang along the path, except the last one, still empty.
Projects & analysis

How to Verify Ad-to-CRM Conversion Tracking Before Optimizing a Funnel

Verify each step of the journey, from ad click to page, form submission and CRM record, before reading a funnel decline as a user-experience problem. A fictional ad-to-CRM example shows which events, parameters and outcomes to check so an improvement decision rests on evidence.

Controls build a car policy that feeds two instruments: an open formula with every weight visible and a box of trees whose lens shows what moved the prediction; behind them, the technical note.
Projects & analysis

Poisson GLM vs XGBoost for Insurance Pricing: Interactive Lab

On 678,013 motor policies XGBoost ranks risk better than a Poisson GLM, but a rate still has to be explained in a technical note and defended to a regulator, which keeps ML as a pricing challenger. The interactive lab shows SHAP explanations and a geographic fairness check.

One shared owner connects three groups of borrowing companies in a relationship map.
Projects & analysis

CreditGraph: Graph-Based Credit Risk with Neo4j, PySpark and LightGBM on Guarantee Chains

Graph-based credit risk models loans as a network, so guarantee chains, circular guarantees and ownership concentration become measurable, which a relational loan table cannot express. A 500-client portfolio as a Neo4j knowledge graph, processed with PySpark on Databricks and scored with calibrated LightGBM, surfaces the structural risk that SQL keeps hidden.

Linked articles from two bodies of regulation are selected as evidence for a response connected to its sources.
Projects & analysis

RAG for Insurance Regulation: A LISF and CUSF Search Assistant

RAG suits insurance regulation because LISF and CUSF articles cross-reference each other, and Ctrl+F cannot tell the article that defines technical reserves from one that mentions them in passing. The agent indexes each article individually with a cross-reference graph, eliminating citation hallucinations so the model reasons only over the real text of the law and amplifies the actuary's memory without replacing their judgment.

Medical claims separate into three care categories, each with frequency and cost measures.
Projects & analysis

Mexico Major Medical (GMM) Pricing by Hospitalization Level (5.1M Claims)

Major medical expenses (GMM) can be priced by splitting 5.1M CNSF claims into three hospitalization levels instead of one average cost. 9,409 diagnoses are classified into those levels, with frequencies and severities by age and sex and an interactive tariff calculator. It began as a UNAM team project.

One set of auto claims feeds a premium decomposition, a reserve triangle, and anomaly review.
Projects & analysis

Auto Insurance Claims Dashboard: Pricing, Reserving and Fraud in Mexico

An auto insurer needs to answer three questions: how much to charge, how much to reserve and where the fraud is. This dashboard answers all three for the Mexican market, where roughly 70% of vehicles are uninsured: a frequency-severity GLM for pricing, IBNR reserves from two complementary methods and anomaly flags on claims before adjustment, on a synthetic portfolio calibrated with public CONDUSEF and AMIS data.

A modular actuarial calculation core connects the same logic to a library, a service interface, and a dashboard.
Projects & analysis

Open-Source Actuarial Library for Mexico: suite_actuarial (EMSSA-09, LISF)

suite_actuarial is an open-source Python library for Mexican actuarial work, covering eight domains (life, P&C, health, pensions, reserves, reinsurance, regulatory and configuration) with EMSSA-09 mortality tables, CNSF circulars and SAT tax articles built in. It installs with pip, deploys with Docker and exposes 28 REST endpoints alongside a bilingual Next.js dashboard; no other open-source library targets Mexican regulation.

Observed samples and modeled distributions meet on a comparison plate that keeps mismatches visible.
Projects & analysis

Quantitative Risk Analysis in Python: 13 Projects (VaR, Monte Carlo, Copulas, EVT)

Quantitative risk models become credible when implemented in typed Python with automated tests instead of left as formulas in a PDF. Thirteen modules cover portfolio VaR, Monte Carlo simulation, copulas, EVT, deep hedging and graph neural networks for systemic contagion, each pairing LaTeX theory with reproducible results on public market data.

Claim records pass through validation and structured tables; an exception branches to review before analysis.
Projects & analysis

Insurance Claims Data Pipeline on GCP: BigQuery, Dataform, Terraform

An insurance claims data platform on GCP chains streaming intake, a BigQuery warehouse, Dataform transformations, Terraform provisioning and Tweedie GLM pricing in six connected projects. It frees actuarial teams from spreadsheets and manual processes with an automated, tested and reproducible flow that turns raw claims into regulator-ready inputs.

An index-guided access selects one record, while a column-oriented read gathers data for an aggregation.
Projects & analysis

PostgreSQL vs BigQuery: When to Use Each (5.74M-Flight Benchmark)

Use PostgreSQL for indexed point lookups (2.6ms against about 500ms minimum on BigQuery) and BigQuery for full-table analytics at low cost. Both are measured on 5.74M real flight records, from PostgreSQL index optimization through the migration to BigQuery, with real timings, costs and query plans.

Two routes convert a work history into pension payments; the individual-savings route includes a conditional supplement.
Projects & analysis

IMSS Pension Simulator: Ley 73, Ley 97, and Fondo Bienestar in One Tool

The IMSS Pension Simulator compares what a worker would receive under Ley 73, Ley 97 (AFORE) and Fondo Bienestar, implementing all three formulas with current data (UMA, CONSAR tables, EMSSA 2009 mortality). Most Mexican workers do not know their regime or expected pension; interactive sensitivity analysis gives an educational estimate that shows what they control and what they do not.

Mortality observations become a graduated curve, a projection with uncertainty, and actuarial calculation blocks.
Projects & analysis

Mortality Tables to Solvency Capital: Life Insurance Pricing under LISF

Life insurance pricing starts by graduating raw mortality data: SIMA takes INEGI and CONAPO deaths and population, smooths them with Whittaker-Henderson and Lee-Carter, and projects forward to premiums, reserves and capital requirements under the LISF. Everything is exposed as an API to connect with other systems, automate sensitivity analysis and meet CNSF requirements; it is open source and built to expand into other lines of business.

Motor policies take two paths: a row of multiplicative factors and a grove of decision trees; both end at nearly identical price tags.
Projects & analysis

ML Insurance Pricing: Poisson GLM vs XGBoost vs LightGBM (freMTPL2)

Insurance pricing with ML splits the problem into claim frequency and severity, then compares a Poisson GLM against XGBoost and LightGBM on 678,013 policies from freMTPL2. SHAP explainability and a fairness audit check each model, and a cross-border analysis asks what these European pricing techniques mean for Mexico, where roughly 70% of vehicles carry no coverage.

Different data series follow a common process of organization, segmentation, and comparison.
Projects & analysis

Data Analyst Portfolio: 7 End-to-End Projects

Seven end-to-end projects across six domains: real estate, insurance reserves, e-commerce cohorts, product experimentation, finance (SaaS KPIs and portfolio risk), and public-sector operations. The same statistical toolkit runs through all of them, and that is the argument: a data analyst has to hold several domains in view at once, because range is what makes depth transferable. Each project ships as an interactive dashboard, all on one live domain.

A development triangle distinguishes observed payments from estimated future-development cells.
Projects & analysis

Loss Reserving with Chain-Ladder and Bornhuetter-Ferguson (NAIC Data)

Insurance reserves are estimated by developing loss triangles with methods such as Chain-Ladder and Bornhuetter-Ferguson, which produce IBNR estimates. An interactive dashboard on NAIC Schedule P regulatory data applies both actuarial methods across six lines of business, with loss triangles, IBNR and combined ratios, to answer whether reserves are enough.

A sequence of tiles passes through a causal attention matrix and produces probabilities for the next tile.
Projects & analysis

Build a Transformer from Scratch in NumPy: Trained on Proust's 7 Volumes

A transformer built from the first matrix multiplication in pure NumPy, with no autograd, shows what happens inside a language model. Trained on all 7 volumes of Proust, it taught me less about the architecture than about what it means that everything is just numbers.