All Projects → xFFFFF → Gekko Backtesttool

xFFFFF / Gekko Backtesttool

Licence: mit
Batch backtest, import and strategy params optimalization for Gekko Trading Bot. With one command you will run any number of backtests.

Programming Languages

perl
6916 projects

Projects that are alternatives of or similar to Gekko Backtesttool

Socktrader
🚀 Websocket based trading bot for 💰cryptocurrencies 📈
Stars: ✭ 152 (-25.12%)
Mutual labels:  trading-bot, bitcoin, cryptocurrency, cryptocurrencies, trading, trading-strategies, crypto
Jesse
An advanced crypto trading bot written in Python
Stars: ✭ 1,038 (+411.33%)
Mutual labels:  trading-bot, bitcoin, cryptocurrency, trading, trading-strategies, crypto
Algotrading
Algorithmic trading framework for cryptocurrencies.
Stars: ✭ 249 (+22.66%)
Mutual labels:  trading-bot, cryptocurrency, cryptocurrencies, trading, backtest, crypto
Wolfbot
Crypto currency trading bot written in TypeScript for NodeJS
Stars: ✭ 335 (+65.02%)
Mutual labels:  trading-bot, bitcoin, cryptocurrency, cryptocurrencies, trading, trading-strategies
Gekko Strategies
Strategies to Gekko trading bot with backtests results and some useful tools.
Stars: ✭ 1,022 (+403.45%)
Mutual labels:  trading-bot, cryptocurrency, cryptocurrencies, trading, trading-strategies, crypto
Gnome Feeder
Profit Trailer Feeder Full Build with Settings
Stars: ✭ 122 (-39.9%)
Mutual labels:  trading-bot, bitcoin, cryptocurrency, cryptocurrencies, trading-strategies, crypto
Crypto Trading Bot
Cryptocurrency trading bot in javascript for Bitfinex, Bitmex, Binance, FTX, Bybit ... (public edition)
Stars: ✭ 1,089 (+436.45%)
Mutual labels:  trading-bot, cryptocurrency, trading, trading-strategies, crypto
Gekko Datasets
Gekko Trading Bot dataset dumps. Ready to use and download history files in SQLite format.
Stars: ✭ 146 (-28.08%)
Mutual labels:  trading-bot, cryptocurrency, cryptocurrencies, backtest, crypto
MoniGoMani
Isn't that what we all want? Our money to go many? Well that's what this framework/strategy hopes to do for you! By giving you & HyperOpt a lot of signals to alter the weights from.
Stars: ✭ 868 (+327.59%)
Mutual labels:  crypto, trading, trading-bot, trading-strategies, cryptocurrencies
Profit Trailer Settings
Place to store and stay up to date with configs & strategies from the CryptoGnome Group
Stars: ✭ 335 (+65.02%)
Mutual labels:  trading-bot, bitcoin, cryptocurrency, cryptocurrencies, crypto
Krypto Trading Bot
Self-hosted crypto trading bot (automated high frequency market making) written in C++
Stars: ✭ 2,589 (+1175.37%)
Mutual labels:  trading-bot, bitcoin, cryptocurrency, trading, trading-strategies
Crypto Signal
Github.com/CryptoSignal - #1 Quant Trading & Technical Analysis Bot - 3,100+ stars, 900+ forks
Stars: ✭ 3,690 (+1717.73%)
Mutual labels:  trading-bot, bitcoin, trading, trading-strategies, crypto
Aat
Asynchronous, event-driven algorithmic trading in Python and C++
Stars: ✭ 109 (-46.31%)
Mutual labels:  trading-bot, cryptocurrency, cryptocurrencies, trading, trading-strategies
Siis
Trading bot including terminal, for crypto and traditionals markets. Assisted or fully automated strategy.
Stars: ✭ 45 (-77.83%)
Mutual labels:  trading-bot, bitcoin, cryptocurrency, trading, crypto
Freqtrade Strategies
Free trading strategies for Freqtrade bot
Stars: ✭ 697 (+243.35%)
Mutual labels:  trading-bot, bitcoin, cryptocurrency, trading, trading-strategies
Kupi Terminal
Ccxt based, open source, customized, extendable trading platform that supports 130+ crypto exchanges.
Stars: ✭ 104 (-48.77%)
Mutual labels:  bitcoin, cryptocurrency, trading, trading-strategies, crypto
Cated
CATEd - Cryptocurrency Analytics and Trading Engine for Django
Stars: ✭ 84 (-58.62%)
Mutual labels:  trading-bot, bitcoin, cryptocurrency, trading
Cryptex
Gemini, GDAX, Bitfinex, Poloniex, Binance, Kraken, Cryptopia, Koinex, BitGrail and CoinMarketCap cryptocurrency exchange API clients in Swift / iOS SDK. Check prices and account balances using Sample iOS app.
Stars: ✭ 51 (-74.88%)
Mutual labels:  bitcoin, cryptocurrency, cryptocurrencies, crypto
Roq Api
API for algorithmic and high-frequency trading
Stars: ✭ 132 (-34.98%)
Mutual labels:  trading-bot, cryptocurrency, trading, trading-strategies
Peatiocryptoexchange
An open-source Crypto-Currency exchange. Peatio v3.0 Coming Soon !
Stars: ✭ 141 (-30.54%)
Mutual labels:  bitcoin, cryptocurrency, cryptocurrencies, crypto

