Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="leg1Parameters"></param>
        /// <param name="leg2Parameters"></param>
        /// <returns></returns>
        public static Swap GenerateDefiniton(
            SwapLegParametersRange leg1Parameters,

            SwapLegParametersRange leg2Parameters)
        {
            InterestRateStream stream1 = InterestRateStreamParametricDefinitionGenerator.GenerateStreamDefinition(leg1Parameters);

            InterestRateStreamHelper.SetPayerAndReceiver(stream1, leg1Parameters.Payer, leg1Parameters.Receiver);
            InterestRateStream stream2 = InterestRateStreamParametricDefinitionGenerator.GenerateStreamDefinition(leg2Parameters);

            InterestRateStreamHelper.SetPayerAndReceiver(stream2, leg2Parameters.Payer, leg2Parameters.Receiver);
            return(SwapFactory.Create(stream1, stream2));
        }
Exemplo n.º 2
0
        public static CapFloor GenerateDefiniton(CapFloorLegParametersRange_Old capFloorLeg,
                                                 Schedule spreadSchedule,
                                                 Schedule capOrFloorSchedule,
                                                 NonNegativeSchedule notionalSchedule)
        {
            InterestRateStream capFloorStream = InterestRateStreamParametricDefinitionGenerator.GenerateStreamDefinition(capFloorLeg);

            InterestRateStreamHelper.SetPayerAndReceiver(capFloorStream, capFloorLeg.Payer, capFloorLeg.Receiver);
            var capFloor = new CapFloor {
                capFloorStream = capFloorStream
            };

            return(capFloor);
        }