mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 16:25:16 +00:00
optimizer: print best result in the same parameter order defined in config
This commit is contained in:
parent
4ea70de439
commit
bad0aa31b7
|
@ -147,8 +147,13 @@ var optimizeExCmd = &cobra.Command{
|
|||
color.Green("OPTIMIZE OBJECTIVE: %s\n", report.Objective)
|
||||
color.Green("BEST OBJECTIVE VALUE: %s\n", report.Best.Value)
|
||||
color.Green("OPTIMAL PARAMETERS:")
|
||||
for param, val := range report.Best.Parameters {
|
||||
color.Green(" - %s: %v", param, val)
|
||||
for _, selectorConfig := range optConfig.Matrix {
|
||||
label := selectorConfig.Label
|
||||
if val, exist := report.Best.Parameters[label]; exist {
|
||||
color.Green(" - %s: %v", label, val)
|
||||
} else {
|
||||
color.Red(" - %s: (invalid parameter definition)", label)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user