Code Monkey home page Code Monkey logo

zenbot-sim-runner's Introduction


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

  • Zenbot
    This project is meaningless without it!
    https://github.com/DeviaVir/zenbot
  • npm
    You probably already have npm installed if you have a working copy of Zenbot!
  • composer (PHP dependency manager)
    https://getcomposer.org/download/
  • MySQL / MariaDB
    I installed MariaDB on Manjaro. You may prefer to use a db in the cloud, or MySQL on Ubuntu etc etc. You could probably use MSSQL Server and maybe others because Laravel provides a layer of abstraction between the DB and the app code. I have only tested wiyth MariaDB.
  • Redis
    https://redis.io/topics/quickstart

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

zenbot-sim-runner's People

Contributors

jefc1111 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.