mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
optimizer: calculate equity diff from whole assets instead of first symbol
This commit is contained in:
parent
55a128ea90
commit
5ef34a3b61
|
@ -35,8 +35,8 @@ var TotalEquityDiff = func(summaryReport *backtest.SummaryReport) fixedpoint.Val
|
|||
return fixedpoint.Zero
|
||||
}
|
||||
|
||||
initEquity := summaryReport.SymbolReports[0].InitialEquityValue()
|
||||
finalEquity := summaryReport.SymbolReports[0].FinalEquityValue()
|
||||
initEquity := summaryReport.InitialEquityValue
|
||||
finalEquity := summaryReport.FinalEquityValue
|
||||
return finalEquity.Sub(initEquity)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user