public RelinkableSwaptionVolatilityStructureHandle(SwaptionVolatilityStructure arg0) : this(NQuantLibcPINVOKE.new_RelinkableSwaptionVolatilityStructureHandle__SWIG_0(SwaptionVolatilityStructure.getCPtr(arg0)), true) { if (NQuantLibcPINVOKE.SWIGPendingException.Pending) { throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve(); } }
public void linkTo(SwaptionVolatilityStructure arg0) { NQuantLibcPINVOKE.RelinkableSwaptionVolatilityStructureHandle_linkTo(swigCPtr, SwaptionVolatilityStructure.getCPtr(arg0)); if (NQuantLibcPINVOKE.SWIGPendingException.Pending) { throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve(); } }
public BlackCalibrationHelperVector calibrationBasket(SwapIndex swapIndex, SwaptionVolatilityStructure swaptionVolatility, string typeStr) { BlackCalibrationHelperVector ret = new BlackCalibrationHelperVector(NQuantLibcPINVOKE.FloatFloatSwaption_calibrationBasket(swigCPtr, SwapIndex.getCPtr(swapIndex), SwaptionVolatilityStructure.getCPtr(swaptionVolatility), typeStr), true); if (NQuantLibcPINVOKE.SWIGPendingException.Pending) { throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public CalibrationHelperVector calibrationBasket(Index standardSwapBase, SwaptionVolatilityStructure swaptionVolatility, string typeStr) { CalibrationHelperVector ret = new CalibrationHelperVector(NQuantLibcPINVOKE.NonstandardSwaption_calibrationBasket(swigCPtr, Index.getCPtr(standardSwapBase), SwaptionVolatilityStructure.getCPtr(swaptionVolatility), typeStr), true); if (NQuantLibcPINVOKE.SWIGPendingException.Pending) { throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public SwaptionVolatilityStructure __deref__() { SwaptionVolatilityStructure ret = new SwaptionVolatilityStructure(NQuantLibcPINVOKE.SwaptionVolatilityStructureHandle___deref__(swigCPtr), true); if (NQuantLibcPINVOKE.SWIGPendingException.Pending) { throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public SwaptionVolatilityStructure __deref__() { global::System.IntPtr cPtr = NQuantLibcPINVOKE.SwaptionVolatilityStructureHandle___deref__(swigCPtr); SwaptionVolatilityStructure ret = (cPtr == global::System.IntPtr.Zero) ? null : new SwaptionVolatilityStructure(cPtr, true); if (NQuantLibcPINVOKE.SWIGPendingException.Pending) { throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
// utilities public void makeObservabilityTest(string description, SwaptionVolatilityStructure vol, bool mktDataFloating, bool referenceDateFloating) { double dummyStrike = .02; Date referenceDate = Settings.evaluationDate(); double initialVol = vol.volatility( referenceDate + atm.tenors.options[0], atm.tenors.swaps[0], dummyStrike, false); // testing evaluation date change ... Settings.setEvaluationDate(referenceDate - new Period(1, TimeUnit.Years)); double newVol = vol.volatility( referenceDate + atm.tenors.options[0], atm.tenors.swaps[0], dummyStrike, false); Settings.setEvaluationDate(referenceDate); if (referenceDateFloating && (initialVol == newVol)) { Assert.Fail(description + " the volatility should change when the reference date is changed !"); } if (!referenceDateFloating && (initialVol != newVol)) { Assert.Fail(description + " the volatility should not change when the reference date is changed !"); } // test market data change... if (mktDataFloating) { double initialVolatility = atm.volsHandle[0][0].link.value(); SimpleQuote sq = (SimpleQuote)(atm.volsHandle[0][0].currentLink()); sq.setValue(10); newVol = vol.volatility(referenceDate + atm.tenors.options[0], atm.tenors.swaps[0], dummyStrike, false); sq.setValue(initialVolatility); if (initialVol == newVol) { Assert.Fail(description + " the volatility should change when" + " the market data is changed !"); } } }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SwaptionVolatilityStructure obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }
public SwaptionVolatilityStructure __deref__() { SwaptionVolatilityStructure ret = new SwaptionVolatilityStructure(NQuantLibcPINVOKE.SwaptionVolatilityStructureHandle___deref__(swigCPtr), true); if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public SwaptionVolatilityStructureHandle(SwaptionVolatilityStructure arg0) : this(NQuantLibcPINVOKE.new_SwaptionVolatilityStructureHandle__SWIG_0(SwaptionVolatilityStructure.getCPtr(arg0)), true) { if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve(); }
public void linkTo(SwaptionVolatilityStructure arg0) { NQuantLibcPINVOKE.RelinkableSwaptionVolatilityStructureHandle_linkTo(swigCPtr, SwaptionVolatilityStructure.getCPtr(arg0)); if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve(); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SwaptionVolatilityStructure obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; }