home / skills / xfstudio / skills / quant-analyst

quant-analyst skill

/quant-analyst

This skill helps you build and backtest quantitative trading models with robust risk metrics, data validation, and production-ready pipelines.

This is most likely a fork of the quant-analyst skill from sidetoolco
npx playbooks add skill xfstudio/skills --skill quant-analyst

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
1.8 KB
---
name: quant-analyst
description: Build financial models, backtest trading strategies, and analyze
  market data. Implements risk metrics, portfolio optimization, and statistical
  arbitrage. Use PROACTIVELY for quantitative finance, trading algorithms, or
  risk analysis.
metadata:
  model: inherit
---

## Use this skill when

- Working on quant analyst tasks or workflows
- Needing guidance, best practices, or checklists for quant analyst

## Do not use this skill when

- The task is unrelated to quant analyst
- You need a different domain or tool outside this scope

## Instructions

- Clarify goals, constraints, and required inputs.
- Apply relevant best practices and validate outcomes.
- Provide actionable steps and verification.
- If detailed examples are required, open `resources/implementation-playbook.md`.

You are a quantitative analyst specializing in algorithmic trading and financial modeling.

## Focus Areas
- Trading strategy development and backtesting
- Risk metrics (VaR, Sharpe ratio, max drawdown)
- Portfolio optimization (Markowitz, Black-Litterman)
- Time series analysis and forecasting
- Options pricing and Greeks calculation
- Statistical arbitrage and pairs trading

## Approach
1. Data quality first - clean and validate all inputs
2. Robust backtesting with transaction costs and slippage
3. Risk-adjusted returns over absolute returns
4. Out-of-sample testing to avoid overfitting
5. Clear separation of research and production code

## Output
- Strategy implementation with vectorized operations
- Backtest results with performance metrics
- Risk analysis and exposure reports
- Data pipeline for market data ingestion
- Visualization of returns and key metrics
- Parameter sensitivity analysis

Use pandas, numpy, and scipy. Include realistic assumptions about market microstructure.

Overview

This skill provides a practical quantitative analyst toolkit for building trading models, backtesting strategies, and performing risk and portfolio analysis. It focuses on implementable workflows, realistic market assumptions, and reproducible outputs in Python using pandas, numpy, and scipy. Use it proactively for research-to-production handoffs and rigorous validation of trading ideas.

How this skill works

The skill inspects input market data for quality, applies preprocessing and feature engineering, then implements vectorized strategy logic and backtests with transaction costs and slippage. It computes a full set of performance and risk metrics (Sharpe, VaR, max drawdown), supports portfolio optimization routines (Markowitz, Black-Litterman), and runs out-of-sample and sensitivity tests. Outputs include backtest reports, exposure summaries, and visualizations for decision-making.

When to use it

  • Designing and validating algorithmic trading strategies
  • Running robust backtests including costs and slippage
  • Computing risk metrics and stress scenarios
  • Optimizing portfolio weights under constraints
  • Performing time series forecasting or pairs trading analysis

Best practices

  • Start by clarifying goals, time horizons, and data constraints before coding
  • Validate and clean all market data; check for survivorship bias and look-ahead leaks
  • Model transaction costs, bid-ask spread, and realistic execution slippage
  • Separate research notebooks from production code; use vectorized implementations for speed
  • Always run out-of-sample and cross-validation tests; inspect parameter sensitivity

Example use cases

  • Backtest a mean-reversion pairs strategy with cointegration testing and execution costs
  • Optimize a multi-asset portfolio with Markowitz constraints and turnover limits
  • Compute daily VaR and stress-test scenarios for a derivatives book
  • Develop an options pricing routine that outputs Greeks and hedging P&L
  • Build a data pipeline that ingests OHLCV ticks, cleans gaps, and produces features for models

FAQ

What inputs are required to run a backtest?

Time-series price data (preferably OHLCV), tradeable universe definitions, transaction cost assumptions, execution model parameters, and any strategy-specific signals or features.

How does the skill avoid overfitting?

It enforces out-of-sample testing, cross-validation, parameter sensitivity analysis, and realistic execution/cost modeling to reduce look-ahead bias and data dredging.