skka3134

skka3134

email
telegram

Cryptocurrency and Quantitative Trading: 1. Install freqtrade

  1. Use WSL
  2. Install Python extension
    image
  3. Install Python pip venv, pip is used to install packages, venv is used to create virtual environments
sudo apt update
sudo apt upgrade
sudo apt install python3
sudo apt install python3-pip
sudo apt install python3-venv
sudo apt install python3-dev
sudo apt install python3-pandas 
sudo apt install git
  1. Install freqtrade
git clone https://github.com/freqtrade/freqtrade.git
cd freqtrade
  1. Use stable version
git checkout stable
  1. Use development branch
git checkout develop
  1. Install using the script, it takes a long time, it is recommended to take a break.
./setup.sh -i
  1. Activate the environment
source .env/bin/activate
  1. View commands and versions
freqtrade --help
freqtrade --version
  1. Initialize a user folder
freqtrade create-userdir --userdir user_data
  1. Create a configuration
freqtrade new-config --config config.json

image
12. Modify the configuration file config.json
image
12. Create a strategy

freqtrade new-strategy --strategy test
  1. Download data from the exchange
freqtrade download-data --config config.json --days 999 -t 5m 15m 30m 1h 2h 4h 1d 1w
freqtrade download-data --config config.json
  1. View downloaded data
ls user_data/data/
ls user_data/data/binance/
  1. Start backtesting
    What is it, simulate trading based on historical data according to a predefined strategy.
    Purpose, improve the strategy based on backtesting data
    Traps
  2. Trading costs, performance without considering trading costs is not realistic
  3. Forward-looking bias, using future functions, such as specifying buying at the daily low point in the strategy.
freqtrade backtesting --config config.json --strategy SampleStrategy
  1. Start the bot, sometimes errors occur due to proxy issues, a good prompt is "can not load markets"
freqtrade trade --config config.json --strategy SampleStrategy
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.