backtest: correct final asset calculation

This commit is contained in:
Raphanus Lo 2022-07-13 17:20:48 +08:00
parent b9729b0c4f
commit 36bdacf3a3

View File

@ -86,7 +86,7 @@ func (r *SessionSymbolReport) InitialEquityValue() fixedpoint.Value {
} }
func (r *SessionSymbolReport) FinalEquityValue() fixedpoint.Value { func (r *SessionSymbolReport) FinalEquityValue() fixedpoint.Value {
return InQuoteAsset(r.FinalBalances, r.Market, r.StartPrice) return InQuoteAsset(r.FinalBalances, r.Market, r.LastPrice)
} }
func (r *SessionSymbolReport) Print(wantBaseAssetBaseline bool) { func (r *SessionSymbolReport) Print(wantBaseAssetBaseline bool) {