backtest

Execute historical trading strategy backtests with customizable date ranges and initial capital.

1|Updated Dec 2, 2025
One-click install
npx skills add https://github.com/Junghyun99/StockAsset --skill backtest
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backtest
Source: https://github.com/Junghyun99/StockAsset/tree/main/.claude/skills/backtest
Command: npx skills add https://github.com/Junghyun99/StockAsset --skill backtest

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires yfinance, pandas, numpy, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the process of backtesting trading strategies, allowing users to analyze their performance over specified historical periods and with customizable initial capital.

Core Features & Use Cases

  • Automated Backtesting: Execute backtests using historical market data.
  • Performance Analysis: Generate key metrics like total return, CAGR, and analyze performance across different market regimes (Bull, Bear, etc.).
  • Customizable Parameters: Specify start date, end date, and initial cash for the backtest.
  • Use Case: A quantitative analyst wants to test a new algorithmic trading strategy on historical stock data from 2018 to 2023 with an initial capital of $50,000.

Quick Start

Execute a backtest for the period 2020-01-01 to 2023-12-31 with an initial capital of 10000.

Frequently Asked Questions about backtest

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I backtest a trading strategy using historical data?

To backtest a trading strategy, you execute historical tests by specifying customizable date ranges and initial capital. This Skill fetches historical market data to evaluate your strategy and generate performance metrics like total return and CAGR.

Can I analyze strategy performance across different market regimes?

Yes, you can analyze strategy performance across different market regimes such as Bull and Bear markets. The backtest evaluates how your trading strategy performs under various historical market conditions alongside standard metrics like CAGR.

How do I calculate CAGR and total return for an algorithmic trading strategy?

You calculate CAGR and total return by running an automated backtest with a defined initial capital and date range. The execution aggregates historical market data to produce these key performance metrics for your trading strategy.

Do I need Python and pandas to run a historical backtest?

Yes, you need Python with pandas, numpy, and yfinance to run this historical backtest. The Skill requires Python scripts for data fetching, backtesting logic, and result aggregation to evaluate your trading strategy.

What is the best way to evaluate an algorithmic trading strategy with custom initial cash?

The best way to evaluate an algorithmic trading strategy is to run an automated backtest with your specified initial cash and historical period. This allows you to assess performance metrics and market regime impacts accurately.