Design, Backtest and Run your Binance Trading Bot on GCP

所在平台: Udemy

课程主页: https://www.udemy.com/course/design-backtest-and-run-your-binance-trading-bot-on-gcp/

课程评论:没有评论

第一个写评论        关注课程

课程简介

课程名称:在GCP上设计、回测并运行您的Binance交易机器人 课程概述: 在本课程中,您将学习如何结合三种技术指标(RSI、布林带和吞没形态)使用Python、Ta-Lib和Binance API为比特币(BTCUSD)定义交易策略。您将对该策略进行回测,以验证其有效性。由于回测过程需要数小时,课程将教您如何使用Docker将Python脚本容器化,并将其推送到Google Cloud Platform(GCP),具体包括将容器推送到Artifact Registry,然后在Google Compute Engine上运行容器。最后,您将学习如何通过Docker、Artifact Registry和Google Compute Engine在Google Cloud上 24/7 运行您的交易机器人。 课程内容概述: 1. 基础知识 - 创建Docker环境以便进行实验(设置Jupyter Notebook和特定库)。 - 使用Binance API获取凭证,提取历史价格,检查BTCUSDT的过滤条件,执行市场订单和OCO订单以及取消订单。 - 复习RSI、布林带和吞没形态,并使用Ta-Lib进行编程和绘制基本图形。 2. 定义和可视化交易策略 - 详细描述交易策略并编程买入信号。 - 同时绘制布林带、RSI和吞没形态。 - 根据前面的图形定义止损和止盈,检查一些成功和失败的交易示例。 3. 在Google Compute Engine上回测交易策略 - 创建Dockerfile、requirements.txt和主要Python脚本(bot_backtesting)。 - bot_backtesting脚本包含与BigQuery的连接,以在执行过程中保存日志并在执行结束时保存最终结果,还会处理Binance费用和开放交易。 - 在bot_backtesting脚本中构建主函数,执行买入信号的搜索、设置交易价格及分析回测结果。 4. 在Google Compute Engine上构建和运行交易机器人 - 创建Dockerfile、requirements.txt和主要脚本(main.py),其中包括一个名为TradingBot的类,该类负责买入信号、交易条件及订单的管理。 - 每分钟运行TradingBot类的实例,分析交易机器人的运行结果。 5. 附录 - 安装基本工具:Notepad++、Google Cloud SDK、Docker。 - 启用Google Cloud组件:Compute Engine、Artifact Registry和BigQuery。 - 创建Json服务账户,以便从Python连接到BigQuery,并提供SDK的附加权限。 通过本课程,您将具备在Google Cloud上设计、回测和运行交易机器人的实践经验。

课程评论(0条)

课程详情

DescriptionIn this course you will learn an example of how to combine three technical indicators (RSI, Bollinger Bands and Engulfing Pattern) to define a trading strategy for Bitcoin (BTCUSD) using Python, Ta-Lib and Binance API. You will perform a backtesting of this strategy to see if it is a successful strategy or not. The execution of the backtesting will take several hours, so you will learn how to containerize your Python script using Docker and how to push it to Google Cloud Platform, specifically how to push the container to Artifact Registry and then run the container on Google Compute Engine. Finally, you will see how to run your trading bot 24/7 on Google Cloud again by using Docker, Artifact Registry and Google Compute Engine.Overview of the contentsSection 1: BasicsCreate local environment for our experiments using Docker (a Jupyter notebook with specific libraries).Usage of Binance API: getting credentials, extraction of historical prices, checking filters for BTCUSDT, executing market and OCO orders, getting the id and status of an order. Also canceling an order.Reviewing RSI, Bollinger Bands and Engulfing Pattern.Programming them using Ta-Lib and building some basic plots.Section 2: Defining and Visualizing the Trading StrategyDescribe the trading strategy.Programming the buy signal.Plotting simultaneously the Bollinger Bands, RSI and Engulfing Pattern.Based on previous plot, define the stoploss and takeprofit.Check a couple examples (a winning trade and a losing trade).Section 3: Backtesting the Trading Strategy on Google Compute EngineCreation of Dockerfile, requirements.txt and the main Python script (bot_backtesting).The bot_backtesting script Includes a connection to BigQuery to save logs during the execution and to save the final result at the end of the execution. Also it will handle Binance fees and any existing open trades.In bot_backtesting script, construct the main function (compute_sl_tp) steps: 1 Browsing for buy signals. 2 Setting entry, takeprofit and stoploss prices. 3 Determine when we reach each one of them. 4 Which one happened first. 5 Retrieve additional information.Building container with Docker, push it to Artifact Registry and run it on Google Compute Engine.Analyze backtesting results.Section 4: Building and Running the Trading Bot on Google Compute Engine.Creation of Dockerfile, requirements.txt and the main script (main py) which includes a class called TradingBot.The class will handle buy signals. Also it will define the entry, takeprofit and stoploss prices, estimated fees and returns, and whether we have an existing open trade or not.The class will define the required conditions to enter a trade.It will create market and OCO orders. Also it will check and update the status of both market and OCO orders.Running the class TradingBot every minute.Building container with Docker, push it to Artifact Registry and run it on Google Compute Engine. Also see how to run it on local machine.Results after running trading bot.Section 5: AppendixInstalling basic tools: Notepad++, Google Cloud SDK, Docker.Enable Google Cloud components: Compute Engine, Artifact Registry and BigQueryCreate Json Service Account for connection from Python to BigQuery.Provide additional permissions to SDK: Gmail, Docker, Artifact Registry and repositories in Artifact Registry.

课程标签

0人关注该课程

主题相关的课程