Look‑Ahead Traps in Backtesting (Backtrader, MQL, PineScript)

Why This Matters If a backtest seems to “forecast” the future without any explanatory edge, it probably does. The culprit is usually look‑ahead bias: using information you could not have known at the time of the decision. Below are the most common categories, each with a tiny example and a safe fix. These patterns appear in Backtrader, MQL (MetaTrader), PineScript—really in every language and engine. 1) Using Future Bar Values Symptom: The strategy decides using the current bar’s final values (like Close) and assumes an execution that benefits from that same bar’s information. ...

December 19, 2025 · 4 min · Josep Oriol Carné

How Survivorship Bias Is Costing You Money (And You Don't Even Know It)

How Survivorship Bias Is Costing You Money (And You Don’t Even Know It) Discover how survivorship bias—a cognitive trap born from WWII bomber analysis—distorts investment strategies, startup success rates, and trading decisions. Learn to see what’s missing. The Bullet Holes That Saved Thousands of Lives It’s 1943, and Allied bombers are getting shredded over Europe. Planes limp back to base riddled with bullet holes, and the top brass has a problem. Where do they add armor? The logical answer seems obvious—reinforce the areas with the most damage. ...

November 3, 2025 · 9 min · Josep Oriol Carné

Secure Network Architecture for Home-Based Trading & Server Ops

Introduction: Shielding Critical Infrastructure Running 24/7 operations from a home base – whether it’s autonomous trading algorithms or personal management applications – demands more than consumer-grade network hygiene. We’ll cover segmenting your network to contain threats, hardening the perimeter (your router), and securing the endpoints (your servers – be they Raspberry Pis, standard PCs running Ubuntu, or even renterprise gear like Dell or IBM servers you might have… acquired). The goal is maximizing uptime and integrity while minimizing exposure (and money expenditure). Network Architecture: Segmentation is Non-Negotiable A flat network where your trading rig, your blog server, your smart lightbulb, and your personal laptop all share the same broadcast domain is an invitation for disaster. One compromised IoT device could become a pivot point to critical systems. Segmentation limits the blast radius. ...

April 25, 2025 · 8 min · Josep Oriol Carné

Selecting an Open-Source DB for Financial Time Series

Choosing Your Data Engine: More Than Just Code When your algorithms depend on processing high-frequency data streams, or when you’re building ML models that need fast access to vast historical context, the time series database isn’t just a component – it’s the bedrock of your operation. A bottleneck here means missed opportunities, flawed analysis, or outright system failure. I’ve spent time evaluating the options because getting this wrong has consequences, especially when real capital or critical infrastructure is on the line. ...

April 6, 2025 · 8 min · Josep Oriol Carné