Gekko BacktestTool

Logo
Donate with Bitcoin
Donate with Litecoin
Donate with Ethereum
badge GitHub Release Date badge GitHub last commit badge badge GitHub closed issues GA
CLI tool that enhances the features of Gekko's Trading Bot. The tool performs a test with multiple pairs on a single run. Suppose you have a strategy that you want to test on more currency pairs. You enter all the pairs on which you want to test the strategy for the BacktestTool's configuration file. You start the application and everything happens automatically. You are just waiting for the results that appear on the screen. You will see how your strategy falls on other pairs, where it works the best, and where the worst. More detailed data is available in the .CSV file, which you can open in a spreadsheet or text editor.
Top Dataset
You can do the same with many strategies and CandleSize values. You can test all your strategies on eg BTC-USD pair and compare results, which will allow you to choose the best strategy you will use in live trade.

DEMO

Backtest machine

GBT run

Database file

CSV file

Features

  • Backtest for multiple strategies and pairs with one command
  • Backtests results are exporting to CSV file (see sample)
  • Analysis and comparing all strategy and pair results in variables such as: % of profitable backtests for strategy, % of results with profit above market, % of win trades, average P&L for trades and more!
  • Import multiple datasets with one command
  • Strategy config file - support both TOML and JSON files in CLI mode
  • Strategy optimization - searching for optimal parameters (brute force method) for the strategy on many datasets
  • Multithreading - in contrast to raw Gekko backtest this tool can uses 100% of your processor
  • Extended statistics - 40 variables from single backtest result, such as: volume, price (min, max, avg, volality), percent of win trades, median P&L for trades, marketcap, CoinMarketCap Rank, etc.

Minimal requirements

Installation

Binaries: Easiest install way

  1. Download latest version from repository's releases.
  2. Extract downloaded zip.
  3. Copy all extrated files to main Gekko's directory.

Open Source: Debian, Ubuntu, Linux Mint

  1. Clone git https://github.com/xFFFFF/Gekko-BacktestTool
  2. Copy files to Gekko's main directory
  3. Install dependies:
    $ sudo cpan install Parallel::ForkManager Time::Elapsed Getopt::Long List::MoreUtils File::chdir Statistics::Basic DBI DBD::SQLite JSON::XS TOML File::Basename File::Find::Wanted Template LWP::UserAgent LWP::Protocol::https Set::CrossProduct DBD::CSV Text::Table File::Copy

Open Source: Other Unix-like OS

  1. Clone git https://github.com/xFFFFF/Gekko-BacktestTool
  2. Copy files to Gekko's main directory
  3. Install dependies:
    $ su
    $ cpan install Parallel::ForkManager Time::Elapsed Getopt::Long List::MoreUtils File::chdir Statistics::Basic DBI DBD::SQLite JSON::XS TOML File::Basename File::Find::Wanted Template LWP::UserAgent LWP::Protocol::https Set::CrossProduct DBD::CSV Text::Table File::Copy

