computeReturnOnInvestment method
Decimal
computeReturnOnInvestment(
- Decimal netBuyPrice,
- Decimal dGrossPnl
Implementation
Decimal computeReturnOnInvestment(Decimal netBuyPrice, Decimal dGrossPnl) {
final balance = netBuyPrice + dGrossPnl;
return toDecimal(balance / netBuyPrice) - Decimal.one;
}