- Home
- Skills
- Code Quality & Review
- Quant & Fintech Code Auditor
Works with the AI Agents you already use
Quant & Fintech Code Auditor
Catch silent financial bugs in trading, DCF valuation & AI research codebases: 10^9 unit drift, percentage traps, look-ahead bias, and ungrounded LLM outputs.
Free
Quant & Fintech Code Auditor
Example session with this skill installed
Audit routers/valuation.py and services/validators.py for unit mismatches, DCF calculation edge cases, percentage scaling traps, and Point-in-Time look-ahead bias.
- Read your context and instructions
- Compiled the quant & fintech
Summary
Audited routers/valuation.py and services/validators.py across all 5 quantitative guardrail layers. Found
2 Critical mathematical/temporal defects and
1 Warning that silently corrupt fair-value estimates and backtest integrity.
Detailed Fixes
1. Fix Billion-vs-Raw-Shares DCF Division (routers/valuation.py#L94)
# Before: equity_value (Billion) / shares (raw) -> 0.000045
# After: align dimensional scale explicitly
scale_factor = 1.0 if shares_outstanding < 100_000 else 1_000_000_000.0
fair_value_per_share = (equity_value * scale_factor) / shares_outstanding
2. Replace Magnitude Guessing with Explicit Unit Metadata (routers/valuation.py#L118)
def normalize_ratio(value: float, unit: str | None) -> float:
if (unit or "").strip().upper() in {"%", "PERCENT", "PCT"}:
return value / 100.0
return value
3. Enforce Strict Point-in-Time Boundary (services/validators.py#L244)
Remove the unguarded fallback query (order_by(date.desc()).first() without date filter) and return INSUFFICIENT_DATA when no filing is published on or before as_of.
Next steps
- Apply the 3 patches above and re-run unit tests with boundary fixtures (
0.8%growth,125%growth, halted trading sessions, and pre-IPO dates). - Run
quant-code-auditoronapps/web/next to verify UItabular-numsalignment and status enum contracts.
Connects securely to your tools. The creator never sees your data.
About this skill
Generic code reviewers check syntax—they miss the financial bugs that silently ruin DCF valuations, leak future earnings into backtests, or let LLMs hallucinate numbers.
Quant & Fintech Code Auditor applies an institutional 5-layer audit checklist distilled from real production equity research engineering (InvestIntel):
- Unit & Scale Consistency**: Catches billion-vs-raw-shares
10^9division errors and dangerousif abs(x) > 1.0percentage heuristics that inflate0.8%growth into80%. - Point-in-Time (PIT) Integrity**: Hunts down look-ahead bias, unguarded fallback queries missing
publication_date <= as_of, timezone mismatches (date.today()vs exchange time), and gapped-bar Beta distortions. - AI Numerical Grounding**: Audits RAG/LLM pipelines to verify financial claims against retrieved database evidence and catch faulty scale multipliers.
- Backend & Cache Hygiene**: Detects FastAPI dynamic route shadowing (
/{symbol}swallowing static routes), request-scoped DB sessions leaked to background tasks, and date-blind caching. - Fintech UI Precision**: Checks for
tabular-nums, frontend/backend contract enum mismatches, andNaN/ zero-division guards in charts.
Includes a complete anti-pattern reference library (references/fintech-bug-patterns.md) and a strict structured output format with line references and copy-paste fixes.
Requires access to source code files. Does not perform live production monitoring or real-time trade execution. Assumes standard financial naming conventions for best results.
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
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 5 days ago
- Free with an Agensi account
Permissions
File Scopes
Read-only inspection of source files to audit valuation formulas, Point-in-Time queries, API routes, and UI numeric formatting. Never modifies files or runs shell commands.