Open Source: MS Windows

  1. Install Strawberry Perl
  2. Download Gekko BacktestTool from here
  3. Uncompress files from master.zip to Your main Gekko's folder
  4. Find Run... in Menu Start
  5. Enter cmd.exe and press enter
  6. In appeared Window with black background enter command: cpan install Parallel::ForkManager Time::Elapsed Getopt::Long List::MoreUtils File::chdir Statistics::Basic DBI DBD::SQLite JSON::XS TOML File::Basename File::Find::Wanted Template LWP::UserAgent LWP::Protocol::https Set::CrossProduct DBD::CSV Text::Table File::Copy

Open Source: Docker container

The installation tutorial by bald123 can be found in the Wiki: Docker installation.

Run

  1. Edit backtest-config.pl in text editor.
  2. In terminal/cmd go to Your main Gekko's folder ex:
    Windows - cd C:\Users\xFFFFF\Desktop\gekko
    Linux - cd /home/xFFFFF/gekko
  3. If You are using Open Source version go to next step. For "binaries" add execution privilege: chmod +x backtest
  4. Run BacktestTool by command:
    a) Open Source version: perl backtest.pl
    b) Binaries: ./backtest

All available commands

usage: perl backtest.pl
To run backtests machine

usage: perl backtest.pl [mode] [optional parameter]
To run other features

Mode:
  -i, --import   - Import new datasets
  -g, --paper  - Start multiple sessions of PaperTrader
  -v, --convert TOMLFILE - Convert TOML file to Gekko's CLI config format, ex: backtest.pl -v MACD.toml
  -a, --analyze CSVFILE  - Perform comparision of strategies and pairs from csv file, ex: backtest.pl -a database.csv
  
Optional parameters:
  -c, --config     - BacktestTool config file. Default is backtest-config.pl
  -s, --strat STRAT_NAME - Define strategies for backtests. You can add multiple strategies seperated by commas example: backtest.pl --strat=MACD,CCI
  -p, --pair PAIR  - Define pairs to backtest in exchange:currency:asset format ex: backtest.pl --p bitfinex:USD:AVT. You can add multiple pairs seperated by commas.
  -p exchange:ALL  - Perform action on all available pairs. Other usage: exchange:USD:ALL to perform action for all USD pairs.
  -n, --candle CANDLE  - Define candleSize and warmup period for backtest in candleSize:warmup format, ex: backtest.pl -n 5:144,10:73. You can add multiple values seperated by commas.
  -ft, --period DAYS - Time range in days - perform action on period from last x days ex: backtest.pl -ft 7   
  -f, --from    - Time range for backtest datasets or import. Example: backtest.pl --from="2018-01-01 09:10" --to="2018-01-05 12:23"
  -t, --to
  -f last   - Start import from last candle available in DB. If pair not exist in DB then start from 24h ago.
  -t now    - 'now' is current time in GMT.
  -o, --output FILENAME - CSV file name.

Some examples

  • Backtests of all available pairs for Binance Exchange in Gekko's scan datarange mode:
    $ perl backtest.pl -p binance:ALL

  • Backtest on all pairs and strategies defined in backtest-config.pl with candles 5, 10, 20, 40 and 12 hours warmup period:
    $ perl backtest.pl -n 5:144,10:73,20:36,40:15

  • Import all new candles for all BNB pairs:
    $ perl backtest.pl -i -p binance:BNB:ALL -f last -t now

  • Import all candles for pairs defined in backtest-config.pl from 2017-01-02 to now:
    $ perl backtest.pl -i -f 2017-01-02 -t now

  • Search best parameters for strategy: edit TOML file in config/strategies
    Strat config example
    The above example will generate 15 backtests with unique configurations. Syntax for brute force is: start..end: step (as in the case of TimePeriod) or value1, value2, value3 (example from interval). The generated values for TimePeriod are 15, 20, 25. After saving the file, run the backtest of the given strategy, eg backtest.pl -s BBRSI.
    Brute force

See also

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].