mirror of
https://github.com/c9s/bbgo.git
synced 2024-09-20 08:11:08 +00:00
add backtest config
This commit is contained in:
parent
d8ff42d531
commit
4a6f6f7a5a
|
@ -1,10 +1,27 @@
|
||||||
---
|
---
|
||||||
|
backtest:
|
||||||
|
startTime: "2023-01-01"
|
||||||
|
endTime: "2023-05-31"
|
||||||
|
symbols:
|
||||||
|
- USDCUSDT
|
||||||
|
sessions:
|
||||||
|
- max
|
||||||
|
accounts:
|
||||||
|
max:
|
||||||
|
balances:
|
||||||
|
USDC: 500.0
|
||||||
|
USDT: 500.0
|
||||||
|
|
||||||
exchangeStrategies:
|
exchangeStrategies:
|
||||||
- on: max
|
- on: max
|
||||||
fixedmaker:
|
fixedmaker:
|
||||||
symbol: BTCUSDT
|
symbol: USDCUSDT
|
||||||
interval: 5m
|
interval: 5m
|
||||||
halfSpread: 0.05%
|
halfSpread: 0.05%
|
||||||
quantity: 0.005
|
quantity: 15
|
||||||
orderType: LIMIT_MAKER
|
orderType: LIMIT_MAKER
|
||||||
dryRun: true
|
dryRun: false
|
||||||
|
|
||||||
|
positionHardLimit: 1500
|
||||||
|
maxPositionQuantity: 1500
|
||||||
|
circuitBreakLossThreshold: -0.15
|
||||||
|
|
|
@ -64,7 +64,7 @@ func (s *Strategy) Validate() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if s.HalfSpread.Float64() <= 0 {
|
if s.HalfSpread.Float64() <= 0 {
|
||||||
return fmt.Errorf("halfSpreadRatio should be positive")
|
return fmt.Errorf("halfSpread should be positive")
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user