bbgo_origin/config/linregmaker.yaml

152 lines
4.3 KiB
YAML
Raw Normal View History

2022-11-21 05:46:13 +00:00
---
persistence:
redis:
host: 127.0.0.1
port: 6379
db: 0
sessions:
binance:
exchange: binance
envVarPrefix: binance
margin: true
isolatedMargin: true
isolatedMarginSymbol: BTCUSDT
backtest:
sessions: [binance]
# for testing max draw down (MDD) at 03-12
# see here for more details
# https://www.investopedia.com/terms/m/maximum-drawdown-mdd.asp
startTime: "2022-03-15"
endTime: "2022-03-23"
2022-11-21 05:46:13 +00:00
symbols:
- BTCUSDT
accounts:
binance:
makerCommission: 10 # 0.15%
takerCommission: 15 # 0.15%
balances:
BTC: 2.0
2022-11-21 05:46:13 +00:00
USDT: 10000.0
exchangeStrategies:
- on: binance
linregmaker:
symbol: BTCUSDT
# interval is how long do you want to update your order price and quantity
interval: 1m
# reverseEMA
reverseEMA:
interval: 1d
window: 60
2022-11-21 05:46:13 +00:00
# reverseInterval
reverseInterval: 4h
2022-11-21 05:46:13 +00:00
# fastLinReg
fastLinReg:
interval: 1m
window: 30
2022-11-21 05:46:13 +00:00
# slowLinReg
slowLinReg:
interval: 1m
window: 120
2022-11-21 05:46:13 +00:00
# allowOppositePosition
allowOppositePosition: true
# fasterDecreaseRatio
fasterDecreaseRatio: 2
# neutralBollinger
neutralBollinger:
interval: "15m"
2022-11-21 05:46:13 +00:00
window: 21
bandWidth: 2.0
# tradeInBand: when tradeInBand is set, you will only place orders in the bollinger band.
tradeInBand: true
# spread
spread: 0.1%
# dynamicSpread
dynamicSpread:
amplitude: # delete other scaling strategy if this is defined
# window is the window of the SMAs of spreads
window: 1
interval: "1m"
askSpreadScale:
byPercentage:
# exp means we want to use exponential scale, you can replace "exp" with "linear" for linear scale
exp:
# from down to up
domain: [ 0.0001, 0.005 ]
# when in down band, holds 1.0 by maximum
# when in up band, holds 0.05 by maximum
range: [ 0.001, 0.002 ]
bidSpreadScale:
byPercentage:
# exp means we want to use exponential scale, you can replace "exp" with "linear" for linear scale
exp:
# from down to up
domain: [ 0.0001, 0.005 ]
# when in down band, holds 1.0 by maximum
# when in up band, holds 0.05 by maximum
range: [ 0.001, 0.002 ]
#maxExposurePosition: 10
2022-11-21 05:46:13 +00:00
DynamicExposure:
bollBandExposure:
interval: "1h"
window: 21
bandWidth: 2.0
dynamicExposurePositionScale:
byPercentage:
# exp means we want to use exponential scale, you can replace "exp" with "linear" for linear scale
exp:
# from lower band -100% (-1) to upper band 100% (+1)
domain: [ -1, 1 ]
# when in down band, holds 1.0 by maximum
# when in up band, holds 0.05 by maximum
range: [ 0.1, 10 ]
2022-11-21 05:46:13 +00:00
# quantity is the base order quantity for your buy/sell order.
quantity: 0.1
dynamicQuantityIncrease:
- linRegDynamicQuantity:
quantityLinReg:
interval: 1m
window: 20
dynamicQuantityLinRegScale:
byPercentage:
# log means we want to use log scale, you can replace "log" with "linear" for linear scale
linear:
2022-11-21 05:46:13 +00:00
# from lower band -100% (-1) to upper band 100% (+1)
2022-12-12 10:23:49 +00:00
domain: [ -0.000002, 0.000002 ]
2022-11-21 05:46:13 +00:00
# when in down band, holds 1.0 by maximum
# when in up band, holds 0.05 by maximum
2022-12-12 10:23:49 +00:00
range: [ 0, 0.001 ]
2022-11-21 05:46:13 +00:00
dynamicQuantityDecrease:
- linRegDynamicQuantity:
quantityLinReg:
interval: 1m
window: 20
dynamicQuantityLinRegScale:
byPercentage:
# log means we want to use log scale, you can replace "log" with "linear" for linear scale
linear:
2022-11-21 05:46:13 +00:00
# from lower band -100% (-1) to upper band 100% (+1)
2022-12-12 10:23:49 +00:00
domain: [0.000002, -0.000002 ]
2022-11-21 05:46:13 +00:00
# when in down band, holds 1.0 by maximum
# when in up band, holds 0.05 by maximum
2022-12-12 10:23:49 +00:00
range: [ 0, 0.001 ]
exits:
# roiStopLoss is the stop loss percentage of the position ROI (currently the price change)
- roiStopLoss:
percentage: 30%