lookahead-guard
CommunityPrevent costly lookahead bias.
Software Engineering#code review#backtesting#lookahead bias#trading#signal generation#indicator development
Authorlgbarn
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill prevents the most common and devastating bug in trading systems: lookahead bias, which occurs when code accesses data that wouldn't be available at the time a decision is made.
Core Features & Use Cases
- Detects Future Data Access: Identifies instances where code uses future bar information or unconfirmed current bar data.
- Cross-Platform Guidance: Provides specific rules and dangerous/safe patterns for Pine Script, NinjaScript, Go, and Python.
- Use Case: Ensure your trading indicator's calculation correctly uses only data from completed bars, preventing backtest results from being artificially inflated by phantom profits.
Quick Start
Review the attached indicator code for any instances of using the current bar's close price before it is confirmed.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: lookahead-guard Download link: https://github.com/lgbarn/quantdev/archive/main.zip#lookahead-guard Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.