mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
144 lines
4.0 KiB
YAML
144 lines
4.0 KiB
YAML
---
|
|
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-01-01"
|
|
endTime: "2022-06-30"
|
|
symbols:
|
|
- BTCUSDT
|
|
accounts:
|
|
binance:
|
|
makerCommission: 10 # 0.15%
|
|
takerCommission: 15 # 0.15%
|
|
balances:
|
|
BTC: 10.0
|
|
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
|
|
|
|
# fastLinReg
|
|
fastLinReg:
|
|
interval: 1m
|
|
window: 20
|
|
|
|
# slowLinReg
|
|
slowLinReg:
|
|
interval: 1m
|
|
window: 60
|
|
|
|
# allowOppositePosition
|
|
allowOppositePosition: true
|
|
|
|
# fasterDecreaseRatio
|
|
fasterDecreaseRatio: 2
|
|
|
|
# neutralBollinger
|
|
neutralBollinger:
|
|
interval: "5m"
|
|
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
|
|
DynamicExposure:
|
|
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: [ 10.0, 1.0 ]
|
|
|
|
# quantity is the base order quantity for your buy/sell order.
|
|
quantity: 0.1
|
|
dynamicQuantityIncrease:
|
|
- linRegDynamicQuantity:
|
|
quantityLinReg:
|
|
interval: 1m
|
|
window: 20
|
|
dynamicQuantityLinRegScale:
|
|
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, 0.1 ]
|
|
dynamicQuantityDecrease:
|
|
- linRegDynamicQuantity:
|
|
quantityLinReg:
|
|
interval: 1m
|
|
window: 20
|
|
dynamicQuantityLinRegScale:
|
|
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, 0.1 ]
|