{"categories":[{"label":"Visualization","url":"https://skillfed.io/packages/category/scientific-engineering-visualization"},{"label":"Investment","url":"https://skillfed.io/packages/category/office-business-financial-investment"}],"enrichment":{"capability":"Backtesting.py lets you define and test trading strategies against historical price data, then visualize results and performance metrics like Sharpe ratio, drawdown, and win rate.","skillfed_tags":["trading-simulation","quantitative-finance","strategy-optimization"],"use_cases":["Test a moving-average crossover or other rule-based strategy on years of historical stock or crypto data to measure profitability and risk.","Optimize strategy parameters (e.g., moving-average periods) by running the built-in optimizer across a grid or search space.","Compare multiple strategy variants side-by-side to see which has the best Sharpe ratio, lowest drawdown, or highest win rate.","Generate equity curves and trade logs as pandas DataFrames for further analysis or reporting in Jupyter notebooks.","Validate a trading idea before committing capital by simulating it on historical data with realistic commission and slippage assumptions."],"what_it_does":"Backtesting.py is a Python framework for testing trading strategies against historical OHLC candlestick data. You define a strategy class with entry and exit logic, pass it historical price data (from any source), and the framework simulates trades, calculates performance metrics (Sharpe ratio, Sortino ratio, max drawdown, win rate, etc.), and generates interactive visualizations via bokeh. It handles position sizing, commissions, and order management automatically.\n\nThe package is built on numpy and pandas for fast numerical computation and data handling. It includes a built-in optimizer for parameter tuning, a library of common technical indicators and base strategies, and produces detailed trade-by-trade results as DataFrames. It's designed to be indicator-agnostic\u2014you bring your own indicators or use the provided utilities\u2014and supports any financial instrument with candlestick data (stocks, crypto, forex, futures, etc.).","worth_installing":"Yes, if you are developing or researching trading strategies and want a lightweight, well-maintained framework with low install friction. The AGPL-3.0 license is a blocker for closed-source commercial use unless you obtain a separate license; for open-source or internal research, it poses no issue. No known security vulnerabilities. Active maintenance and a large user base make it a reliable choice for backtesting."},"id":"backtesting","links":{"html":"https://skillfed.io/packages/backtesting","md":"https://skillfed.io/packages/backtesting.md","pypi":"https://pypi.org/project/backtesting/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-07-22","license_spdx":null,"license_treatment":"agpl","name":"backtesting","python_support":"supports_current","summary":"Backtest trading strategies in Python"},"popularity":{"monthly_downloads":183712,"position":10062,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.6.6"}
