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 YoYOptionletVolatilitySurface extends VolatilityTermStructure implements org.quantlib.helpers.QuantLibJNIHelpers.AutoCloseable { 012 private transient long swigCPtr; 013 private transient boolean swigCMemOwnDerived; 014 015 protected YoYOptionletVolatilitySurface(long cPtr, boolean cMemoryOwn) { 016 super(QuantLibJNI.YoYOptionletVolatilitySurface_SWIGSmartPtrUpcast(cPtr), true); 017 swigCMemOwnDerived = cMemoryOwn; 018 swigCPtr = cPtr; 019 } 020 021 protected static long getCPtr(YoYOptionletVolatilitySurface 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_YoYOptionletVolatilitySurface(swigCPtr); 040 } 041 swigCPtr = 0; 042 } 043 super.delete(); 044 } 045 046 public Period observationLag() { 047 return new Period(QuantLibJNI.YoYOptionletVolatilitySurface_observationLag(swigCPtr, this), true); 048 } 049 050 public double frequency() { 051 return QuantLibJNI.YoYOptionletVolatilitySurface_frequency(swigCPtr, this); 052 } 053 054 public boolean indexIsInterpolated() { 055 return QuantLibJNI.YoYOptionletVolatilitySurface_indexIsInterpolated(swigCPtr, this); 056 } 057 058 public Date baseDate() { 059 return new Date(QuantLibJNI.YoYOptionletVolatilitySurface_baseDate(swigCPtr, this), true); 060 } 061 062 public double timeFromBase(Date date, Period obsLag) { 063 return QuantLibJNI.YoYOptionletVolatilitySurface_timeFromBase__SWIG_0(swigCPtr, this, Date.getCPtr(date), date, Period.getCPtr(obsLag), obsLag); 064 } 065 066 public double timeFromBase(Date date) { 067 return QuantLibJNI.YoYOptionletVolatilitySurface_timeFromBase__SWIG_1(swigCPtr, this, Date.getCPtr(date), date); 068 } 069 070 public double minStrike() { 071 return QuantLibJNI.YoYOptionletVolatilitySurface_minStrike(swigCPtr, this); 072 } 073 074 public double maxStrike() { 075 return QuantLibJNI.YoYOptionletVolatilitySurface_maxStrike(swigCPtr, this); 076 } 077 078 public double baseLevel() { 079 return QuantLibJNI.YoYOptionletVolatilitySurface_baseLevel(swigCPtr, this); 080 } 081 082 public double volatility(Date maturityDate, double strike, Period obsLag, boolean extrapolate) { 083 return QuantLibJNI.YoYOptionletVolatilitySurface_volatility__SWIG_0(swigCPtr, this, Date.getCPtr(maturityDate), maturityDate, strike, Period.getCPtr(obsLag), obsLag, extrapolate); 084 } 085 086 public double volatility(Date maturityDate, double strike, Period obsLag) { 087 return QuantLibJNI.YoYOptionletVolatilitySurface_volatility__SWIG_1(swigCPtr, this, Date.getCPtr(maturityDate), maturityDate, strike, Period.getCPtr(obsLag), obsLag); 088 } 089 090 public double volatility(Date maturityDate, double strike) { 091 return QuantLibJNI.YoYOptionletVolatilitySurface_volatility__SWIG_2(swigCPtr, this, Date.getCPtr(maturityDate), maturityDate, strike); 092 } 093 094 public double volatility(Period optionTenor, double strike, Period obsLag, boolean extrapolate) { 095 return QuantLibJNI.YoYOptionletVolatilitySurface_volatility__SWIG_3(swigCPtr, this, Period.getCPtr(optionTenor), optionTenor, strike, Period.getCPtr(obsLag), obsLag, extrapolate); 096 } 097 098 public double volatility(Period optionTenor, double strike, Period obsLag) { 099 return QuantLibJNI.YoYOptionletVolatilitySurface_volatility__SWIG_4(swigCPtr, this, Period.getCPtr(optionTenor), optionTenor, strike, Period.getCPtr(obsLag), obsLag); 100 } 101 102 public double volatility(Period optionTenor, double strike) { 103 return QuantLibJNI.YoYOptionletVolatilitySurface_volatility__SWIG_5(swigCPtr, this, Period.getCPtr(optionTenor), optionTenor, strike); 104 } 105 106 public double totalVariance(Date exerciseDate, double strike, Period obsLag, boolean extrapolate) { 107 return QuantLibJNI.YoYOptionletVolatilitySurface_totalVariance__SWIG_0(swigCPtr, this, Date.getCPtr(exerciseDate), exerciseDate, strike, Period.getCPtr(obsLag), obsLag, extrapolate); 108 } 109 110 public double totalVariance(Date exerciseDate, double strike, Period obsLag) { 111 return QuantLibJNI.YoYOptionletVolatilitySurface_totalVariance__SWIG_1(swigCPtr, this, Date.getCPtr(exerciseDate), exerciseDate, strike, Period.getCPtr(obsLag), obsLag); 112 } 113 114 public double totalVariance(Date exerciseDate, double strike) { 115 return QuantLibJNI.YoYOptionletVolatilitySurface_totalVariance__SWIG_2(swigCPtr, this, Date.getCPtr(exerciseDate), exerciseDate, strike); 116 } 117 118 public double totalVariance(Period optionTenor, double strike, Period obsLag, boolean extrapolate) { 119 return QuantLibJNI.YoYOptionletVolatilitySurface_totalVariance__SWIG_3(swigCPtr, this, Period.getCPtr(optionTenor), optionTenor, strike, Period.getCPtr(obsLag), obsLag, extrapolate); 120 } 121 122 public double totalVariance(Period optionTenor, double strike, Period obsLag) { 123 return QuantLibJNI.YoYOptionletVolatilitySurface_totalVariance__SWIG_4(swigCPtr, this, Period.getCPtr(optionTenor), optionTenor, strike, Period.getCPtr(obsLag), obsLag); 124 } 125 126 public double totalVariance(Period optionTenor, double strike) { 127 return QuantLibJNI.YoYOptionletVolatilitySurface_totalVariance__SWIG_5(swigCPtr, this, Period.getCPtr(optionTenor), optionTenor, strike); 128 } 129 130}