compoundInterest
Calculate compound interest (total amount after compounding).
principal(required): initial amountrate(required): interest rate per period as decimalperiods(required): number of compounding periods
bash
echo '{"principal": 1000, "rate": 0.05, "years": 10}' \
| utlx -e 'compoundInterest($input.principal, $input.rate, $input.years)'
# 1628.89 (approximately)utlx
{
futureValue: compoundInterest($input.principal, $input.annualRate, $input.years)
}