bbgo_origin/pkg/strategy/rebalance/profit_stats_map.go
2023-03-13 00:49:49 +08:00

16 lines
302 B
Go

package rebalance
import "github.com/c9s/bbgo/pkg/types"
type ProfitStatsMap map[string]*types.ProfitStats
func NewProfitStatsMap(markets []types.Market) ProfitStatsMap {
m := make(ProfitStatsMap)
for _, market := range markets {
m[market.Symbol] = types.NewProfitStats(market)
}
return m
}