Analysis updated 2026-05-18
Simulate a Dollar Cost Averaging strategy against historical candle data to see its past performance
Test a Grid trading strategy's buy and sell levels before running it with real funds
Evaluate a combined long and short Hedge strategy's risk and correlation across both sides
Compare financial metrics and risk ratios across different strategy configurations
| alinebm17/trade-backtesting-engine | agutinbaigo28/trading-backtest-kit | alinebm17/finance-api-tool | |
|---|---|---|---|
| Stars | 142 | 142 | 142 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | moderate | moderate | moderate |
| Complexity | 3/5 | 4/5 | 2/5 |
| Audience | developer | developer | data |
Figures from each repo's GitHub metadata at analysis time.
Requires historical candle data and the companion gainium indicators peer dependency.
trade-backtesting-engine, published as @gainium/backtester, is a library for testing trading strategies against historical price data before risking real money on them. It is part of the Gainium trading platform and lets a developer simulate how a strategy would have performed in the past. The engine supports three strategy types. DCA, short for Dollar Cost Averaging, buys into a position gradually based on time or indicator conditions, with multiple safety order levels and dynamic position sizing, plus take profit and stop loss rules. Grid trading sets up a price range divided into levels and places automatic buy and sell orders as the price moves through those levels, taking profit as the grid completes. Hedge trading combines a long DCA strategy and a short DCA strategy at the same time, with shared risk management and correlation based position sizing across both sides. To use it, a developer installs the package with npm and imports the matching backtesting class, DCABacktesting, GridBacktesting, or HedgeBacktesting, for the strategy they want to test. Each class takes a settings object describing the strategy configuration and a test method that runs the backtest against historical candle data, returning a results object with performance metrics. The library also integrates with a companion package called @gainium/indicators for technical indicator calculations used inside strategy conditions. The code is organized into separate folders for the DCA, Grid, and Hedge implementations plus shared type definitions and helper functions, and it requires Node.js 16 or newer along with TypeScript 4.5 or newer. The README states the license as private, belonging to the Gainium Trading Platform, so this is not a freely reusable open source library. This tool is aimed at developers building or evaluating automated crypto or stock trading bots who want to check a strategy's historical performance, financial metrics, and risk profile before deploying it live, rather than at someone looking for a beginner friendly trading app.
A TypeScript library for backtesting DCA, Grid, and Hedge trading strategies against historical market data before trading with real money.
Mainly TypeScript. The stack also includes TypeScript, Node.js, npm.
The README marks this as private, belonging to the Gainium Trading Platform, so it is not a freely reusable open source license.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.