Git Product home page Git Product logo

diogomatoschaves / mycryptobot Goto Github PK

View Code? Open in Web Editor NEW
110.0 5.0 23.0 11.71 MB

Automated, open source crypto trading and backtesting platform

Python 75.25% Dockerfile 0.46% Shell 0.05% HTML 0.24% CSS 0.46% JavaScript 0.93% TypeScript 22.61%
algorithmic-trading algotrading backtesting backtesting-trading-strategies binance binance-bot binance-trading-bots crypto crypto-trading crypto-trading-bot

mycryptobot's Introduction

Hi there ๐Ÿ‘‹

I'm Diogo, welcome to my page!

I work mostly with scientific python libraries, as well as with python backend frameworks and javascript for frontend development.

Currently working on a quant project.

I also write on medium sometimes.

If you find any of my projects useful leave a โญ, it will be appreciated!

mycryptobot's People

Contributors

0xmimir avatar diogomatoschaves avatar newtoniano avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mycryptobot's Issues

Track portfolio net value over time

  • Track each trading bot's equity over time (save a snapshot every hour?)
  • Get starting equity from last snapshot.
  • Save last snapshot when closing the position.
  • Consolidate all trading bots equity over time on the dashboard
  • Show a graph for each trading bot on its detailed page
  • Show a graph on the main dashboard view

Fetch historical data only once

At the moment historical data is fetched twice, once for the ExchangeData and once for the StructuredData table. This can be done with one retrieval only.

Allow for strategy combination

Allow the user to select a combination of strategies, possibly creating a machine learning model that learns which strategy to use.

Enter a position immediately as a pipeline starts

At the moment a position is only entered after the size of the chosen candle has passed. It would be nice to enter a position immediately as soon as the pipeline is started, as long as there is enough back data.

Allow the possibility to combine strategies

Allow a pipeline to select multiple strategies and combine them using machine learning

  • Allow user to select multiple strategies on dashboard app (#13)
  • Allow the user to select between different possibilities - such as if only when all the strategies are in sync, or if 1 is enough, etc.
  • Create functionality on model app to allow combination of strategies

Add new features when creating new pipeline

Add some new features when creating a new pipeline:

  • Information about each strategy is displayed (if it exists)
  • Show available equity and don't allow to go over that equity
  • Give user option to select leverage and take it into account

Add URL routing

Make the app url routing aware, for easy maintaining of app state and better user experience.

Improve Trades view

  • Show leverage of trade
  • Show closing price
  • Show only closed trades
  • Max and avg trade duration not correct on dashboard

Implement Cron job to check status of application

Create a cron job that runs every hour (can be customizable) to check if there are active pipeelines and data is being written in the database, and therefore, that the app is running as expected.

Add Pipeline detailed view

A new view showing detailed information of the pipeline is shown when user clicks on a pipeline.

  • Detailed information
  • Show trades stats (Refactor out Dashboard trades stats into a component)
  • Show list of trades (Refactor out TradesPanel Table into a component)

Improve Pipelines Panel and detail view

Pipelines Panel

  • historical P&L
  • Current P&L for active pipelines
  • All time running of pipelines increases even if pipeline is stopped.
  • Show current position.
  • Show allocated equity
  • Total number of trades
  • Link button to open detailed view should be be limited to pipeline entry boundaries
  • Investigate why 2 requests are sent for fetching the price
  • Show buttons loading while awaiting response
  • deleting pipeline should not be allowed if there are binance api errors
  • deleting pipeline should only make it invisible, not make it disappear completely
  • Allow pipelines to be edited
  • update trade stats when pipleline stops

Pipeline Detail View

  • Show current position.
  • #56

Create new pipeline

  • #57
  • order candle sizes by ascending order

Dashboard app to get open positions from backend

  • Dashboard app should get open positions from backend and update pipelines accordingly.
  • Data app should check for active pipelines on startup and spawn correspondent pipeline.
  • Execution app should check open positions and start up trading for that pipeline.

Get dashboard metrics from backend

At the moment all the dashboard metrics are being calculated on the frontend. This will not scale very well if the number of trades increases dramatically, and it makes more sense to do database operations for this.

  • Trades
  • Pipelines

Create Dashboard

Create Balance page, which shows overall P&L for all the trading bots, split by live or paper trading, overall, open or closed.

Improve positions view

  • Show net gain and net ROI (return of investment) in position row
  • Limit the size of the trading bot name column.
  • Rename position to side
  • Add units and amount in USD

Add statistics to backtest results

  • Exposure Time [%]
  • Equity Final [$]
  • Equity Peak [$]
  • Return [%]
  • Return (Annualised) [%]
  • Volatility (Annualised) [%]
  • Sharpe Ratio
  • Sortino Ratio
  • Calmar Ratio
  • Max. Drawdown [%]
  • Avg. Drawdown [%]
  • Max. Drawdown Duration
  • Avg. Drawdown Duration
  • Win Rate [%]
  • Best Trade [%]
  • Worst Trade [%]
  • Avg. Trade [%]
  • Max. Trade Duration
  • Avg. Trade Duration
  • Profit Factor
  • Expectancy [%]
  • SQN

Improve dashboard info display

Add more functionality and information on the dashboard tab:

  • Available equity in futures account
  • Total equity on futures account
  • Show total number of active bots
  • Show best performing bot
  • Average % profit of each trade

Fix Backend bugs

data-app

  • if trading bot was not found, spawn a new trading bot with same details.
  • Task at startup has to take into account the fact that a pipeline may be active with a neutral position.
  • Ensure a new pipeline cannot trade the same symbol, even if its position is currently neutral.
  • Investigate why stopping pipeline is not working correctly sometimes.

model-app

  • Bollinger bands strategy sending None as a signal.

execution-app

  • Open position, even if position is neutral
  • Task at startup has to take into account the fact that a pipeline may be active with a neutral position.
  • Send reduce only flag with request when going to neutral position.
  • Check why net balance and position value is wrong
  • Do not let app execution proceed if there is an error which prevented the order from being executed.

Fix Frontend bugs

  • Deleting pipeline is sometimes not deleting bot on trading bots list - related to the fact that pipeline instance is not present at server restart in case position is neutral. See #46
  • Pipeline detail view should show trades summary, even if trades = 0
  • available equity should take into account active bot's equity, even if their current position is neutral
  • fix error that happens when new pipeline is created, related to messages (happens when an existing pipeline exists for the same symbol
  • clicking on trading bot buttons should not open detailed view
  • Deleting pipelines does not delete on UI

Improve logging on apps

  • Show current Net Asset Value on each time a signal is sent
  • Remove irrelevant logging
  • Improve Model app logging

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.