Posts

I Built a BFIU-Compliant AML Detection System in Python (Here's Why the Kaggle Approach Doesn't Work

I Built a BFIU-Compliant AML Detection System in Python (Here's Why the Kaggle Approach Doesn't Work)

Most AML tutorials end with a confusion matrix and a 99% accuracy score. Here's why that doesn't work — and what I built instead. I've been working in fintech compliance data for a while. The one thing I kept noticing: every "fraud detection project" on GitHub or Kaggle uses the same dataset — the UCI credit card fraud dataset from 2013. It has 284,000 rows, 30 features labeled V1-V28, and approximately zero explanatory value for anyone who wants to understand how financial crime actually works. So I built something different. The problem with the standard approach Real transaction monitoring engines don't work like Kaggle competitions. They don't take a CSV, train a model, and output a probability score. They work like this: A rule engine runs first — deterministic, auditable, regulatory-cited rules that generate alerts Those alerts get scored and triaged by risk tier An ML layer reduces false positives among the high-risk alerts ...

How I Cut False Positives in Half and Saved My AML Squad Hours Every Day

Image
AI-generated illustration High‑Stakes Hook It was 02:17 AM on a rainy Thursday in Dhaka. My phone buzzed. The BFIU portal showed a new SAR – a supposedly "structuring" case involving BDT 12 million across ten bKash accounts. My team had already spent eight hours chasing the same alert yesterday, only to close it as a harmless cash‑in‑cash‑out loop. The auditor’s eyes were on us; the regulator’s deadline was looming. The clock was ticking, and the false‑positive avalanche was about to drown us. The Hidden Problem Most banks and fintechs in Bangladesh treat false positives like background noise. They set a single threshold – say, any transaction above BDT 100,000 gets flagged – and hope the downstream SAR team can sift through the noise. In practice, the rule‑engine spits out thousands of alerts daily. Our own monitoring dashboard showed a 92% false‑positive rate last quarter. The problem isn’t the rules; it’s the lack of context. Standard approaches fail because they ignore th...

Why My First Lighthouse‑Score Cold Email Fell Flat—and the One Metric That Actually Gets Replies

Image
AI-generated illustration It was 9 am on a rainy Tuesday in Mirpur. My inbox pinged. A tiny boutique bakery in Gulshan had replied to the cold email I sent last night. Two words. “Interested.” I could almost taste the fresh croissants I’d promised to help them sell faster. Only problem? The reply was a polite “Thanks, but we already have a dev.” I stared at the screen. My 4‑line email had mentioned their Lighthouse Performance score of 62, a slow‑loading hero image, and a quick fix. No one cared about numbers I thought were gold. The Hidden Problem: Numbers Aren’t Magic for Local SMEs Most freelancers I know treat Lighthouse like a badge. Score = credibility. We slap a 92‑point badge on a proposal and assume the client will jump. In Bangladesh, that assumption is a myth. Local shop owners care about cash flow , not Core Web Vitals. They run on 3G/4G, pay for data by the megabyte, and measure success by foot traffic and daily sales. A 0.5 second improvement in First Contentful Paint ...

How I Saved a Dhaka Street Vendor $1,200 a Year with a One‑Click Order Bot

Image
AI-generated illustration It was 9 AM on a rainy Tuesday. My phone buzzed – a frantic text from Rafiq, the owner of a tiny kathi roll stall on New Market. "Orders are piling up, but my phone dies after 3 messages. I’m losing cash every minute," he wrote. I asked for his sales sheet. He handed me a crumpled notebook: 120 orders a day, average ticket BDT 250, but his manual tally showed a 12 % gap between what he recorded and what the cash register said. In other words, roughly BDT 3,600 vanished each week. The Hidden Problem: Manual Order Capture in a Mobile‑First City Most small shops in Dhaka still rely on handwritten tickets or a single Android phone. The reality is brutal: 3G still costs BDT 150 per gigabyte, data caps are tight, and many owners cannot afford a full‑blown POS system. They think "automation" means hiring a developer, buying a cloud ERP, and waiting months for integration. That myth keeps cash on the table. Why the usual advice fails Typical co...

How I Saved a Rural Shop’s Sales with an Offline‑First PWA on Bangladesh’s 3G

Image
AI-generated illustration It was 3 PM on a rainy Thursday in Chittagong. My client, Rafiq, shouted over the phone: “The app crashed again, customers can’t add items!” He’d just lost 12 % of his daily turnover—about 4,800 BDT—because his Vue storefront kept timing out on the 3G link his customers shared at the market stall. Why Most Indie Shops Crash Before They Close Most freelancers I know build PWAs that assume a stable 4G or Wi‑Fi connection. They add a service worker, cache the shell, and call it a day. In Bangladesh, that assumption is a myth. Data bundles are cheap, but the network is fickle. A 3G tower can drop to 0.2 Mbps during peak hours. A single packet loss sends a JavaScript promise into the abyss. The result? Users stare at a spinner, then abandon the cart. “If you don’t design for offline, you design for failure.” – My own mantra after the first lost sale. The Hidden Problem: Ignoring Real‑World Connectivity Two things happen when you ignore the local reality: Service wo...

How I Turned a Stagnant Government App into a Freelancer‑Built PWA and Saved a Rural Clinic $3K Monthly

Image
AI-generated illustration Real‑World Hook I was scrolling through my Upwork inbox at 02:17 am, coffee gone cold, when a Bangladeshi health ministry officer pinged me. ‘Our patient‑record portal crashes on 3G, we lose about 12 % of appointments each month.’ He attached a screenshot: a gray‑screen error, a loading spinner stuck forever, and a note: ‘Average page load: 27 seconds on 4G, 45 seconds on 3G. Users abandon.’ My freelance dashboard showed I had 3 open gigs, $2 800 in pending invoices, and a deadline for a Daraz‑style PWA that was already two weeks late. I could have said ‘no’ and moved on. Instead I said ‘yes’ and set a timer: fix the app in 10 days or walk away. Why? Because the clinic behind that portal serves 1 200 patients across Rangpur, and each missed appointment costs them roughly BDT 2,500 (≈ $30) . That’s $3,000 a month slipping through the cracks. The numbers were clear. I had a chance to turn a broken government‑branded web app into a product that actually paid fo...

How I Caught a $1.2 Million Fraud Ring Using Behavioral Biometrics on a Mobile Banking App

Image
AI-generated illustration It was 02:17 AM on a rainy Thursday in Dhaka. My phone buzzed. A BFIU alert popped up: “Potential structuring activity – 57 transactions, BDT 100,000 each, within 2 hours.” My heart raced. The numbers matched a pattern I’d seen in a case study years ago, but never in live production. I grabbed a cold coffee, opened the monitoring dashboard, and saw the same device ID pinging bKash, Nagad, and a newly‑launched Rocket wallet. The fraud ring was already moving money across three platforms before the sun rose. The Hidden Problem: Why Conventional Rules Miss the Real Threat Bangladeshi fintechs rely heavily on static thresholds – BDT 100,000 per transaction, 5‑transaction daily caps, and simple velocity rules. Those work for obvious cash‑out scams, but they crumble when criminals mimic legitimate user behaviour. They randomise amounts, sprinkle low‑value transfers, and hide behind genuine device fingerprints. In my eight‑year AML journey, I’ve learned two thin...

8 Years of STR Filing: How I Brought Automation to a Bangladeshi Fintech with Python

Image
Photo by Nick Fewings on Unsplash I still remember the day our team was slammed with over 10,000 suspicious transaction reports (STRs) to file with the Bangladesh Financial Intelligence Unit (BFIU) in a single week. It was chaos. Our manual process, which involved filling out templates and submitting them individually, was on the verge of collapse. We had to automate, and fast. The Hidden Problem In Bangladesh, the BFIU requires financial institutions to report suspicious transactions exceeding BDT 100,000. But with millions of transactions happening daily through mobile financial services (MFS) like bKash and Nagad, manual reporting just isn't scalable. Standard approaches to automation often fall short due to the complexity of our local regulatory landscape and the nuances of MFS transactions. The Technical Challenge To automate STR filing, we needed a system that could accurately identify suspicious transactions, generate reports in the required format, and submit them to the B...

8 Years of Hunting Anomalies: How Isolation Forest and Autoencoders Changed My AML Game

I still remember the day our team detected a massive structuring ring, involving over 500 fake accounts and BDT 50 million in suspicious transactions. It was a high-stakes scenario - if we didn't report it to the BFIU within 24 hours, our MFS license would be at risk. The Hidden Problem Standard machine learning approaches often fail in Bangladesh due to the unique characteristics of our transaction data. With over 100 million mobile financial service (MFS) users, the sheer volume of data is overwhelming. Moreover, the BDT 100,000 threshold monitoring and STR/SAR bottlenecks make it challenging to identify true anomalies. That's where Isolation Forest and Autoencoders come into play. Both algorithms have their strengths and weaknesses, but when combined, they can be a powerful tool in identifying transaction anomalies. Technical Breakdown & Logic Flow Isolation Forest is an unsupervised learning algorithm that identifies anomalies by isolating them from the rest of the da...

How I Automated BFIU Reporting Templates with Python and Pandas: A 8-Year AML Odyssey

I still remember the night we discovered a massive structuring ring at one of the local banks in Bangladesh. It was a BDT 100 million transaction that slipped through our monitoring systems. The next morning, our team was in a frenzy, trying to file a Suspicious Transaction Report (STR) with the Bangladesh Financial Intelligence Unit (BFIU). But, as we delved into the process, we realized that our manual reporting templates were inadequate and error-prone . That's when I decided to take matters into my own hands and automate our BFIU reporting templates using Python and Pandas. I had 8 years of experience in AML compliance, but I had never tackled a project like this before. I was determined to make it work. The Hidden Problem Standard approaches to automating BFIU reporting templates often fail in Bangladesh due to the unique nature of our financial landscape. We have a thriving mobile financial services (MFS) sector, with players like bKash, Nagad, and Rocket, which complica...

How I Caught a 1.3 Million BDT Fraud Attempt in bKash Using Simple Yet Powerful Data Analysis

It was 3 am on a Tuesday when I got a call from our head of compliance. A massive fraud attempt was unfolding in real-time on the bKash platform. 1.3 million BDT was at stake. I jumped out of bed and rushed to the office. My mind was racing - what could be happening? Was it a phishing attack? A compromised account? Or something even more sinister? The Hidden Problem As I dove into the data, I realized that standard approaches to fraud detection were failing us. Machine learning models were flagging too many false positives, and our team was getting overwhelmed with alerts. We needed a more targeted approach, one that could pinpoint the exact source of the fraud attempt. That's when I turned to good old-fashioned data analysis. Deep Breakdown & Logic Flow Here's how I did it: first, I extracted all transactions from the past 24 hours that exceeded 10,000 BDT. Then, I filtered out any transactions that were not tagged as 'suspicious' by our machine learning model. Nex...

How I Uncovered the Dark Side of AML Models: The Urgent Need for Explainability

Image
Photo by Juno Jo on Unsplash I still remember the day our AML system flagged over 10,000 transactions as suspicious, only to find out that 90% of them were false positives. The regulator was breathing down our necks, and our team was under immense pressure to explain each and every one of those flags. That's when I realized the harsh truth: our AML models, despite being highly accurate on paper, were black boxes that nobody could interpret. The Hidden Problem In Bangladesh, where the BFIU guidelines are strict and the MFS threshold monitoring is a challenge, AML models need to be more than just accurate. They need to be explainable. But standard approaches often fall short. I've seen it time and time again: a model is trained on a dataset, it performs well on the test set, and then it's deployed. But when it comes to explaining why a particular transaction was flagged, the model falls silent. Technical Breakdown & Logic Flow To tackle this problem, I decided to take ...

8 Years of Chasing Shadows: How I Uncovered the Hidden Patterns of Agent Banking Fraud in Bangladesh

Image
Photo by Anas on Unsplash I still remember the night we detected a massive structuring ring that had been flying under the radar for months. It was a $1 million transaction, split into tiny chunks of BDT 100,000, all going through different agents across the country. My team and I were ecstatic, but also terrified - how did this happen under our noses? The Hidden Problem As I dug deeper, I realized that standard AML approaches just weren't cutting it in Bangladesh's unique DFS ecosystem. The BFIU guidelines are clear: monitor transactions above the BDT 100,000 MFS threshold, but the reality is that most fraud happens in smaller, more frequent transactions. It's like looking for a needle in a haystack, but the haystack is on fire. Why Standard Approaches Fail First , most systems rely on simple rule-based models that can't keep up with the sophistication of modern fraudsters. Second , the sheer volume of transactions in Bangladesh's MFS space makes it impossible to ...

8 Years of AML in Bangladesh: Cracking the Code on FATF vs BFIU Gaps

I still remember the day our team detected a massive structuring ring in a local mobile financial service (MFS) provider, with transactions totaling over BDT 10 million in a single week. What was more alarming was how this had slipped through our standard monitoring systems, highlighting the critical gaps between FATF recommendations and Bangladesh's BFIU guidelines. The Hidden Problem As an AML compliance analyst, I've found that standard approaches often fail in Bangladesh due to the unique nature of our financial landscape. The BDT 100,000 MFS threshold monitoring, for instance, can be easily circumvented by structuring transactions just below this limit. Moreover, the sheer volume of transactions in platforms like bKash and Nagad makes manual monitoring nearly impossible. Technical Breakdown & Logic Flow To tackle this, our team developed a more nuanced system. First, we collected and preprocessed transaction data, focusing on patterns that might indicate structuring o...

The Dirty Secret to Cleaning Transaction Data: My 8-Year AML Journey in Bangladesh

Image
Photo by Vital Sinkevich on Unsplash I still remember the night our AML system crashed from a false positive tsunami. It was a massive structuring ring, over BDT 100,000 in tiny transactions, slipping through our defenses. I had to act fast, or we'd face a BFIU audit. That's when I realized: dirty transaction data was the hidden enemy. The Hidden Problem Standard approaches to data cleaning just don't cut it in Bangladesh. With bKash, Nagad, and Rocket, our MFS landscape is unique. We have to monitor transactions above the BDT 100,000 threshold, but most systems fail to account for our local nuances. I've seen it time and time again: 80% of banks and fintechs struggle to write effective SAR narratives . It's not just about identifying suspicious activity; it's about understanding the context. Technical Breakdown & Logic Flow To tackle this problem, I had to think outside the box. I chose to use isolation forest to identify anomalies in our transaction data...