/// <summary>
 /// Initializes a new instance of the <see cref="GetFlowConventionsResponse" /> class.
 /// </summary>
 /// <param name="href">The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime..</param>
 /// <param name="value">value.</param>
 /// <param name="failed">The identifiers which did not resolve to a conventions along with the nature of the failure..</param>
 /// <param name="links">links.</param>
 public GetFlowConventionsResponse(string href = default(string), FlowConventions value = default(FlowConventions), Dictionary <string, ErrorDetail> failed = default(Dictionary <string, ErrorDetail>), List <Link> links = default(List <Link>))
 {
     this.Href   = href;
     this.Failed = failed;
     this.Links  = links;
     this.Href   = href;
     this.Value  = value;
     this.Failed = failed;
     this.Links  = links;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="LegDefinition" /> class.
        /// </summary>
        /// <param name="conventionName">conventionName.</param>
        /// <param name="conventions">conventions.</param>
        /// <param name="indexConvention">indexConvention.</param>
        /// <param name="indexConventionName">indexConventionName.</param>
        /// <param name="notionalExchangeType">what type of notional exchange does the leg have  Supported string (enumeration) values are: [None, Initial, Final, Both]. (required).</param>
        /// <param name="payReceive">Is the leg to be paid or received  Supported string (enumeration) values are: [NotDefined, Pay, Receive]. (required).</param>
        /// <param name="rateOrSpread">Is there either a fixed rate (non-zero) or spread to be paid over the value of the leg. (required).</param>
        /// <param name="resetConvention">Control how resets are generated relative to swap payment convention(s).  Supported string (enumeration) values are: [InAdvance, InArrears]..</param>
        /// <param name="stubType">If a stub is required should it be at the front or back of the leg.  Supported string (enumeration) values are: [Front, Back, Both]. (required).</param>
        public LegDefinition(FlowConventionName conventionName = default(FlowConventionName), FlowConventions conventions = default(FlowConventions), IndexConvention indexConvention = default(IndexConvention), FlowConventionName indexConventionName = default(FlowConventionName), string notionalExchangeType = default(string), string payReceive = default(string), decimal?rateOrSpread = default(decimal?), string resetConvention = default(string), string stubType = default(string))
        {
            // to ensure "notionalExchangeType" is required (not null)
            if (notionalExchangeType == null)
            {
                throw new InvalidDataException("notionalExchangeType is a required property for LegDefinition and cannot be null");
            }
            else
            {
                this.NotionalExchangeType = notionalExchangeType;
            }

            // to ensure "payReceive" is required (not null)
            if (payReceive == null)
            {
                throw new InvalidDataException("payReceive is a required property for LegDefinition and cannot be null");
            }
            else
            {
                this.PayReceive = payReceive;
            }

            // to ensure "rateOrSpread" is required (not null)
            if (rateOrSpread == null)
            {
                throw new InvalidDataException("rateOrSpread is a required property for LegDefinition and cannot be null");
            }
            else
            {
                this.RateOrSpread = rateOrSpread;
            }

            this.ResetConvention = resetConvention;
            // to ensure "stubType" is required (not null)
            if (stubType == null)
            {
                throw new InvalidDataException("stubType is a required property for LegDefinition and cannot be null");
            }
            else
            {
                this.StubType = stubType;
            }

            this.ConventionName      = conventionName;
            this.Conventions         = conventions;
            this.IndexConvention     = indexConvention;
            this.IndexConventionName = indexConventionName;
            this.ResetConvention     = resetConvention;
        }
Exemple #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Bond" /> class.
        /// </summary>
        /// <param name="startDate">The start date of the instrument. This is normally synonymous with the trade-date. (required).</param>
        /// <param name="maturityDate">The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount.              For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as              Constant Maturity Swaps (CMS) often have sensitivities to rates beyond their last payment date (required).</param>
        /// <param name="domCcy">The domestic currency of the instrument. (required).</param>
        /// <param name="flowConventions">flowConventions (required).</param>
        /// <param name="principal">The face-value or principal for the bond at outset.              This might be reduced through its lifetime in the event of amortization or similar. (required).</param>
        /// <param name="couponRate">simple coupon rate. (required).</param>
        /// <param name="identifiers">external market codes and identifiers for the bond, e.g. ISIN..</param>
        public Bond(DateTimeOffset?startDate = default(DateTimeOffset?), DateTimeOffset?maturityDate = default(DateTimeOffset?), string domCcy = default(string), FlowConventions flowConventions = default(FlowConventions), decimal?principal = default(decimal?), decimal?couponRate = default(decimal?), Dictionary <string, string> identifiers = default(Dictionary <string, string>), InstrumentTypeEnum instrumentType = default(InstrumentTypeEnum)) : base(instrumentType)
        {
            // to ensure "startDate" is required (not null)
            if (startDate == null)
            {
                throw new InvalidDataException("startDate is a required property for Bond and cannot be null");
            }
            else
            {
                this.StartDate = startDate;
            }

            // to ensure "maturityDate" is required (not null)
            if (maturityDate == null)
            {
                throw new InvalidDataException("maturityDate is a required property for Bond and cannot be null");
            }
            else
            {
                this.MaturityDate = maturityDate;
            }

            // to ensure "domCcy" is required (not null)
            if (domCcy == null)
            {
                throw new InvalidDataException("domCcy is a required property for Bond and cannot be null");
            }
            else
            {
                this.DomCcy = domCcy;
            }

            // to ensure "flowConventions" is required (not null)
            if (flowConventions == null)
            {
                throw new InvalidDataException("flowConventions is a required property for Bond and cannot be null");
            }
            else
            {
                this.FlowConventions = flowConventions;
            }

            // to ensure "principal" is required (not null)
            if (principal == null)
            {
                throw new InvalidDataException("principal is a required property for Bond and cannot be null");
            }
            else
            {
                this.Principal = principal;
            }

            // to ensure "couponRate" is required (not null)
            if (couponRate == null)
            {
                throw new InvalidDataException("couponRate is a required property for Bond and cannot be null");
            }
            else
            {
                this.CouponRate = couponRate;
            }

            this.Identifiers = identifiers;
            this.Identifiers = identifiers;
        }
Exemple #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TermDepositAllOf" /> class.
        /// </summary>
        /// <param name="startDate">The start date of the instrument. This is normally synonymous with the trade-date. (required).</param>
        /// <param name="maturityDate">The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount.              For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as              Constant Maturity Swaps (CMS) often have sensitivities to rates beyond their last payment date (required).</param>
        /// <param name="contractSize">With an OTC we have the problem of multiple ways of booking a quantity.              e.g.              If buying a swap do you have a holding of size 1 of 100,000,000 notional swap or a holding of 100,000,000 size of 1 notional swap, or any combination that multiplies to 10^8.              When you get for a price for a &#39;unit swap&#39; what do you mean? The definition must be consistent across all quotes. This includes bonds which have a face value and              fx-forwards which often trade in standard contract sizes. When we look up a price, and there are no units, we are assuming it is a price for a contract size of 1.              The logical effect of this is that              instrument clean price &#x3D; contract size * quoted unit price              holding clean price    &#x3D; holding quantity * instrument clean price &#x3D; holding quantity * contract size * quoted unit price              In calculating accrued interest the same should hold.              NB: The real problem is that people store \&quot;prices\&quot; without complete units. Everything should really be \&quot;x ccy for n units\&quot;. Where the n is implicit the above has to hold. (required).</param>
        /// <param name="flowConvention">flowConvention (required).</param>
        /// <param name="rate">The fixed rate for the term deposit. Specified as a decimal, e.g 0.03 is meant to be 3% interest (required).</param>
        /// <param name="instrumentType">The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashflowLeg, Unknown, TermDeposit (required).</param>
        public TermDepositAllOf(DateTimeOffset?startDate = default(DateTimeOffset?), DateTimeOffset?maturityDate = default(DateTimeOffset?), decimal?contractSize = default(decimal?), FlowConventions flowConvention = default(FlowConventions), decimal?rate = default(decimal?), InstrumentTypeEnum instrumentType = default(InstrumentTypeEnum))
        {
            // to ensure "startDate" is required (not null)
            if (startDate == null)
            {
                throw new InvalidDataException("startDate is a required property for TermDepositAllOf and cannot be null");
            }
            else
            {
                this.StartDate = startDate;
            }

            // to ensure "maturityDate" is required (not null)
            if (maturityDate == null)
            {
                throw new InvalidDataException("maturityDate is a required property for TermDepositAllOf and cannot be null");
            }
            else
            {
                this.MaturityDate = maturityDate;
            }

            // to ensure "contractSize" is required (not null)
            if (contractSize == null)
            {
                throw new InvalidDataException("contractSize is a required property for TermDepositAllOf and cannot be null");
            }
            else
            {
                this.ContractSize = contractSize;
            }

            // to ensure "flowConvention" is required (not null)
            if (flowConvention == null)
            {
                throw new InvalidDataException("flowConvention is a required property for TermDepositAllOf and cannot be null");
            }
            else
            {
                this.FlowConvention = flowConvention;
            }

            // to ensure "rate" is required (not null)
            if (rate == null)
            {
                throw new InvalidDataException("rate is a required property for TermDepositAllOf and cannot be null");
            }
            else
            {
                this.Rate = rate;
            }

            // to ensure "instrumentType" is required (not null)
            if (instrumentType == null)
            {
                throw new InvalidDataException("instrumentType is a required property for TermDepositAllOf and cannot be null");
            }
            else
            {
                this.InstrumentType = instrumentType;
            }
        }
Exemple #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UpsertFlowConventionsRequest" /> class.
 /// </summary>
 /// <param name="flowConventions">flowConventions.</param>
 public UpsertFlowConventionsRequest(FlowConventions flowConventions = default(FlowConventions))
 {
     this.FlowConventions = flowConventions;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="LegDefinition" /> class.
        /// </summary>
        /// <param name="rateOrSpread">Is there either a fixed rate (non-zero) or spread to be paid over the value of the leg..</param>
        /// <param name="indexConvention">indexConvention.</param>
        /// <param name="stubType">The available values are: Front, Back, Both (required).</param>
        /// <param name="payReceive">The available values are: NotDefined, Pay, Receive (required).</param>
        /// <param name="notionalExchangeType">The available values are: None, Initial, Final, Both (required).</param>
        /// <param name="conventions">conventions (required).</param>
        public LegDefinition(decimal?rateOrSpread = default(decimal?), IndexConvention indexConvention = default(IndexConvention), StubTypeEnum stubType = default(StubTypeEnum), PayReceiveEnum payReceive = default(PayReceiveEnum), NotionalExchangeTypeEnum notionalExchangeType = default(NotionalExchangeTypeEnum), FlowConventions conventions = default(FlowConventions))
        {
            // to ensure "stubType" is required (not null)
            if (stubType == null)
            {
                throw new InvalidDataException("stubType is a required property for LegDefinition and cannot be null");
            }
            else
            {
                this.StubType = stubType;
            }

            // to ensure "payReceive" is required (not null)
            if (payReceive == null)
            {
                throw new InvalidDataException("payReceive is a required property for LegDefinition and cannot be null");
            }
            else
            {
                this.PayReceive = payReceive;
            }

            // to ensure "notionalExchangeType" is required (not null)
            if (notionalExchangeType == null)
            {
                throw new InvalidDataException("notionalExchangeType is a required property for LegDefinition and cannot be null");
            }
            else
            {
                this.NotionalExchangeType = notionalExchangeType;
            }

            // to ensure "conventions" is required (not null)
            if (conventions == null)
            {
                throw new InvalidDataException("conventions is a required property for LegDefinition and cannot be null");
            }
            else
            {
                this.Conventions = conventions;
            }

            this.RateOrSpread    = rateOrSpread;
            this.IndexConvention = indexConvention;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="EquitySwap" /> class.
        /// </summary>
        /// <param name="startDate">The start date of the EquitySwap (required).</param>
        /// <param name="maturityDate">The maturity date of the EquitySwap. (required).</param>
        /// <param name="code">The code of the underlying. (required).</param>
        /// <param name="equityFlowConventions">equityFlowConventions (required).</param>
        /// <param name="fundingLeg">fundingLeg (required).</param>
        /// <param name="includeDividends">Dividend inclusion flag, if true dividends are included in the equity leg (total return). (required).</param>
        /// <param name="initialPrice">The initial equity price of the Equity Swap. (required).</param>
        /// <param name="notionalReset">Notional reset flag, if true the notional of the funding leg is reset at the start of every  coupon to match the value of the equity leg (equity price at start of coupon times quantity) (required).</param>
        /// <param name="quantity">The quantity or number of shares in the Equity Swap. (required).</param>
        /// <param name="underlyingIdentifier">external market codes and identifiers for the EquitySwap, e.g. RIC.  Supported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId]. (required).</param>
        public EquitySwap(DateTimeOffset?startDate = default(DateTimeOffset?), DateTimeOffset?maturityDate = default(DateTimeOffset?), string code = default(string), FlowConventions equityFlowConventions = default(FlowConventions), InstrumentLeg fundingLeg = default(InstrumentLeg), bool?includeDividends = default(bool?), decimal?initialPrice = default(decimal?), bool?notionalReset = default(bool?), decimal?quantity = default(decimal?), string underlyingIdentifier = default(string), InstrumentTypeEnum instrumentType = default(InstrumentTypeEnum)) : base(instrumentType)
        {
            // to ensure "startDate" is required (not null)
            if (startDate == null)
            {
                throw new InvalidDataException("startDate is a required property for EquitySwap and cannot be null");
            }
            else
            {
                this.StartDate = startDate;
            }

            // to ensure "maturityDate" is required (not null)
            if (maturityDate == null)
            {
                throw new InvalidDataException("maturityDate is a required property for EquitySwap and cannot be null");
            }
            else
            {
                this.MaturityDate = maturityDate;
            }

            // to ensure "code" is required (not null)
            if (code == null)
            {
                throw new InvalidDataException("code is a required property for EquitySwap and cannot be null");
            }
            else
            {
                this.Code = code;
            }

            // to ensure "equityFlowConventions" is required (not null)
            if (equityFlowConventions == null)
            {
                throw new InvalidDataException("equityFlowConventions is a required property for EquitySwap and cannot be null");
            }
            else
            {
                this.EquityFlowConventions = equityFlowConventions;
            }

            // to ensure "fundingLeg" is required (not null)
            if (fundingLeg == null)
            {
                throw new InvalidDataException("fundingLeg is a required property for EquitySwap and cannot be null");
            }
            else
            {
                this.FundingLeg = fundingLeg;
            }

            // to ensure "includeDividends" is required (not null)
            if (includeDividends == null)
            {
                throw new InvalidDataException("includeDividends is a required property for EquitySwap and cannot be null");
            }
            else
            {
                this.IncludeDividends = includeDividends;
            }

            // to ensure "initialPrice" is required (not null)
            if (initialPrice == null)
            {
                throw new InvalidDataException("initialPrice is a required property for EquitySwap and cannot be null");
            }
            else
            {
                this.InitialPrice = initialPrice;
            }

            // to ensure "notionalReset" is required (not null)
            if (notionalReset == null)
            {
                throw new InvalidDataException("notionalReset is a required property for EquitySwap and cannot be null");
            }
            else
            {
                this.NotionalReset = notionalReset;
            }

            // to ensure "quantity" is required (not null)
            if (quantity == null)
            {
                throw new InvalidDataException("quantity is a required property for EquitySwap and cannot be null");
            }
            else
            {
                this.Quantity = quantity;
            }

            // to ensure "underlyingIdentifier" is required (not null)
            if (underlyingIdentifier == null)
            {
                throw new InvalidDataException("underlyingIdentifier is a required property for EquitySwap and cannot be null");
            }
            else
            {
                this.UnderlyingIdentifier = underlyingIdentifier;
            }
        }