예제 #1
0
        public static BufferedPLUSRipper GetBufferedPLUSRipper(string textToParse)
        {
            BufferedPLUSRipper buffPLUSRipper = new BufferedPLUSRipper {
                TextToParse = textToParse
            };

            addBasicDetailRippersToDealRipper(buffPLUSRipper);
            addPLUSDetailRippersToDealRipper(buffPLUSRipper);
            buffPLUSRipper.BufferRipper = DetailRipperFactory.GetNumberRipper(EDetailRipperType.Buffer);
            return(buffPLUSRipper);
        }
예제 #2
0
        public static TriggerPLUSRipper GetTriggerPLUSRipper(string textToParse)
        {
            TriggerPLUSRipper ripper = new TriggerPLUSRipper {
                TextToParse = textToParse
            };

            addBasicDetailRippersToDealRipper(ripper);
            addPLUSDetailRippersToDealRipper(ripper);
            ripper.KnockInBarrierRipper = DetailRipperFactory.GetNumberRipper(EDetailRipperType.KnockInBarrier);
            return(ripper);
        }
예제 #3
0
        public static BufferedJumpRipper GetBufferedJumpRipper(string textToParse)
        {
            BufferedJumpRipper ripper = new BufferedJumpRipper {
                TextToParse = textToParse
            };

            addBasicDetailRippersToDealRipper(ripper);
            addJumpDetailRippersToDealRipper(ripper);
            ripper.BufferRipper = DetailRipperFactory.GetNumberRipper(EDetailRipperType.Buffer);
            return(ripper);
        }
예제 #4
0
 private static void addPLUSDetailRippersToDealRipper(PLUSRipper plusRipper)
 {
     try
     {
         plusRipper.MaxReturnRipper = DetailRipperFactory.GetNumberRipper(EDetailRipperType.MaxPayment);
         plusRipper.UpsideIsCappedDeterminationRipper = DetailRipperFactory.GetMatchWasFoundRipper(EDetailRipperType.UpsideIsCapped);
         plusRipper.UpsideLeverageRipper = DetailRipperFactory.GetNumberRipper(EDetailRipperType.UpsideLeverage);
     }
     catch (Exception e)
     {
         throw new DealRipperFactoryException(
                   "addPLUSDetailRippersToDealRipper() encountered exception in DealRipperFactory class.", e);
     }
 }
예제 #5
0
 private static void addJumpDetailRippersToDealRipper(JumpRipper jumpRipper)
 {
     try
     {
         jumpRipper.DigitalRipper =
             (PriceOrPercentageRipper)DetailRipperFactory.GetNumberRipper(
                 EDetailRipperType.DigitalAmount);
         jumpRipper.UpsideIsCappedDeterminationRipper =
             DetailRipperFactory.GetMatchWasFoundRipper(EDetailRipperType.UpsideIsCapped);
     }
     catch (Exception e)
     {
         throw new DealRipperFactoryException("addJumpDetailRippersToDealRipper() encountered " +
                                              "exception in DealRipperFactory class.", e);
     }
 }
예제 #6
0
 private static void addPrincipalProtectedNoteDetailRippersToDealRipper(PrincipalProtectedNoteRipper ripper)
 {
     try
     {
         ripper.MaxReturnRipper = DetailRipperFactory.GetNumberRipper(
             EDetailRipperType.MaxPayment);
         ripper.UpsideIsCappedDeterminationRipper = DetailRipperFactory.GetMatchWasFoundRipper(
             EDetailRipperType.UpsideIsCapped);
         ripper.UpsideLeverageRipper = DetailRipperFactory.GetNumberRipper(
             EDetailRipperType.UpsideLeverage);
     }
     catch (Exception e)
     {
         string errorMsg = "addPrincipalProtectedNoteDetailRippersToDealRipper() encountered " +
                           "exception in DealRipperFactory class.";
         throw new DealRipperFactoryException(errorMsg, e);
     }
 }
예제 #7
0
 private static void addBasicDetailRippersToDealRipper(DealRipper basicRipper)
 {
     try
     {
         basicRipper.IssuerRipper             = DetailRipperFactory.GetStringRipper(EDetailRipperType.Issuer);
         basicRipper.CusipRipper              = DetailRipperFactory.GetStringRipper(EDetailRipperType.Cusip);
         basicRipper.FinalValuationDateRipper = DetailRipperFactory.GetDateRipper(EDetailRipperType.ValuationDate);
         basicRipper.InitialLevelRipper       = DetailRipperFactory.GetNumberRipper(EDetailRipperType.InitialUnderlyingLevel);
         basicRipper.ISINRipper          = DetailRipperFactory.GetStringRipper(EDetailRipperType.ISIN);
         basicRipper.NotionalRipper      = DetailRipperFactory.GetNumberRipper(EDetailRipperType.Notional);
         basicRipper.MaturityDateRipper  = DetailRipperFactory.GetDateRipper(EDetailRipperType.MaturityDate);
         basicRipper.ParRipper           = DetailRipperFactory.GetNumberRipper(EDetailRipperType.ParAmount);
         basicRipper.TradeDateRipper     = DetailRipperFactory.GetDateRipper(EDetailRipperType.TradeDate);
         basicRipper.StructureTypeRipper = DetailRipperFactory.GetStructureTypeRipper();
     }
     catch (Exception e)
     {
         throw new DealRipperFactoryException(
                   "addBasicDetailRippersToDealRipper() encountered exception in DealRipperFactory class.", e);
     }
 }
예제 #8
0
 private static void addAutocallableDetailRippersToDealRipper(AutocallableRipper ripper)
 {
     try
     {
         ripper.CouponBarrierRipper = DetailRipperFactory.GetNumberRipper(
             EDetailRipperType.CouponBarrier);
         ripper.KnockInBarrierRipper = DetailRipperFactory.GetNumberRipper(
             EDetailRipperType.KnockInBarrier);
         ripper.CouponAmountRipper = (CouponRipper)DetailRipperFactory.GetNumberRipper(
             EDetailRipperType.CouponAmount);
         ripper.CouponFrequencyRipper = DetailRipperFactory.GetStringRipper(
             EDetailRipperType.CouponFrequency);
         ripper.CallObservationDatesRipper = DetailRipperFactory.GetDateArrayRipper(
             EDetailRipperType.CallObservationDates);
         ripper.CouponObservationDatesRipper = DetailRipperFactory.GetDateArrayRipper(
             EDetailRipperType.CouponObservationDates);
     }
     catch (Exception e)
     {
         throw new DealRipperFactoryException("addAutocallableDetailRippersToDealRipper() " +
                                              "encountered exception in DealRipperFactory class.",
                                              e);
     }
 }