Documentation of 'org.jquantlib.instruments.Bond' Java class
Bond
org.jquantlib.instruments

Class Bond

    • Constructor Detail

      • Bond

        public Bond(int settlementDays,
                    Calendar calendar,
                    double faceAmount,
                    Date maturityDate,
                    Date issueDate,
                    Leg cashflows)
        Old constructor for non amortizing bonds. /* Warning: The last passed cash flow must be the bond redemption. No other cash flow can have a date later than the redemption date.
        Parameters:
        settlementDays -
        calendar -
        faceAmount -
        maturityDate -
        issueDate -
        cashflows -
    • Method Detail

      • settlementDays

        public int settlementDays()
      • faceAmount

        public double faceAmount()
      • notionals

        public java.util.List<java.lang.Double> notionals()
      • cashflows

        public Leg cashflows()
      • redemptions

        public Leg redemptions()
      • maturityDate

        public Date maturityDate()
      • issueDate

        public Date issueDate()
      • notional

        public double notional()
        Note: new Date() as default argument.
      • notional

        public double notional(Date date)
      • redemption

        public CashFlow redemption()
      • settlementDate

        public Date settlementDate()
      • settlementDate

        public Date settlementDate(Date date)
      • cleanPrice

        public double cleanPrice()
        Theoretical clean price. The default bond settlement is used for calculation. Warning: the theoretical price calculated from a flat term structure might differ slightly from the price calculated from the corresponding yield by means of the other overload of this function. If the price from a constant yield is desired, it is advisable to use such other overload.
        Returns:
        The clean price of this bond.
      • dirtyPrice

        public double dirtyPrice()
        Theoretical dirty price. The default bond settlement is used for calculation. Warning: the theoretical price calculated from a flat term structure might differ slightly from the price calculated from the corresponding yield by means of the other overload of this function. If the price from a constant yield is desired, it is advisable to use such other overload.
        Returns:
        The dirty price of this bond.
      • settlementValue

        public double settlementValue()
        Theoretical settlement value. The default bond settlement date is used for calculation.
        Returns:
        The theoretical settlement value.
      • settlementValue

        public double settlementValue(double cleanPrice)
        Settlement value as a function of the clean price.The default bond settlement date is used for calculation.
        Parameters:
        cleanPrice -
        Returns:
        settlementValue
      • yield

        public double yield(DayCounter dc,
                            Compounding comp,
                            Frequency freq,
                            double accuracy,
                            int maxEvaluations)
        Theoretical bond yield /* The default bond settlement and theoretical price are used for calculation.
        Parameters:
        dc -
        comp -
        freq -
      • cleanPrice

        public double cleanPrice(double yield,
                                 DayCounter dc,
                                 Compounding comp,
                                 Frequency freq,
                                 Date settlementDate)
        Clean price given a yield and settlement date The default bond settlement is used if no date is given.
        Parameters:
        yield -
        dc -
        comp -
        freq -
        settlementDate -
        Returns:
        clean price
      • dirtyPrice

        public double dirtyPrice(double yield,
                                 DayCounter dc,
                                 Compounding comp,
                                 Frequency freq,
                                 Date settlementDate)
        Dirty price given a yield and settlement date The default bond settlement is used if no date is given.
        Parameters:
        yield -
        dc -
        comp -
        freq -
        settlementDate -
        Returns:
        dirty price
      • dirtyPrice

        public double dirtyPrice(double yield,
                                 DayCounter dc,
                                 Compounding comp,
                                 Frequency freq)
        see dirtyPrice() Default null settlement date is used.
        Parameters:
        yield -
        dc -
        comp -
        freq -
        Returns:
        dirty price
      • yield

        public double yield(double cleanPrice,
                            DayCounter dc,
                            Compounding comp,
                            Frequency freq,
                            Date settlementDate,
                            double accuracy,
                            int maxEvaluations)
        Yield given a (clean) price and settlement date The default bond settlement is used if no date is given.
        Parameters:
        cleanPrice -
        dc -
        comp -
        freq -
        settlementDate -
        accuracy -
        maxEvaluations -
        Returns:
      • cleanPriceFromZSpread

        public double cleanPriceFromZSpread(double zSpread,
                                            DayCounter dc,
                                            Compounding comp,
                                            Frequency freq,
                                            Date settlementDate)
        Clean price given Z-spread Z-spread compounding, frequency, daycount are taken into account The default bond settlement is used if no date is given. For details on Z-spread refer to: "Credit Spreads Explained", Lehman Brothers European Fixed Income Research - March 2004, D. O'Kane
        Parameters:
        zSpread -
        dc -
        comp -
        freq -
        settlementDate -
        Returns:
      • dirtyPriceFromZSpread

        public double dirtyPriceFromZSpread(double zSpread,
                                            DayCounter dc,
                                            Compounding comp,
                                            Frequency freq,
                                            Date settlement)
        Dirty price given Z-spread Z-spread compounding, frequency, daycount are taken into account The default bond settlement is used if no date is given. For details on Z-spread refer to: "Credit Spreads Explained", Lehman Brothers European Fixed Income Research - March 2004, D. O'Kane
        Parameters:
        zSpread -
        dc -
        comp -
        freq -
        settlementDate -
        Returns:
      • accruedAmount

        public double accruedAmount()
        Accrued amount at a given date /* The default bond settlement is used if no date is given.
        Returns:
        The accrued amount. double
      • accruedAmount

        public double accruedAmount(Date settlement)
      • isExpired

        public boolean isExpired()
        Specified by:
        isExpired in class Instrument
        Returns:
        true if the instrument is still tradeable.
      • nextCoupon

        public double nextCoupon(Date settlement)
        Expected next coupon: depending on (the bond and) the given date the coupon can be historic, deterministic or expected in a stochastic sense. When the bond settlement date is used the coupon is the already-fixed not-yet-paid one. The current bond settlement is used if no date is given.
        Returns:
      • nextCoupon

        public double nextCoupon()
      • previousCoupon

        public double previousCoupon(Date settlement)
        Previous coupon already paid at a given date /* Expected previous coupon: depending on (the bond and) the given date the coupon can be historic, deterministic or expected in a stochastic sense. When the bond settlement date is used the coupon is the last paid one. The current bond settlement is used if no date is given.
        Returns:
      • previousCoupon

        public double previousCoupon()
      • dirtyPriceFromYield

        public static double dirtyPriceFromYield(double faceAmount,
                                                 Leg cashflows,
                                                 double yield,
                                                 DayCounter dayCounter,
                                                 Compounding compounding,
                                                 Frequency frequency,
                                                 Date settlement)

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.