code-review-finance
Skill4 starsChanged 4 months agoMITView on GitHub
Reviews code with awareness of financial domain pitfalls: lookahead bias, data leakage, proper decimal handling, survivorship bias, overfitting, and correct backtesting methodology. Trigger when the user requests code review of trading or financial code.
In this repository18 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- report-generationSkill
- visualizationSkill
- data-cleaningSkill
- doc-generationSkill
- opentdx-engineeringSkill
- gelan-trinity-tradingSkill
- query-skillsSkill
- new-skillSkill
- backtest-strategySkill
- evf-stock-skillSkill
- market-dataSkill
- portfolio-riskSkill
- strategy-developmentSkill
- technical-analysisSkill
- yanchixia-short-termSkill
- yeren-trading-systemSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 27
Lookahead bias: verify no future data used in signal calculation (.shift(1) is correct, raw access is suspicious)
- Distinctive: line 38
Read strategy logic, understand the core idea
- Distinctive: line 40
Check temporal integrity — no peeking into future at any step
- Distinctive: line 41
Verify metric formulas against standard definitions
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Code Review (Finance-Aware)
Reviews code for financial-domain-specific correctness issues beyond general code quality.
Real Code Reference
tradinglearn/strategies/macd_strategy.py—generate_signals()uses.shift()to prevent lookahead; verify this is correcttradinglearn/backtest/backtester.py—run_backtest()iterates bars sequentially; verify ordertradinglearn/pytdx2/backtest.py—BacktestEnginehas its own execution loop; check for data leakage between train/test
What to Check
- Lookahead bias: verify no future data used in signal calculation (
.shift(1)is correct, raw access is suspicious) - Data leakage: train/test split must be temporal, not random —
data[:split_date]train,data[split_date:]test - Decimal handling: prices in cents vs yuan — K-line returns /1000, quotes return /100
- Survivorship bias: delisted stocks must be in historical universes
- Overfitting: parameter count vs data points ratio, out-of-sample validation
- Transaction costs: commission rate, slippage assumptions must be realistic
- Bid/ask spread: execution at mid-price is unrealistic for illiquid stocks
- Dividend handling: total return should include dividends
Review Process
- Read strategy logic, understand the core idea
- Trace data flow from raw prices → indicators → signals → trades
- Check temporal integrity — no peeking into future at any step
- Verify metric formulas against standard definitions
- Assess overfitting risk from parameter count and search space
- Report findings: critical / warning / suggestion
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

