001/* ----------------------------------------------------------------------------
002 * This file was automatically generated by SWIG (https://www.swig.org).
003 * Version 4.1.1
004 *
005 * Do not make changes to this file unless you know what you are doing - modify
006 * the SWIG interface file instead.
007 * ----------------------------------------------------------------------------- */
008
009package org.quantlib;
010
011public class SabrSwaptionVolatilityCube extends SwaptionVolatilityCube implements org.quantlib.helpers.QuantLibJNIHelpers.AutoCloseable {
012  private transient long swigCPtr;
013  private transient boolean swigCMemOwnDerived;
014
015  protected SabrSwaptionVolatilityCube(long cPtr, boolean cMemoryOwn) {
016    super(QuantLibJNI.SabrSwaptionVolatilityCube_SWIGSmartPtrUpcast(cPtr), true);
017    swigCMemOwnDerived = cMemoryOwn;
018    swigCPtr = cPtr;
019  }
020
021  protected static long getCPtr(SabrSwaptionVolatilityCube obj) {
022    return (obj == null) ? 0 : obj.swigCPtr;
023  }
024
025  protected void swigSetCMemOwn(boolean own) {
026    swigCMemOwnDerived = own;
027    super.swigSetCMemOwn(own);
028  }
029
030  @SuppressWarnings("deprecation")
031  protected void finalize() {
032    delete();
033  }
034
035  public synchronized void delete() {
036    if (swigCPtr != 0) {
037      if (swigCMemOwnDerived) {
038        swigCMemOwnDerived = false;
039        QuantLibJNI.delete_SabrSwaptionVolatilityCube(swigCPtr);
040      }
041      swigCPtr = 0;
042    }
043    super.delete();
044  }
045
046  public SabrSwaptionVolatilityCube(SwaptionVolatilityStructureHandle atmVolStructure, PeriodVector optionTenors, PeriodVector swapTenors, DoubleVector strikeSpreads, QuoteHandleVectorVector volSpreads, SwapIndex swapIndex, SwapIndex shortSwapIndex, boolean vegaWeightedSmileFit, QuoteHandleVectorVector parametersGuess, BoolVector isParameterFixed, boolean isAtmCalibrated, EndCriteria endCriteria, double maxErrorTolerance, OptimizationMethod optMethod, double errorAccept, boolean useMaxError, long maxGuesses, boolean backwardFlat, double cutoffStrike) {
047    this(QuantLibJNI.new_SabrSwaptionVolatilityCube__SWIG_0(SwaptionVolatilityStructureHandle.getCPtr(atmVolStructure), atmVolStructure, PeriodVector.getCPtr(optionTenors), optionTenors, PeriodVector.getCPtr(swapTenors), swapTenors, DoubleVector.getCPtr(strikeSpreads), strikeSpreads, QuoteHandleVectorVector.getCPtr(volSpreads), volSpreads, SwapIndex.getCPtr(swapIndex), swapIndex, SwapIndex.getCPtr(shortSwapIndex), shortSwapIndex, vegaWeightedSmileFit, QuoteHandleVectorVector.getCPtr(parametersGuess), parametersGuess, BoolVector.getCPtr(isParameterFixed), isParameterFixed, isAtmCalibrated, EndCriteria.getCPtr(endCriteria), endCriteria, maxErrorTolerance, OptimizationMethod.getCPtr(optMethod), optMethod, errorAccept, useMaxError, maxGuesses, backwardFlat, cutoffStrike), true);
048  }
049
050  public SabrSwaptionVolatilityCube(SwaptionVolatilityStructureHandle atmVolStructure, PeriodVector optionTenors, PeriodVector swapTenors, DoubleVector strikeSpreads, QuoteHandleVectorVector volSpreads, SwapIndex swapIndex, SwapIndex shortSwapIndex, boolean vegaWeightedSmileFit, QuoteHandleVectorVector parametersGuess, BoolVector isParameterFixed, boolean isAtmCalibrated, EndCriteria endCriteria, double maxErrorTolerance, OptimizationMethod optMethod, double errorAccept, boolean useMaxError, long maxGuesses, boolean backwardFlat) {
051    this(QuantLibJNI.new_SabrSwaptionVolatilityCube__SWIG_1(SwaptionVolatilityStructureHandle.getCPtr(atmVolStructure), atmVolStructure, PeriodVector.getCPtr(optionTenors), optionTenors, PeriodVector.getCPtr(swapTenors), swapTenors, DoubleVector.getCPtr(strikeSpreads), strikeSpreads, QuoteHandleVectorVector.getCPtr(volSpreads), volSpreads, SwapIndex.getCPtr(swapIndex), swapIndex, SwapIndex.getCPtr(shortSwapIndex), shortSwapIndex, vegaWeightedSmileFit, QuoteHandleVectorVector.getCPtr(parametersGuess), parametersGuess, BoolVector.getCPtr(isParameterFixed), isParameterFixed, isAtmCalibrated, EndCriteria.getCPtr(endCriteria), endCriteria, maxErrorTolerance, OptimizationMethod.getCPtr(optMethod), optMethod, errorAccept, useMaxError, maxGuesses, backwardFlat), true);
052  }
053
054  public SabrSwaptionVolatilityCube(SwaptionVolatilityStructureHandle atmVolStructure, PeriodVector optionTenors, PeriodVector swapTenors, DoubleVector strikeSpreads, QuoteHandleVectorVector volSpreads, SwapIndex swapIndex, SwapIndex shortSwapIndex, boolean vegaWeightedSmileFit, QuoteHandleVectorVector parametersGuess, BoolVector isParameterFixed, boolean isAtmCalibrated, EndCriteria endCriteria, double maxErrorTolerance, OptimizationMethod optMethod, double errorAccept, boolean useMaxError, long maxGuesses) {
055    this(QuantLibJNI.new_SabrSwaptionVolatilityCube__SWIG_2(SwaptionVolatilityStructureHandle.getCPtr(atmVolStructure), atmVolStructure, PeriodVector.getCPtr(optionTenors), optionTenors, PeriodVector.getCPtr(swapTenors), swapTenors, DoubleVector.getCPtr(strikeSpreads), strikeSpreads, QuoteHandleVectorVector.getCPtr(volSpreads), volSpreads, SwapIndex.getCPtr(swapIndex), swapIndex, SwapIndex.getCPtr(shortSwapIndex), shortSwapIndex, vegaWeightedSmileFit, QuoteHandleVectorVector.getCPtr(parametersGuess), parametersGuess, BoolVector.getCPtr(isParameterFixed), isParameterFixed, isAtmCalibrated, EndCriteria.getCPtr(endCriteria), endCriteria, maxErrorTolerance, OptimizationMethod.getCPtr(optMethod), optMethod, errorAccept, useMaxError, maxGuesses), true);
056  }
057
058  public SabrSwaptionVolatilityCube(SwaptionVolatilityStructureHandle atmVolStructure, PeriodVector optionTenors, PeriodVector swapTenors, DoubleVector strikeSpreads, QuoteHandleVectorVector volSpreads, SwapIndex swapIndex, SwapIndex shortSwapIndex, boolean vegaWeightedSmileFit, QuoteHandleVectorVector parametersGuess, BoolVector isParameterFixed, boolean isAtmCalibrated, EndCriteria endCriteria, double maxErrorTolerance, OptimizationMethod optMethod, double errorAccept, boolean useMaxError) {
059    this(QuantLibJNI.new_SabrSwaptionVolatilityCube__SWIG_3(SwaptionVolatilityStructureHandle.getCPtr(atmVolStructure), atmVolStructure, PeriodVector.getCPtr(optionTenors), optionTenors, PeriodVector.getCPtr(swapTenors), swapTenors, DoubleVector.getCPtr(strikeSpreads), strikeSpreads, QuoteHandleVectorVector.getCPtr(volSpreads), volSpreads, SwapIndex.getCPtr(swapIndex), swapIndex, SwapIndex.getCPtr(shortSwapIndex), shortSwapIndex, vegaWeightedSmileFit, QuoteHandleVectorVector.getCPtr(parametersGuess), parametersGuess, BoolVector.getCPtr(isParameterFixed), isParameterFixed, isAtmCalibrated, EndCriteria.getCPtr(endCriteria), endCriteria, maxErrorTolerance, OptimizationMethod.getCPtr(optMethod), optMethod, errorAccept, useMaxError), true);
060  }
061
062  public SabrSwaptionVolatilityCube(SwaptionVolatilityStructureHandle atmVolStructure, PeriodVector optionTenors, PeriodVector swapTenors, DoubleVector strikeSpreads, QuoteHandleVectorVector volSpreads, SwapIndex swapIndex, SwapIndex shortSwapIndex, boolean vegaWeightedSmileFit, QuoteHandleVectorVector parametersGuess, BoolVector isParameterFixed, boolean isAtmCalibrated, EndCriteria endCriteria, double maxErrorTolerance, OptimizationMethod optMethod, double errorAccept) {
063    this(QuantLibJNI.new_SabrSwaptionVolatilityCube__SWIG_4(SwaptionVolatilityStructureHandle.getCPtr(atmVolStructure), atmVolStructure, PeriodVector.getCPtr(optionTenors), optionTenors, PeriodVector.getCPtr(swapTenors), swapTenors, DoubleVector.getCPtr(strikeSpreads), strikeSpreads, QuoteHandleVectorVector.getCPtr(volSpreads), volSpreads, SwapIndex.getCPtr(swapIndex), swapIndex, SwapIndex.getCPtr(shortSwapIndex), shortSwapIndex, vegaWeightedSmileFit, QuoteHandleVectorVector.getCPtr(parametersGuess), parametersGuess, BoolVector.getCPtr(isParameterFixed), isParameterFixed, isAtmCalibrated, EndCriteria.getCPtr(endCriteria), endCriteria, maxErrorTolerance, OptimizationMethod.getCPtr(optMethod), optMethod, errorAccept), true);
064  }
065
066  public SabrSwaptionVolatilityCube(SwaptionVolatilityStructureHandle atmVolStructure, PeriodVector optionTenors, PeriodVector swapTenors, DoubleVector strikeSpreads, QuoteHandleVectorVector volSpreads, SwapIndex swapIndex, SwapIndex shortSwapIndex, boolean vegaWeightedSmileFit, QuoteHandleVectorVector parametersGuess, BoolVector isParameterFixed, boolean isAtmCalibrated, EndCriteria endCriteria, double maxErrorTolerance, OptimizationMethod optMethod) {
067    this(QuantLibJNI.new_SabrSwaptionVolatilityCube__SWIG_5(SwaptionVolatilityStructureHandle.getCPtr(atmVolStructure), atmVolStructure, PeriodVector.getCPtr(optionTenors), optionTenors, PeriodVector.getCPtr(swapTenors), swapTenors, DoubleVector.getCPtr(strikeSpreads), strikeSpreads, QuoteHandleVectorVector.getCPtr(volSpreads), volSpreads, SwapIndex.getCPtr(swapIndex), swapIndex, SwapIndex.getCPtr(shortSwapIndex), shortSwapIndex, vegaWeightedSmileFit, QuoteHandleVectorVector.getCPtr(parametersGuess), parametersGuess, BoolVector.getCPtr(isParameterFixed), isParameterFixed, isAtmCalibrated, EndCriteria.getCPtr(endCriteria), endCriteria, maxErrorTolerance, OptimizationMethod.getCPtr(optMethod), optMethod), true);
068  }
069
070  public SabrSwaptionVolatilityCube(SwaptionVolatilityStructureHandle atmVolStructure, PeriodVector optionTenors, PeriodVector swapTenors, DoubleVector strikeSpreads, QuoteHandleVectorVector volSpreads, SwapIndex swapIndex, SwapIndex shortSwapIndex, boolean vegaWeightedSmileFit, QuoteHandleVectorVector parametersGuess, BoolVector isParameterFixed, boolean isAtmCalibrated, EndCriteria endCriteria, double maxErrorTolerance) {
071    this(QuantLibJNI.new_SabrSwaptionVolatilityCube__SWIG_6(SwaptionVolatilityStructureHandle.getCPtr(atmVolStructure), atmVolStructure, PeriodVector.getCPtr(optionTenors), optionTenors, PeriodVector.getCPtr(swapTenors), swapTenors, DoubleVector.getCPtr(strikeSpreads), strikeSpreads, QuoteHandleVectorVector.getCPtr(volSpreads), volSpreads, SwapIndex.getCPtr(swapIndex), swapIndex, SwapIndex.getCPtr(shortSwapIndex), shortSwapIndex, vegaWeightedSmileFit, QuoteHandleVectorVector.getCPtr(parametersGuess), parametersGuess, BoolVector.getCPtr(isParameterFixed), isParameterFixed, isAtmCalibrated, EndCriteria.getCPtr(endCriteria), endCriteria, maxErrorTolerance), true);
072  }
073
074  public SabrSwaptionVolatilityCube(SwaptionVolatilityStructureHandle atmVolStructure, PeriodVector optionTenors, PeriodVector swapTenors, DoubleVector strikeSpreads, QuoteHandleVectorVector volSpreads, SwapIndex swapIndex, SwapIndex shortSwapIndex, boolean vegaWeightedSmileFit, QuoteHandleVectorVector parametersGuess, BoolVector isParameterFixed, boolean isAtmCalibrated, EndCriteria endCriteria) {
075    this(QuantLibJNI.new_SabrSwaptionVolatilityCube__SWIG_7(SwaptionVolatilityStructureHandle.getCPtr(atmVolStructure), atmVolStructure, PeriodVector.getCPtr(optionTenors), optionTenors, PeriodVector.getCPtr(swapTenors), swapTenors, DoubleVector.getCPtr(strikeSpreads), strikeSpreads, QuoteHandleVectorVector.getCPtr(volSpreads), volSpreads, SwapIndex.getCPtr(swapIndex), swapIndex, SwapIndex.getCPtr(shortSwapIndex), shortSwapIndex, vegaWeightedSmileFit, QuoteHandleVectorVector.getCPtr(parametersGuess), parametersGuess, BoolVector.getCPtr(isParameterFixed), isParameterFixed, isAtmCalibrated, EndCriteria.getCPtr(endCriteria), endCriteria), true);
076  }
077
078  public SabrSwaptionVolatilityCube(SwaptionVolatilityStructureHandle atmVolStructure, PeriodVector optionTenors, PeriodVector swapTenors, DoubleVector strikeSpreads, QuoteHandleVectorVector volSpreads, SwapIndex swapIndex, SwapIndex shortSwapIndex, boolean vegaWeightedSmileFit, QuoteHandleVectorVector parametersGuess, BoolVector isParameterFixed, boolean isAtmCalibrated) {
079    this(QuantLibJNI.new_SabrSwaptionVolatilityCube__SWIG_8(SwaptionVolatilityStructureHandle.getCPtr(atmVolStructure), atmVolStructure, PeriodVector.getCPtr(optionTenors), optionTenors, PeriodVector.getCPtr(swapTenors), swapTenors, DoubleVector.getCPtr(strikeSpreads), strikeSpreads, QuoteHandleVectorVector.getCPtr(volSpreads), volSpreads, SwapIndex.getCPtr(swapIndex), swapIndex, SwapIndex.getCPtr(shortSwapIndex), shortSwapIndex, vegaWeightedSmileFit, QuoteHandleVectorVector.getCPtr(parametersGuess), parametersGuess, BoolVector.getCPtr(isParameterFixed), isParameterFixed, isAtmCalibrated), true);
080  }
081
082  public Matrix sparseSabrParameters() {
083    return new Matrix(QuantLibJNI.SabrSwaptionVolatilityCube_sparseSabrParameters(swigCPtr, this), true);
084  }
085
086  public Matrix denseSabrParameters() {
087    return new Matrix(QuantLibJNI.SabrSwaptionVolatilityCube_denseSabrParameters(swigCPtr, this), true);
088  }
089
090  public Matrix marketVolCube() {
091    return new Matrix(QuantLibJNI.SabrSwaptionVolatilityCube_marketVolCube(swigCPtr, this), true);
092  }
093
094  public Matrix volCubeAtmCalibrated() {
095    return new Matrix(QuantLibJNI.SabrSwaptionVolatilityCube_volCubeAtmCalibrated(swigCPtr, this), true);
096  }
097
098  public SabrSmileSection smileSection(double optionTime, double swapLength, boolean extr) {
099    long cPtr = QuantLibJNI.SabrSwaptionVolatilityCube_smileSection__SWIG_0(swigCPtr, this, optionTime, swapLength, extr);
100    return (cPtr == 0) ? null : new SabrSmileSection(cPtr, true);
101  }
102
103  public SabrSmileSection smileSection(double optionTime, double swapLength) {
104    long cPtr = QuantLibJNI.SabrSwaptionVolatilityCube_smileSection__SWIG_1(swigCPtr, this, optionTime, swapLength);
105    return (cPtr == 0) ? null : new SabrSmileSection(cPtr, true);
106  }
107
108  public SabrSmileSection smileSection(Period optionTenor, Period swapTenor, boolean extr) {
109    long cPtr = QuantLibJNI.SabrSwaptionVolatilityCube_smileSection__SWIG_2(swigCPtr, this, Period.getCPtr(optionTenor), optionTenor, Period.getCPtr(swapTenor), swapTenor, extr);
110    return (cPtr == 0) ? null : new SabrSmileSection(cPtr, true);
111  }
112
113  public SabrSmileSection smileSection(Period optionTenor, Period swapTenor) {
114    long cPtr = QuantLibJNI.SabrSwaptionVolatilityCube_smileSection__SWIG_3(swigCPtr, this, Period.getCPtr(optionTenor), optionTenor, Period.getCPtr(swapTenor), swapTenor);
115    return (cPtr == 0) ? null : new SabrSmileSection(cPtr, true);
116  }
117
118}