Skip to content

Commit

Permalink
#260 fix: dailyGainRate 수식 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
yonghwankim-dev committed Mar 6, 2024
1 parent d068149 commit c9b5dc6
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ public Double calculateDailyGainRate(PortfolioGainHistory prevHistory) {
if (prevCurrentValuation == 0) {
double currentValuation = calculateTotalCurrentValuation().doubleValue();
double totalInvestmentAmount = calculateTotalInvestmentAmount().doubleValue();
if (totalInvestmentAmount == 0) {
return 0.0;
}
return ((currentValuation - totalInvestmentAmount) / totalInvestmentAmount) * 100;
}
double currentValuation = calculateTotalCurrentValuation();
Expand Down

0 comments on commit c9b5dc6

Please sign in to comment.