Class BermudanSwaptionFromSwapSchedules

    • Constructor Detail

      • BermudanSwaptionFromSwapSchedules

        public BermudanSwaptionFromSwapSchedules​(LocalDateTime referenceDate,
                                                 BermudanSwaptionFromSwapSchedules.SwaptionType swaptionType,
                                                 LocalDate[] exerciseDates,
                                                 LocalDate swapEndDate,
                                                 double[] swaprates,
                                                 double[] notionals,
                                                 Schedule[] fixSchedules,
                                                 Schedule[] floatSchedules,
                                                 MonteCarloConditionalExpectationRegressionFactory conditionalExpectationRegressionFactory,
                                                 RegressionBasisFunctionsProvider regressionBasisFunctionProvider)
        Create a Bermudan swaption from an array of underlying swap schedules (fix leg and float leg), swap rates and notionals. This class implements the class backward algorithm using a provided factory for the determination of the conditional expectation. For conditionalExpectationRegressionFactory you may pass new MonteCarloConditionalExpectationLinearRegressionFactory() (default) or, e.g., new MonteCarloConditionalExpectationLocalizedOnDependentRegressionFactory(2.0).
        Parameters:
        referenceDate - The date associated with the inception (t=0) of this product. (Not used).
        swaptionType - The type of the underlying swap (PAYER, RECEIVER).
        exerciseDates - A vector of exercise dates.
        swapEndDate - The final maturity of the underlying swap.
        swaprates - A vector of swap rates for the underlying swaps.
        notionals - A vector of notionals for the underlying swaps.
        fixSchedules - A vector of fix leg schedules for the underlying swaps.
        floatSchedules - A vector of float leg schedules for the underlying swaps.
        conditionalExpectationRegressionFactory - A object implementing a factory creating a conditional expectation estimator from given regression basis functions
        regressionBasisFunctionProvider - An object implementing RegressionBasisFunctionsProvider to provide the basis functions for the estimation of conditional expectations.
      • BermudanSwaptionFromSwapSchedules

        public BermudanSwaptionFromSwapSchedules​(LocalDateTime referenceDate,
                                                 BermudanSwaptionFromSwapSchedules.SwaptionType swaptionType,
                                                 LocalDate[] exerciseDates,
                                                 LocalDate swapEndDate,
                                                 double[] swaprates,
                                                 double[] notionals,
                                                 Schedule[] fixSchedules,
                                                 Schedule[] floatSchedules,
                                                 RegressionBasisFunctionsProvider regressionBasisFunctionProvider)
        Create a Bermudan swaption.
        Parameters:
        referenceDate - The date associated with the inception (t=0) of this product. (Not used).
        swaptionType - The type of the underlying swap (PAYER, RECEIVER).
        exerciseDates - A vector of exercise dates.
        swapEndDate - The final maturity of the underlying swap.
        swaprates - A vector of swap rates for the underlying swaps.
        notionals - A vector of notionals for the underlying swaps.
        fixSchedules - A vector of fix leg schedules for the underlying swaps.
        floatSchedules - A vector of float leg schedules for the underlying swaps.
        regressionBasisFunctionProvider - An object implementing RegressionBasisFunctionsProvider to provide the basis functions for the estimation of conditional expectations.
      • BermudanSwaptionFromSwapSchedules

        public BermudanSwaptionFromSwapSchedules​(LocalDateTime referenceDate,
                                                 BermudanSwaptionFromSwapSchedules.SwaptionType swaptionType,
                                                 LocalDate[] exerciseDates,
                                                 LocalDate swapEndDate,
                                                 double[] swaprates,
                                                 double[] notionals,
                                                 Schedule[] fixSchedules,
                                                 Schedule[] floatSchedules)
        Create a Bermudan swaption.
        Parameters:
        referenceDate - The date associated with the inception (t=0) of this product. (Not used).
        swaptionType - The type of the underlying swap (PAYER, RECEIVER).
        exerciseDates - A vector of exercise dates.
        swapEndDate - The final maturity of the underlying swap.
        swaprates - A vector of swap rates for the underlying swaps.
        notionals - A vector of notionals for the underlying swaps.
        fixSchedules - A vector of fix leg schedules for the underlying swaps.
        floatSchedules - A vector of float leg schedules for the underlying swaps.
      • BermudanSwaptionFromSwapSchedules

        public BermudanSwaptionFromSwapSchedules​(LocalDateTime referenceDate,
                                                 BermudanSwaptionFromSwapSchedules.SwaptionType swaptionType,
                                                 LocalDate[] exerciseDates,
                                                 LocalDate swapEndDate,
                                                 double swaprate,
                                                 double notional,
                                                 Schedule[] fixSchedules,
                                                 Schedule[] floatSchedules)
        Create a Bermudan swaption.
        Parameters:
        referenceDate - The date associated with the inception (t=0) of this product.
        swaptionType - The type of the underlying swap (PAYER, RECEIVER).
        exerciseDates - A vector of exercise dates.
        swapEndDate - The final maturity of the underlying swap.
        swaprate - A constant swaprate applying to all underlying swaps.
        notional - A constant notional applying to all underlying swaps.
        fixSchedules - A vector of fix leg schedules for the underlying swaps.
        floatSchedules - A vector of float leg schedules for the underlying swaps.
    • Method Detail

      • getExerciseDates

        public LocalDate[] getExerciseDates()
        Returns the exercise dates.
        Returns:
        the exercise dates
      • getSwapEndDate

        public LocalDate getSwapEndDate()
        Returns:
        the swapEndDate
      • getValues

        public Map<String,​Object> getValues​(double evaluationTime,
                                                  LIBORModelMonteCarloSimulationModel model)
                                           throws CalculationException
        Description copied from interface: TermStructureMonteCarloProduct
        This method returns the valuation of the product within the specified model, evaluated at a given evalutationTime. The valuation is returned in terms of a map. The map may contain additional information. Note: For a lattice this is often the value conditional to evalutationTime, for a Monte-Carlo simulation this is the (sum of) value discounted to evaluation time. Cashflows prior evaluationTime are not considered.
        Specified by:
        getValues in interface TermStructureMonteCarloProduct
        Overrides:
        getValues in class AbstractLIBORMonteCarloProduct
        Parameters:
        evaluationTime - The time on which this products value should be observed.
        model - The model used to price the product.
        Returns:
        The random variable representing the value of the product discounted to evaluation time
        Throws:
        CalculationException - Thrown if the valuation fails, specific cause may be available via the cause() method.
      • getValue

        public RandomVariable getValue​(double evaluationTime,
                                       LIBORModelMonteCarloSimulationModel model)
                                throws CalculationException
        Description copied from interface: TermStructureMonteCarloProduct
        This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime. Note: For a lattice this is often the value conditional to evalutationTime, for a Monte-Carlo simulation this is the (sum of) value discounted to evaluation time. Cashflows prior evaluationTime are not considered.
        Specified by:
        getValue in interface TermStructureMonteCarloProduct
        Specified by:
        getValue in class AbstractLIBORMonteCarloProduct
        Parameters:
        evaluationTime - The time on which this products value should be observed.
        model - The model used to price the product.
        Returns:
        The random variable representing the value of the product discounted to evaluation time
        Throws:
        CalculationException - Thrown if the valuation fails, specific cause may be available via the cause() method.
      • getExerciseProbabilitiesFromTimes

        public double[] getExerciseProbabilitiesFromTimes​(LocalDateTime localDateTime,
                                                          RandomVariable exerciseTimes)
        Determines the vector of exercise probabilities for a given RandomVariable of exerciseTimes. The exerciseTimes is a random variable of FloatingpointDate offsets from a given referenceDate.
        Parameters:
        localDateTime - A given reference date.
        exerciseTimes - A RandomVariable of exercise times given as FloatingpointDate offsets from the given referenceDate.
        Returns:
        A vector of exercise probabilities. The length of the vector is exerciseDates.length+1. The last entry is the probability that no exercise occurs.
      • getBasisFunctions

        public RandomVariable[] getBasisFunctions​(double evaluationTime,
                                                  LIBORModelMonteCarloSimulationModel model)
                                           throws CalculationException
        Provides a set of \( \mathcal{F}_{t} \)-measurable random variables which can serve as regression basis functions.
        Parameters:
        evaluationTime - The evaluation time \( t \) at which the basis function should be observed.
        model - The Monte-Carlo model used to derive the basis function.
        Returns:
        An \( \mathcal{F}_{t} \)-measurable random variable.
        Throws:
        CalculationException - Thrown if derivation of the basis function fails.