Skip to content

A sim run batch aggregator / automator for Zenbot. Eases the process of backtesting and subsequent analysis of results.

Notifications You must be signed in to change notification settings

mathiasaerts/zenbot-sim-runner

Repository files navigation


Logo

Zenbot Sim Runner

A sim run batch aggregator / automator for Zenbot. Eases the process of backtesting and subsequent analysis of results.
· Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage - work in progress
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgements

About The Project

product-screenshot product-screenshot-1 product-screenshot-2 product-screenshot-3 product-screenshot-4 product-screenshot-5 product-screenshot-6 product-screenshot-7

This application is a companion to the cryptocurrency trading bot Zenbot. Zenbot Sim Runner is able to import various data from Zenbot and then automate the running of simulations across multiple variations of multiple strategies.

I built this because:

  • Testing and refining strategies is key to profitable use of a trading bot.
  • Zenbot's built in default functionality allows running of only simulation at a time, so tweaking parameters for comparison is laborious.
  • Zenbot stores simulation results in a format which does not easily allow comparison across multiple simulations.

This was primarily built for my own use and so is super-janky in places! There are no tests, no form validation, etc etc, so errors and bugs at this stage are to be expected.

Zenbot itself has disclaimers that should suffice, but just to be sure the message gets across: Use this project and Zenbot AT YOUR OWN RISK. You can and probably will lose money if and when you live trade on an exchange.

Built With

This project leverages the excellent PHP framework Laravel. In particular, it uses Laravel's job queue functionality to allow queueing up controlled submission of many simulation runs in one batch.

Getting Started

This section is a work in progress :)

I am running this on Manjaro Linux but it doesn't have any very exotic dependencies so it should run on any mainstream OS.

in a nutshell, you need to install the dependencies, tell it where your working instance of Zenbot is, import some data from Zenbot and away you go!

Prerequisites

Note: Zenbot Sim Runner does not deal with backfilling - you need to do this directly from Zenbot before running any relevant sim runs.

Installation

  1. Clone the repo

    git clone https://github.com/jefc1111/zenbot-sim-runner.git
  2. Install NPM packages

    npm install
  3. Install composer packages

    composer install
  4. Build front end bundle

    npm run dev
  5. Create database tables

    php artisan migrate
  6. Set your queue connection to 'redis'. In Laravel's .env by adding QUEUE_CONNECTION=redis. In the absence of that line it will default to sync (which can be more convenient for troubleshooting etc).

  7. Start the app using PHP's built in web server (alternatively you could run it on an Apache or nginx web server)

    php artisan serve

In my own dev environment right now I have to run three commands to get things working;

redis-server
php artisan horizon
php artisan serve

Usage

Work in progress

  1. Import strategies, exchanges and products from Zenbot (this populates the corresponding MySQL tables)
  2. Create a sim run batch (select strategies, refine strategies, confirm)
  3. Run the batch, or individual sim runs
  4. Observe queued jobs
  5. View results
  6. Copy batch details

Roadmap

Project Trello board

License

Distributed under the MIT License.

Contact

Geoff - [email protected]

Project Link: https://github.com/jefc1111/zenbot-sim-runner

Acknowledgements

About

A sim run batch aggregator / automator for Zenbot. Eases the process of backtesting and subsequent analysis of results.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published