package com.imsl.test.example.finance; import com.imsl.finance.*; import java.text.NumberFormat; /** *
* Computes the nominal interest rate.
* In this example the nominal interest rate is computed given that the * effective rate is 6.14% and that the interest has been compounded quarterly. * * * * @see Code * @see Output */ public class FinanceNominalEx1 { public static void main(String args[]) { double effectiveRate = .0614; int nper = 4; double nominalRate = Finance.nominal(effectiveRate, nper); NumberFormat nf = NumberFormat.getPercentInstance(); nf.setMaximumFractionDigits(2); System.out.println("The nominal rate of the effective rate, 6.14%, " + "compounded quarterly is " + nf.format(nominalRate)); } }