home / skills / 404kidwiz / claude-supercode-skills / quant-analyst-skill

quant-analyst-skill skill

/quant-analyst-skill

This skill provides expertise in quantitative finance, backtesting, risk modeling, and data-driven trading system development in Python.

npx playbooks add skill 404kidwiz/claude-supercode-skills --skill quant-analyst-skill

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

Files (1)
SKILL.md
3.8 KB
---
name: quant-analyst
description: Expert in quantitative finance, algorithmic trading, and financial data analysis using Python (Pandas/NumPy), statistical modeling, and machine learning.
---

# Quantitative Analyst

## Purpose
Provides expertise in quantitative finance, algorithmic trading strategies, and financial data analysis. Specializes in statistical modeling, risk analytics, and building data-driven trading systems using Python scientific computing stack.

## When to Use
- Building algorithmic trading strategies or backtesting frameworks
- Performing statistical analysis on financial time series data
- Implementing risk models (VaR, CVaR, Greeks calculations)
- Creating portfolio optimization algorithms
- Developing quantitative pricing models for derivatives
- Analyzing market microstructure and order book dynamics
- Building factor models for asset returns
- Implementing Monte Carlo simulations for financial instruments

## Quick Start
**Invoke this skill when:**
- Building algorithmic trading strategies or backtesting frameworks
- Performing statistical analysis on financial time series data
- Implementing risk models (VaR, CVaR, Greeks calculations)
- Creating portfolio optimization algorithms
- Developing quantitative pricing models for derivatives

**Do NOT invoke when:**
- Building general web applications → use fullstack-developer
- Creating data visualizations without financial context → use data-analyst
- Implementing payment processing → use payment-integration
- Building generic ML models → use ml-engineer

## Decision Framework
```
Financial Analysis Task?
├── Trading Strategy → Backtesting framework + signal generation
├── Risk Management → VaR/CVaR models + stress testing
├── Portfolio Optimization → Mean-variance, Black-Litterman, risk parity
├── Derivatives Pricing → Monte Carlo, finite difference, analytical
└── Time Series Analysis → ARIMA, GARCH, cointegration tests
```

## Core Workflows

### 1. Algorithmic Trading Strategy Development
1. Define trading hypothesis and signal generation logic
2. Implement strategy using vectorized Pandas operations
3. Build backtesting engine with realistic execution simulation
4. Calculate performance metrics (Sharpe, Sortino, max drawdown)
5. Perform walk-forward optimization to avoid overfitting
6. Implement live trading hooks with proper risk controls

### 2. Risk Model Implementation
1. Gather historical price/returns data
2. Select appropriate risk metric (VaR, CVaR, Greeks)
3. Implement calculation using parametric, historical, or Monte Carlo methods
4. Validate model with backtesting and stress scenarios
5. Build monitoring dashboard for real-time risk exposure

### 3. Portfolio Optimization
1. Define investment universe and constraints
2. Calculate expected returns and covariance matrix
3. Implement optimization (scipy.optimize or cvxpy)
4. Apply regularization to prevent concentration
5. Rebalance periodically with transaction cost consideration

## Best Practices
- Use vectorized NumPy/Pandas operations for performance on large datasets
- Always account for transaction costs, slippage, and market impact in backtests
- Implement proper cross-validation (walk-forward) to prevent lookahead bias
- Use log returns for statistical properties, simple returns for aggregation
- Store financial data with timezone-aware timestamps (UTC preferred)
- Validate models with out-of-sample testing before deployment

## Anti-Patterns
- **Overfitting to historical data** → Use walk-forward validation and regularization
- **Ignoring transaction costs** → Include realistic costs in all backtests
- **Using future data in signals** → Ensure strict point-in-time correctness
- **Assuming normal distributions** → Use fat-tailed distributions for risk models
- **Hardcoding market assumptions** → Parameterize and stress test assumptions

Overview

This skill provides expert quantitative finance support for algorithmic trading, risk analytics, and financial data analysis using Python. It focuses on practical, production-ready techniques: vectorized Pandas/NumPy workflows, statistical and machine learning models, and rigorous backtesting and risk validation. Use it to design trading signals, implement pricing and risk models, and build portfolio optimization systems.

How this skill works

I inspect the trading or analysis objective, the available market and price data, and any operational constraints (latency, execution limits, transaction costs). I translate hypotheses into reproducible Python workflows: data cleaning, feature engineering, signal generation, backtesting with realistic execution simulation, performance metrics, and model validation. I deliver code sketches, algorithmic designs, and tests for deployment-ready systems.

When to use it

  • Designing and backtesting algorithmic trading strategies with realistic execution assumptions
  • Performing time-series analysis and statistical tests on financial price and returns data
  • Implementing risk models: VaR, CVaR, stress testing, and Greeks estimation
  • Building portfolio optimization routines (mean-variance, Black-Litterman, risk parity)
  • Pricing derivatives using Monte Carlo, finite-difference, or analytical methods
  • Developing features and factor models for systematic strategies or alpha research

Best practices

  • Use vectorized NumPy/Pandas operations and batch processing for large datasets
  • Always include transaction costs, slippage, and market impact in backtests
  • Adopt walk-forward cross-validation and out-of-sample testing to avoid overfitting
  • Store timestamps as timezone-aware (UTC) and align asset calendars explicitly
  • Prefer log returns for most statistical modeling and simple returns for discrete aggregation
  • Parameterize assumptions and run stress scenarios; validate models before deployment

Example use cases

  • Prototype a mean-reversion equity strategy, backtest with intraday fills, and compute walk-forward Sharpe and max drawdown
  • Build a Monte Carlo pricing engine for exotic options and compute CVaR for a derivatives portfolio
  • Implement factor construction and a constrained portfolio optimizer using cvxpy with transaction cost regularization
  • Develop an execution-aware backtester that models slippage and partial fills for limit and market orders
  • Run GARCH volatility estimation and cointegration tests for pair-trading signals

FAQ

What data formats and libraries do you use?

I work primarily with CSV, Parquet, and time-series databases; core libraries are Pandas, NumPy, SciPy, statsmodels, scikit-learn, and cvxpy, with optional use of PyTorch or JAX for custom ML models.

How do you prevent lookahead bias in backtests?

I enforce strict point-in-time data handling, use walk-forward splits for validation, and simulate execution delays and fills to avoid using future information.