public static object _CreatePCACurveSimulator(string objectName,
                                               object[,] anchorDate,
                                               object[,] initialRates,
                                               object[,] tenors,
                                               object[,] components,
                                               object[,] vols,
                                               object[,] multiplier,
                                               object[,] useRelative,
                                               object[,] floorAtZero)
 {
     try
     {
         Date     _anchorDate   = XU.GetDate0D(anchorDate, "anchorDate");
         Double[] _initialRates = XU.GetDouble1D(initialRates, "initialRates");
         Tenor[]  _tenors       = XU.GetTenor1D(tenors, "tenors");
         Double[,] _components = XU.GetDouble2D(components, "components");
         Double[] _vols        = XU.GetDouble1D(vols, "vols");
         Double   _multiplier  = XU.GetDouble0D(multiplier, "multiplier");
         Boolean  _useRelative = XU.GetBoolean0D(useRelative, "useRelative");
         Boolean  _floorAtZero = XU.GetBoolean0D(floorAtZero, "floorAtZero");
         Object   _result      = XLCurves.CreatePCACurveSimulator(_anchorDate, _initialRates, _tenors, _components, _vols, _multiplier, _useRelative, _floorAtZero);
         return(XU.AddObject(objectName, _result));
     }
     catch (Exception e)
     {
         return(XU.Error0D(e));
     }
 }
예제 #2
0
 public static object _CreateCDS(string objectName,
                                 object[,] refEntity,
                                 object[,] ccy,
                                 object[,] paymentDates,
                                 object[,] notionals,
                                 object[,] rates,
                                 object[,] accrualFractions,
                                 object[,] boughtProtection)
 {
     try
     {
         var _refEntity        = XU.GetSpecialType0D <ReferenceEntity>(refEntity, "refEntity");
         var _ccy              = XU.GetSpecialType0D <Currency>(ccy, "ccy");
         var _paymentDates     = XU.GetDate1D(paymentDates, "paymentDates");
         var _notionals        = XU.GetDouble1D(notionals, "notionals");
         var _rates            = XU.GetDouble1D(rates, "rates");
         var _accrualFractions = XU.GetDouble1D(accrualFractions, "accrualFractions");
         var _boughtProtection = XU.GetBoolean0D(boughtProtection, "boughtProtection");
         var _result           = XLCredit.CreateCDS(_refEntity, _ccy, _paymentDates, _notionals, _rates, _accrualFractions,
                                                    _boughtProtection);
         return(XU.AddObject(objectName, _result));
     }
     catch (Exception e)
     {
         return(XU.Error0D(e));
     }
 }
예제 #3
0
 public static object _CreateZARBermudanSwaption(string objectName,
                                                 object[,] exerciseDates,
                                                 object[,] longOptionality,
                                                 object[,] startDate,
                                                 object[,] tenor,
                                                 object[,] rate,
                                                 object[,] payFixed,
                                                 object[,] notional)
 {
     try
     {
         var _exerciseDates   = XU.GetDate1D(exerciseDates, "exerciseDates");
         var _longOptionality = XU.GetBoolean0D(longOptionality, "longOptionality");
         var _startDate       = XU.GetDate0D(startDate, "startDate");
         var _tenor           = XU.GetSpecialType0D <Tenor>(tenor, "tenor");
         var _rate            = XU.GetDouble0D(rate, "rate");
         var _payFixed        = XU.GetBoolean0D(payFixed, "payFixed");
         var _notional        = XU.GetDouble0D(notional, "notional");
         var _result          = XLRates.CreateZARBermudanSwaption(_exerciseDates, _longOptionality, _startDate, _tenor,
                                                                  _rate, _payFixed, _notional);
         return(XU.AddObject(objectName, _result));
     }
     catch (Exception e)
     {
         return(XU.Error0D(e));
     }
 }
 public static object[,] _PCAFromCurves(object[,] curves,
                                        object[,] useRelative)
 {
     try
     {
         Double[,] _curves = XU.GetDouble2D(curves, "curves");
         Boolean _useRelative = XU.GetBoolean0D(useRelative, "useRelative");
         Double[,] _result = XLCurves.PCAFromCurves(_curves, _useRelative);
         return(XU.ConvertToObjects(_result));
     }
     catch (Exception e)
     {
         return(XU.Error2D(e));
     }
 }
예제 #5
0
 public static object _CreateZARFRA(string objectName,
                                    object[,] tradeDate,
                                    object[,] notional,
                                    object[,] rate,
                                    object[,] fraCode,
                                    object[,] payFixed)
 {
     try
     {
         var _tradeDate = XU.GetDate0D(tradeDate, "tradeDate");
         var _notional  = XU.GetDouble0D(notional, "notional");
         var _rate      = XU.GetDouble0D(rate, "rate");
         var _fraCode   = XU.GetSpecialType0D <string>(fraCode, "fraCode");
         var _payFixed  = XU.GetBoolean0D(payFixed, "payFixed");
         var _result    = XLRates.CreateZARFRA(_tradeDate, _notional, _rate, _fraCode, _payFixed);
         return(XU.AddObject(objectName, _result));
     }
     catch (Exception e)
     {
         return(XU.Error0D(e));
     }
 }
예제 #6
0
 public static object _CreateZARSwap(string objectName,
                                     object[,] startDate,
                                     object[,] tenor,
                                     object[,] rate,
                                     object[,] payFixed,
                                     object[,] notional)
 {
     try
     {
         var _startDate = XU.GetDate0D(startDate, "startDate");
         var _tenor     = XU.GetSpecialType0D <Tenor>(tenor, "tenor");
         var _rate      = XU.GetDouble0D(rate, "rate");
         var _payFixed  = XU.GetBoolean0D(payFixed, "payFixed");
         var _notional  = XU.GetDouble0D(notional, "notional");
         var _result    = XLRates.CreateZARSwap(_startDate, _tenor, _rate, _payFixed, _notional);
         return(XU.AddObject(objectName, _result));
     }
     catch (Exception e)
     {
         return(XU.Error0D(e));
     }
 }