- Home
- Skills
- Trading & Investing
- lookahead bias proof tester
lookahead bias proof tester
Audit trading strategies and backtests to expose lookahead bias, data leakage, and misleading performance metrics.
$5
Works with the AI Agents you already use
lookahead bias proof tester
Example session with this skill installed
Audit this Python strategy. It uses a 20-day rolling Z-score for entries and the current S&P 500 constituents. I'm getting a 4.0 Sharpe ratio in backtesting.
- Read your context and instructions
- Compiled the lookahead bias proof
VERDICT: BROKEN.
- Survivorship Bias: Using 'current' S&P 500 constituents ignores delisted companies, inflating returns.
- Leakage: The Z-score uses full-sample mean/std.
FIX: Use a rolling window for Z-score stats and point-in-time universe data. Adjusted Sharpe: 0.85.
Connects securely to your tools. The creator never sees your data.
About this skill
The problem
Backtests often produce "too good to be true" results because of hidden information leakage. Developers unknowingly use future data in feature scaling, signal generation, or universe selection, leading to catastrophic failure in live trading.
What it does
- Audits trading scripts and execution models for point-in-time data integrity.
- Identifies common leakage paths like centered moving averages, full-sample normalization, and
shift(-k)errors. - Detects survivorship bias in universe selection and restated financial data.
- Runs leakage probes including lag tests, label shuffles, and rolling retrain tests to stress-test strategy validity.
- Provides a Lookahead Bias Audit Report with code-level fixes and corrected performance metrics.
Frameworks & tools
Python, Pandas, NumPy, Scikit-Learn, and various backtesting engines.
Why this beats prompting it yourself
Generic LLMs often miss subtle alignment errors in time-series data or fail to account for serial correlation between train/test splits. This skill enforces a strict non-causal audit workflow that assumes leakage exists until proven otherwise, specifically looking for pandas index mismatches and lookahead execution artifacts that manual reviews overlook.
Use cases
- Verifying a newly developed quantitative strategy before deploying capital.
- Auditing third-party trading algorithms or academic research claims.
- Debugging unexpected discrepancies between backtest and paper trading results.
- Ensuring ML models for time-series use proper purging and embargo techniques.
Known limitations
Requires access to the strategy source code and data handling logic. Cannot detect leakage hidden within proprietary, pre-processed black-box datasets where the original collection methodology is unknown.
Requires strategy source code and data logic. Cannot detect leakage within black-box datasets where the collection methodology is undisclosed.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 3 months ago
Permissions
No special permissions declared or detected