net.sourceforge.fixagora.basis.shared.control
Class YieldCalculator

java.lang.Object
  extended by net.sourceforge.fixagora.basis.shared.control.YieldCalculator

public class YieldCalculator
extends java.lang.Object

The Class YieldCalculator.


Nested Class Summary
static class YieldCalculator.CalcMethod
          The Enum CalcMethod.
 
Method Summary
static YieldCalculator getInstance()
          Gets the single instance of YieldCalculator.
 java.lang.Double getPrice(FSecurity fSecurity, double yield, java.util.Date settlementDate, int basis, YieldCalculator.CalcMethod calcMethod)
          Gets the price.
 java.lang.Double getYield(FSecurity fSecurity, double price, java.util.Date settlementDate, int basis, YieldCalculator.CalcMethod calcMethod)
          Gets the yield.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getYield

public java.lang.Double getYield(FSecurity fSecurity,
                                 double price,
                                 java.util.Date settlementDate,
                                 int basis,
                                 YieldCalculator.CalcMethod calcMethod)
Gets the yield.

Parameters:
fSecurity - the f security
price - the price
settlementDate - the settlement date
basis - the basis
calcMethod - the calc method
Returns:
the yield

getPrice

public java.lang.Double getPrice(FSecurity fSecurity,
                                 double yield,
                                 java.util.Date settlementDate,
                                 int basis,
                                 YieldCalculator.CalcMethod calcMethod)
Gets the price.

Parameters:
fSecurity - the f security
yield - the yield
settlementDate - the settlement date
basis - the basis
calcMethod - the calc method
Returns:
the price

getInstance

public static YieldCalculator getInstance()
Gets the single instance of YieldCalculator.

Returns:
single instance of YieldCalculator