Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PriceablePrincipalExchange"/> class.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <param name="payerIsBaseParty">A flag determining if the sign on the mamount is relative to the base party.</param>
 /// <param name="amount">The amount.</param>
 /// <param name="currency">The currency.</param>
 /// <param name="adjustedPaymentDate">The adjusted payment date.</param>
 /// <param name="paymentCalendar">Type paymentCalendar.</param>
 public PriceablePrincipalExchange
 (
     string id
     , bool payerIsBaseParty
     , Decimal amount
     , string currency
     , DateTime adjustedPaymentDate
     , IBusinessCalendar paymentCalendar) :
     base(id, "DiscountedCashflow", payerIsBaseParty, MoneyHelper.GetAmount(amount, currency), DateTypesHelper.ToAdjustableOrAdjustedDate(adjustedPaymentDate),
          PaymentTypeHelper.Create("Certain"), CashflowTypeHelper.Create(CashflowTypeEnum.PrincipalExchange.ToString()), false, paymentCalendar)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PriceablePrincipalExchange"/> class.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <param name="payerIsBase">The payerIsBase flag.</param>
 /// <param name="amount">The amount.</param>
 /// <param name="paymentDate">The payment date.</param>
 /// <param name="paymentCalendar">The paymentCalendar.</param>
 public BulletPaymentPricer
 (
     string id
     , bool payerIsBase
     , Money amount
     , AdjustableOrAdjustedDate paymentDate
     , IBusinessCalendar paymentCalendar) :
     base(id, "DiscountedCashflow", payerIsBase, amount, paymentDate,
          PaymentTypeHelper.Create("Certain"), CashflowTypeHelper.Create(CashflowTypeEnum.PrincipalExchange.ToString()),
          false, paymentCalendar)
 {
 }
Beispiel #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PriceablePayment"/> class.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <param name="payerPartyReference">The payer.</param>
 /// <param name="receiverPartyReference">The receiver.</param>
 /// <param name="payerIsBase">The payer is base flag.</param>
 /// <param name="amount">The amount.</param>
 /// <param name="paymentDate">The payment date.</param>
 /// <param name="paymentCalendar">Type paymentCalendar.</param>
 public PriceablePayment
 (
     string id
     , string payerPartyReference
     , string receiverPartyReference
     , bool payerIsBase
     , Money amount
     , AdjustableOrAdjustedDate paymentDate
     , IBusinessCalendar paymentCalendar) :
     base(id, "DiscountedCashflow", payerIsBase, amount, paymentDate, PaymentTypeHelper.Create("Certain"),
          CashflowTypeHelper.Create(CashflowTypeEnum.PrincipalExchange.ToString()), false, paymentCalendar)
 {
     PayerPartyReference    = PartyReferenceFactory.Create(payerPartyReference);
     ReceiverPartyReference = PartyReferenceFactory.Create(receiverPartyReference);
     OrderedPartyNames.Add(PayerPartyReference.href);
     OrderedPartyNames.Add(ReceiverPartyReference.href);
 }
Beispiel #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PriceableFxOptionPremium"/> class.
        /// </summary>
        /// <param name="id">The identifier.</param>
        /// <param name="receiverPartyReference">The receiver.</param>
        /// <param name="payerIsBase">The flag determining if the payer is the base party.</param>
        /// <param name="amount">The amount.</param>
        /// <param name="settlementDate">The adjusted payment date.</param>
        /// <param name="payerPartyReference">The payer.</param>
        /// <param name="premiumQuote">The premium quote </param>
        /// <param name="settlementInformation">The settlement information. </param>
        /// <param name="paymentCalendar">Type paymentCalendar.</param>
        public PriceableFxOptionPremium
        (
            string id
            , string payerPartyReference
            , string receiverPartyReference
            , bool payerIsBase
            , Money amount
            , DateTime settlementDate
            , PremiumQuote premiumQuote
            , SettlementInformation settlementInformation
            , IBusinessCalendar paymentCalendar) :
            base(id, "DiscountedCashflow", payerIsBase, amount,
                 AdjustableOrAdjustedDateHelper.CreateAdjustedDate(settlementDate),
                 PaymentTypeHelper.Create("Certain"), CashflowTypeHelper.Create(CashflowTypeEnum.Premium.ToString()), false, paymentCalendar)
        {
            PayerPartyReference    = PartyReferenceFactory.Create(payerPartyReference);
            ReceiverPartyReference = PartyReferenceFactory.Create(receiverPartyReference);
            OrderedPartyNames.Add(PayerPartyReference.href);
            OrderedPartyNames.Add(ReceiverPartyReference.href);
            if (premiumQuote != null)
            {
                PremiumQuote = new PremiumQuote
                {
                    quoteBasis          = premiumQuote.quoteBasis,
                    quoteBasisSpecified = true,
                    value          = premiumQuote.value,
                    valueSpecified = true
                };
            }
            if (settlementInformation == null)
            {
                return;
            }
            SettlementInformation = new SettlementInformation();
            var item = BinarySerializerHelper.Clone(settlementInformation.Item);

            SettlementInformation.Item = item;
        }