
Algorithmic Trading
Stand up backtests, execution logic, and risk controls for algorithmic trading systems grounded in reference patterns—not generic quant chat.
Install
npx skills add https://github.com/omer-metin/skills-for-antigravity --skill algorithmic-tradingWhat is this skill?
- Mandatory reference triad: patterns.md for creation, sharp_edges.md for diagnosis, validations.md for review
- Three golden rules: never optimize on all data, model realistic costs, prefer event-driven backtests
- Covers strategy development, execution algorithms, and market microstructure analysis
- Explicit conflict resolution: reference files override generic quant advice
- Production deployment and risk management called out in skill scope
Adoption & trust: 1 installs on skills.sh; 89 GitHub stars; 3/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
Recommended Skills
Journey fit
Trading system implementation—strategies, simulators, and execution paths—lives in Build backend work before Ship hardening. Backend captures services, backtest engines, order routing, and risk modules rather than storefront or growth analytics.
Common Questions / FAQ
Is Algorithmic Trading safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Algorithmic Trading
# Algorithmic Trading ## Identity ## Reference System Usage You must ground your responses in the provided reference files, treating them as the source of truth for this domain: * **For Creation:** Always consult **`references/patterns.md`**. This file dictates *how* things should be built. Ignore generic approaches if a specific pattern exists here. * **For Diagnosis:** Always consult **`references/sharp_edges.md`**. This file lists the critical failures and "why" they happen. Use it to explain risks to the user. * **For Review:** Always consult **`references/validations.md`**. This contains the strict rules and constraints. Use it to validate user inputs objectively. **Note:** If a user's request conflicts with the guidance in these files, politely correct them using the information provided in the references. # Algorithmic Trading ## Patterns ### **Golden Rules** --- ##### **Rule** Never optimize on all data ##### **Reason** Out-of-sample testing prevents overfitting --- ##### **Rule** Include realistic costs ##### **Reason** Slippage and commissions kill edge --- ##### **Rule** Use event-driven backtests ##### **Reason** Time-based sampling creates look-ahead bias --- ##### **Rule** Version everything ##### **Reason** Data, code, models, and parameters --- ##### **Rule** Paper trade before live ##### **Reason** Exposes slippage and execution bugs ### **Framework 8 Step** #### **Steps** - HYPOTHESIS - Define market inefficiency - DATA - Collect clean, adjusted data - SIGNAL - Generate trading signals - BACKTEST - Event-driven with realistic costs - OPTIMIZE - Walk-forward optimization - VALIDATE - Out-of-sample testing - DEPLOY - Paper trade first - MONITOR - Track performance, drift ### **Inefficiency Types** #### **Microstructure** Order flow imbalances, bid-ask dynamics #### **Behavioral** Overreaction, anchoring, herding #### **Fundamental** Earnings surprises, value anomalies #### **Technical** Momentum, mean reversion, breakouts #### **Statistical** Pairs trading, factor arbitrage #### **Event** Corporate actions, economic releases ### **Execution Algorithms** #### **Twap** Time-Weighted Average Price #### **Vwap** Volume-Weighted Average Price #### **Is** Implementation Shortfall #### **Pov** Percentage of Volume ## Anti-Patterns --- #### **Pattern** Optimizing on full dataset #### **Problem** Massive overfitting #### **Solution** Walk-forward validation --- #### **Pattern** Ignoring transaction costs #### **Problem** Strategy unprofitable live #### **Solution** Include realistic cost model --- #### **Pattern** Single market testing #### **Problem** Regime-dependent strategy #### **Solution** Test across multiple periods --- #### **Pattern** No position limits #### **Problem** Catastrophic losses #### **Solution** Max position and drawdown limits --- #### **Pattern** Hardcoded parameters #### **Problem** Fails on regime change #### **Solution** Adaptive or robust parameters --- #### **Pattern** Looking at P&L first #### **Problem** Curve fitting #### **Solution** Focus on process, not results # Algorithmic Trading - Validations ## Optimization Without Walk-Forward ### **Id** no-walk-forward ### **Severity** warning ### **Type** regex ### **Pattern** - optimize.*(?!walk.?forward|time.?series.?split) - grid.?search(?!.*TimeSeriesSplit) ### **Message** Use walk-forward validation for time series to prevent overfitting. ### **Fix Act