/// <summary>Opens a rates file and reads its content, using the specified delimiter. A parameter specifies whether the file contains a header that must be skipped.</summary> /// <param name="filePath">The <see cref="T:System.String"/> representing the file to open for reading.</param> /// <param name="delimiter">The <see cref="T:System.Char"/> representing the delimiter.</param> /// <param name="header"><c>true</c> if the rates file contains a header that must be skipped; otherwise, <c>false</c>.</param> /// <returns>An <see cref="T:InitialMargin.Core.FxRatesProvider"/> object containing the rates defined in the file.</returns> /// <exception cref="T:System.ArgumentException">Thrown when <paramref name="filePath">filePath</paramref> is invalid or does not refer to a CSV file, or when <paramref name="delimiter">delimiter</paramref> is invalid (see <see cref="M:InitialMargin.IO.CsvUtilities.IsValidDelimiter(System.Char)"/>).</exception> /// <exception cref="T:System.IO.FileNotFoundException">Thrown when <paramref name="filePath">filePath</paramref> could not be found.</exception> /// <exception cref="T:System.IO.InvalidDataException">Thrown when the rates file contains invalid or malformed data.</exception> public FxRatesProvider Read(String filePath, Char delimiter, Boolean header) { List <String[]> fieldsMatrix = CsvParser.Parse(filePath, m_Encoding, delimiter, header); FxRatesProvider ratesProvider = new FxRatesProvider(); if (fieldsMatrix.Count == 0) { return(ratesProvider); } foreach (var tuple in fieldsMatrix.Select((x, i) => new { Index = i, Value = x })) { Int32 index = tuple.Index + (header ? 2 : 1); String[] values = tuple.Value; if (values.Length != 3) { throw new InvalidDataException($"[{filePath}, Line {index}] The rates file contains an entry whose number of columns is not equal to 3."); } if (!Currency.TryParse(values[0], out Currency currency1)) { throw new InvalidDataException($"[{filePath}, Line {index}] The rates file contains an entry whose first currency ({values[0]}) is invalid."); } if (!Currency.TryParse(values[1], out Currency currency2)) { throw new InvalidDataException($"[{filePath}, Line {index}] The rates file contains an entry whose second currency ({values[1]}) is invalid."); } if (!Decimal.TryParse(values[2], NumberStyles.Any, m_FormatProvider, out Decimal rate) || (rate <= 0m)) { throw new InvalidDataException($"[{filePath}, Line {index}] The rates file contains an entry whose rate is invalid."); } if (currency1 == currency2) { if (rate != 1m) { throw new InvalidDataException($"[{filePath}, Line {index}] The rates file contains an entry with two identical currencies and a rate not equal to 1."); } continue; } CurrencyPair currencyPair = CurrencyPair.Of(currency1, currency2); if (ratesProvider.OriginalRates.ContainsKey(currencyPair)) { throw new InvalidDataException($"[{filePath}, Line {index}] The rates file contains a duplicate entry."); } ratesProvider.AddRate(currencyPair, rate); } return(ratesProvider); }
private static ReadOnlyCollection <DataEntity> CreateDataEntities() { DateTime today = DateTime.Today; DateTime todayPlus3M = today.AddMonths(3); DateTime todayPlus4Y = today.AddYears(4); DateTime todayPlus10Y = today.AddYears(10); Int32 tradeId = 0; RegulationsInfo ri = RegulationsInfo.Of(Regulation.Cftc); List <DataEntity> dataEntities = new List <DataEntity> { // Model - Sensitivities - Base Correlation Sensitivity.BaseCorrelation("CDX HY", Amount.Of(Currency.Usd, 200000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.BaseCorrelation("CDX HY", Amount.Of(Currency.Usd, -300000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.BaseCorrelation("CDX IG", Amount.Of(Currency.Usd, 100000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.BaseCorrelation("iTraxx XO", Amount.Of(Currency.Usd, 450000m), ri, CreateTradeInfoModel(++tradeId)), // Model - Sensitivities - Delta - Commodity Sensitivity.CommodityDelta("Coal Americas", BucketCommodity.Bucket1, Amount.Of(Currency.Usd, 3000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CommodityDelta("Coal Europe", BucketCommodity.Bucket1, Amount.Of(Currency.Usd, -5000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CommodityDelta("Middle Distillates America", BucketCommodity.Bucket3, Amount.Of(Currency.Usd, 15000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CommodityDelta("Middle Distillates Europe", BucketCommodity.Bucket3, Amount.Of(Currency.Usd, -20000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CommodityDelta("Middle Distillates Asia", BucketCommodity.Bucket3, Amount.Of(Currency.Usd, 32000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CommodityDelta("NA Natural Gas Gulf Coast", BucketCommodity.Bucket6, Amount.Of(Currency.Usd, 6500000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CommodityDelta("NA Natural Gas West", BucketCommodity.Bucket6, Amount.Of(Currency.Usd, 4000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CommodityDelta("Freight Wet", BucketCommodity.Bucket10, Amount.Of(Currency.Usd, 35000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CommodityDelta("Freight Dry", BucketCommodity.Bucket10, Amount.Of(Currency.Usd, -10000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CommodityDelta("Softs Coffee", BucketCommodity.Bucket14, Amount.Of(Currency.Usd, 2500000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CommodityDelta("Livestock Feeder Cattle", BucketCommodity.Bucket15, Amount.Of(Currency.Usd, -1200000m), ri, CreateTradeInfoModel(++tradeId)), // Model - Sensitivities - Delta - Credit Qualifying Sensitivity.CreditQualifyingDelta("ISIN:US3949181045", BucketCreditQualifying.Bucket1, Tenor.Y2, false, Amount.Of(Currency.Usd, 100000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CreditQualifyingDelta("ISIN:US3949181045", BucketCreditQualifying.Bucket1, Tenor.Y5, false, Amount.Of(Currency.Usd, -1500000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CreditQualifyingDelta("ISIN:US3949181045", BucketCreditQualifying.Bucket1, Tenor.Y3, false, Amount.Of(Currency.Usd, 1450000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CreditQualifyingDelta("ISIN:XS1061333921", BucketCreditQualifying.Bucket1, Tenor.Y10, false, Amount.Of(Currency.Usd, 400000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CreditQualifyingDelta("ISIN:CH0419041295", BucketCreditQualifying.Bucket4, Tenor.Y1, true, Amount.Of(Currency.Usd, -650000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CreditQualifyingDelta("ISIN:JP1718441K71", BucketCreditQualifying.Bucket4, Tenor.Y1, false, Amount.Of(Currency.Usd, 200000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CreditQualifyingDelta("ISIN:RU000A100H37", BucketCreditQualifying.Bucket7, Tenor.Y2, false, Amount.Of(Currency.Usd, -100000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CreditQualifyingDelta("ISIN:RU000A100H37", BucketCreditQualifying.Bucket7, Tenor.Y3, false, Amount.Of(Currency.Usd, 150000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CreditQualifyingDelta("ISIN:XS1886258598", BucketCreditQualifying.Bucket7, Tenor.Y1, false, Amount.Of(Currency.Usd, -120000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CreditQualifyingDelta("ISIN:XS1120672716", BucketCreditQualifying.Bucket7, Tenor.Y2, false, Amount.Of(Currency.Usd, 330000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CreditQualifyingDelta("ISIN:GB0702134646", BucketCreditQualifying.Bucket11, Tenor.Y2, false, Amount.Of(Currency.Usd, 1000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CreditQualifyingDelta("ISIN:GB0702134646", BucketCreditQualifying.Bucket11, Tenor.Y10, false, Amount.Of(Currency.Usd, -475000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CreditQualifyingDelta("ISIN:GB0702134646", BucketCreditQualifying.Bucket11, Tenor.Y3, false, Amount.Of(Currency.Usd, -500000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CreditQualifyingDelta("ISIN:FR0003504418", BucketCreditQualifying.BucketResidual, Tenor.Y2, false, Amount.Of(Currency.Usd, 400000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CreditQualifyingDelta("ISIN:XS2023221601", BucketCreditQualifying.BucketResidual, Tenor.Y10, false, Amount.Of(Currency.Usd, -300000m), ri, CreateTradeInfoModel(++tradeId)), // Model - Sensitivities - Delta - Credit Non-qualifying Sensitivity.CreditNonQualifyingDelta("ISIN:US3949181045", BucketCreditNonQualifying.Bucket1, Tenor.Y3, Amount.Of(Currency.Usd, 300000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CreditNonQualifyingDelta("ISIN:US3949181045", BucketCreditNonQualifying.Bucket1, Tenor.Y5, Amount.Of(Currency.Usd, 700000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CreditNonQualifyingDelta("ISIN:XS1061333921", BucketCreditNonQualifying.Bucket1, Tenor.Y2, Amount.Of(Currency.Usd, -500000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CreditNonQualifyingDelta("ISIN:XS1980681200", BucketCreditNonQualifying.Bucket2, Tenor.Y1, Amount.Of(Currency.Usd, -220000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CreditNonQualifyingDelta("ISIN:XS1980681200", BucketCreditNonQualifying.Bucket2, Tenor.Y10, Amount.Of(Currency.Usd, 200000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CreditNonQualifyingDelta("ISIN:DE000HVB34J9", BucketCreditNonQualifying.Bucket2, Tenor.Y2, Amount.Of(Currency.Usd, 800000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CreditNonQualifyingDelta("ISIN:FR0003507418", BucketCreditNonQualifying.BucketResidual, Tenor.Y5, Amount.Of(Currency.Usd, 300000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CreditNonQualifyingDelta("ISIN:XS2023221601", BucketCreditNonQualifying.BucketResidual, Tenor.Y3, Amount.Of(Currency.Usd, -270000m), ri, CreateTradeInfoModel(++tradeId)), // Model - Sensitivities - Delta - Equity Sensitivity.EquityDelta("ISIN:XS1980681200", BucketEquity.Bucket2, Amount.Of(Currency.Usd, 200000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.EquityDelta("ISIN:DE000HVB34J9", BucketEquity.Bucket2, Amount.Of(Currency.Usd, 500000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.EquityDelta("ISIN:DE000TK0T291", BucketEquity.Bucket5, Amount.Of(Currency.Usd, -1000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.EquityDelta("ISIN:DE000FF2AKA7", BucketEquity.Bucket5, Amount.Of(Currency.Usd, 3300000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.EquityDelta("ISIN:XS1896686544", BucketEquity.Bucket5, Amount.Of(Currency.Usd, 500000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.EquityDelta("ISIN:BE5631439402", BucketEquity.Bucket9, Amount.Of(Currency.Usd, 100000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.EquityDelta("ISIN:XS1006556794", BucketEquity.Bucket10, Amount.Of(Currency.Usd, 50000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.EquityDelta("ISIN:GB02BALKJB79", BucketEquity.Bucket10, Amount.Of(Currency.Usd, -150000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.EquityDelta("FTSE100", BucketEquity.Bucket11, Amount.Of(Currency.Usd, 600000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.EquityDelta("S&P500", BucketEquity.Bucket11, Amount.Of(Currency.Usd, -450000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.EquityDelta("ISIN:FR0003504418", BucketEquity.BucketResidual, Amount.Of(Currency.Usd, -75000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.EquityDelta("ISIN:XS2023221601", BucketEquity.BucketResidual, Amount.Of(Currency.Usd, 56000m), ri, CreateTradeInfoModel(++tradeId)), // Model - Sensitivities - Delta - FX Sensitivity.FxDelta(Currency.Eur, Amount.Of(Currency.Usd, 10000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.FxDelta(Currency.Eur, Amount.Of(Currency.Usd, -10000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.FxDelta(Currency.Nok, Amount.Of(Currency.Usd, 200000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.FxDelta(Currency.Mru, Amount.Of(Currency.Usd, 60000000m), ri, CreateTradeInfoModel(++tradeId)), // Model - Sensitivities - Delta - Rates - Cross-currency Basis Sensitivity.CrossCurrencyBasis(Currency.Gbp, Amount.Of(Currency.Usd, -15000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CrossCurrencyBasis(Currency.Usd, Amount.Of(Currency.Usd, 10000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CrossCurrencyBasis(Currency.Usd, Amount.Of(Currency.Usd, 10000000m), ri, CreateTradeInfoModel(++tradeId)), // Sensitivities - Delta - Rates - Inflation Sensitivity.InflationDelta(Currency.Cad, Amount.Of(Currency.Usd, 3000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.InflationDelta(Currency.Gbp, Amount.Of(Currency.Usd, -10000000m), ri, CreateTradeInfoModel(++tradeId)), // Model - Sensitivities - Delta - Rates - Interest Rate Sensitivity.InterestRateDelta(Currency.Gbp, Tenor.Y5, Curve.Libor6M, Amount.Of(Currency.Usd, -5000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.InterestRateDelta(Currency.Gbp, Tenor.M6, Curve.Ois, Amount.Of(Currency.Usd, 20000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.InterestRateDelta(Currency.Gbp, Tenor.Y2, Curve.Ois, Amount.Of(Currency.Usd, 30000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.InterestRateDelta(Currency.Jpy, Tenor.Y10, Curve.Libor3M, Amount.Of(Currency.Usd, 9000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.InterestRateDelta(Currency.Jpy, Tenor.Y20, Curve.Libor3M, Amount.Of(Currency.Usd, 1000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.InterestRateDelta(Currency.Inr, Tenor.W2, Curve.Ois, Amount.Of(Currency.Usd, -2000000m), ri, CreateTradeInfoModel(++tradeId)), // Model - Sensitivities - Vega - Commodity Sensitivity.CommodityVega("Precious Metals Silver", BucketCommodity.Bucket12, Tenor.W2, Amount.Of(Currency.Usd, 3500000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CommodityVega("Precious Metals Silver", BucketCommodity.Bucket12, Tenor.Y5, Amount.Of(Currency.Usd, -3200000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CommodityVega("Precious Metals Gold", BucketCommodity.Bucket12, Tenor.M6, Amount.Of(Currency.Usd, 1500000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CommodityVega("EU Power Germany", BucketCommodity.Bucket9, Tenor.Y1, Amount.Of(Currency.Usd, 1000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CommodityVega("EU Power Germany", BucketCommodity.Bucket9, Tenor.W2, Amount.Of(Currency.Usd, 4500000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CommodityVega("Crude Oil Americas", BucketCommodity.Bucket2, Tenor.Y15, Amount.Of(Currency.Usd, -1500000m), ri, CreateTradeInfoModel(++tradeId)), // Model - Sensitivities - Vega - Credit Qualifying Sensitivity.CreditQualifyingVega("EU.HY", BucketCreditQualifying.BucketResidual, Tenor.Y5, Amount.Of(Currency.Usd, -4000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CreditQualifyingVega("EU.IG", BucketCreditQualifying.BucketResidual, Tenor.Y1, Amount.Of(Currency.Usd, 1500000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CreditQualifyingVega("EU.IG", BucketCreditQualifying.Bucket2, Tenor.Y2, Amount.Of(Currency.Usd, 3000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CreditQualifyingVega("EU.IG", BucketCreditQualifying.Bucket2, Tenor.Y2, Amount.Of(Currency.Usd, -2000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CreditQualifyingVega("US.HY", BucketCreditQualifying.Bucket7, Tenor.Y10, Amount.Of(Currency.Usd, 3500000m), ri, CreateTradeInfoModel(++tradeId)), // Model - Sensitivities - Vega - Credit Non-qualifying Sensitivity.CreditNonQualifyingVega("EU.HY", BucketCreditNonQualifying.BucketResidual, Tenor.Y3, Amount.Of(Currency.Usd, 1200000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CreditNonQualifyingVega("EU.IG", BucketCreditNonQualifying.Bucket1, Tenor.Y2, Amount.Of(Currency.Usd, -2300000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CreditNonQualifyingVega("EU.IG", BucketCreditNonQualifying.BucketResidual, Tenor.Y3, Amount.Of(Currency.Usd, 4000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CreditNonQualifyingVega("EU.IG", BucketCreditNonQualifying.BucketResidual, Tenor.Y1, Amount.Of(Currency.Usd, -3500000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.CreditNonQualifyingVega("US.HY", BucketCreditNonQualifying.BucketResidual, Tenor.Y10, Amount.Of(Currency.Usd, -2600000m), ri, CreateTradeInfoModel(++tradeId)), // Model - Sensitivities - Vega - Equity Sensitivity.EquityVega("ISIN:US3949181045", BucketEquity.Bucket1, Tenor.Y5, Amount.Of(Currency.Usd, 2000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.EquityVega("ISIN:US3949181045", BucketEquity.Bucket1, Tenor.Y2, Amount.Of(Currency.Usd, -1800000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.EquityVega("ISIN:US3949181045", BucketEquity.Bucket1, Tenor.W2, Amount.Of(Currency.Usd, 6000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.EquityVega("ISIN:CH0419041295", BucketEquity.Bucket4, Tenor.Y3, Amount.Of(Currency.Usd, 5000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.EquityVega("ISIN:DE000HVB34J9", BucketEquity.Bucket4, Tenor.Y10, Amount.Of(Currency.Usd, -4500000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.EquityVega("ISIN:RU000A100H37", BucketEquity.Bucket7, Tenor.Y20, Amount.Of(Currency.Usd, -2700000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.EquityVega("VIX", BucketEquity.Bucket12, Tenor.Y15, Amount.Of(Currency.Usd, -1500000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.EquityVega("ISIN:FR0003504418", BucketEquity.BucketResidual, Tenor.M6, Amount.Of(Currency.Usd, 3000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.EquityVega("ISIN:FR0003504418", BucketEquity.BucketResidual, Tenor.M1, Amount.Of(Currency.Usd, -3200000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.EquityVega("ISIN:XS2023221601", BucketEquity.BucketResidual, Tenor.M3, Amount.Of(Currency.Usd, 4400000m), ri, CreateTradeInfoModel(++tradeId)), // Model - Sensitivities - Vega - FX Sensitivity.FxVega(CurrencyPair.Of(Currency.Usd, Currency.Eur), Tenor.M6, Amount.Of(Currency.Usd, 2500000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.FxVega(CurrencyPair.Of(Currency.Eur, Currency.Usd), Tenor.Y3, Amount.Of(Currency.Usd, 8500000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.FxVega(CurrencyPair.Of(Currency.Usd, Currency.Eur), Tenor.Y20, Amount.Of(Currency.Usd, -10000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.FxVega(CurrencyPair.Of(Currency.Brl, Currency.Cny), Tenor.Y2, Amount.Of(Currency.Usd, 6500000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.FxVega(CurrencyPair.Of(Currency.Jpy, Currency.Sgd), Tenor.M6, Amount.Of(Currency.Usd, -2500000m), ri, CreateTradeInfoModel(++tradeId)), // Sensitivities - Delta - Vega - Inflation Sensitivity.InflationVega(Currency.Eur, Tenor.Y5, Amount.Of(Currency.Usd, 15000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.InflationVega(Currency.Eur, Tenor.Y15, Amount.Of(Currency.Usd, -50000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.InflationVega(Currency.Usd, Tenor.Y20, Amount.Of(Currency.Usd, 100000000m), ri, CreateTradeInfoModel(++tradeId)), // Model - Sensitivities - Vega - Rates - Interest Rate Sensitivity.InterestRateVega(Currency.Usd, Tenor.M3, Amount.Of(Currency.Usd, 20000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.InterestRateVega(Currency.Usd, Tenor.Y1, Amount.Of(Currency.Usd, -30000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.InterestRateVega(Currency.Aud, Tenor.W2, Amount.Of(Currency.Usd, -13000000m), ri, CreateTradeInfoModel(++tradeId)), Sensitivity.InterestRateVega(Currency.Aud, Tenor.Y2, Amount.Of(Currency.Usd, -2500000m), ri, CreateTradeInfoModel(++tradeId)), // Model - Add-on - Fixed Amounts AddOnFixedAmount.Of(Amount.Of(Currency.Usd, 1650000m), ri), AddOnFixedAmount.Of(Amount.Of(Currency.Usd, 2000000m), ri), // Model - Add-on - Notionals AddOnNotional.Of("FlexiCallOption", Amount.Of(Currency.Usd, 1000000m), ri, CreateTradeInfoModel(++tradeId)), AddOnNotional.Of("FlexiCallOption", Amount.Of(Currency.Usd, -2000000m), ri, CreateTradeInfoModel(++tradeId)), AddOnNotional.Of("FlexiCallOption", Amount.Of(Currency.Usd, 1500000m), ri, CreateTradeInfoModel(++tradeId)), AddOnNotional.Of("FlexiPutOption", Amount.Of(Currency.Usd, -800000m), ri, CreateTradeInfoModel(++tradeId)), AddOnNotional.Of("FlexiPutOption", Amount.Of(Currency.Usd, -2200000m), ri, CreateTradeInfoModel(++tradeId)), // Model - Add-on - Notional Factors AddOnNotionalFactor.Of("FlexiCallOption", 0.06105m, ri), AddOnNotionalFactor.Of("FlexiPutOption", 0.02055m, ri), // Model - Add-on - Product Multipliers AddOnProductMultiplier.Of(Model.Product.Commodity, 0.075m, ri), AddOnProductMultiplier.Of(Model.Product.Credit, 0.11m, ri), AddOnProductMultiplier.Of(Model.Product.Equity, 0.015m, ri), AddOnProductMultiplier.Of(Model.Product.RatesFx, 0.205m, ri), // Schedule - Notionals Notional.Of(Schedule.Product.Commodity, Amount.Of(Currency.Cad, 1850000m), ri, CreateTradeInfoSchedule(1, todayPlus3M)), Notional.Of(Schedule.Product.Credit, Amount.Of(Currency.Usd, 2300000m), ri, CreateTradeInfoSchedule(2, todayPlus3M)), Notional.Of(Schedule.Product.Credit, Amount.Of(Currency.Usd, -900000m), ri, CreateTradeInfoSchedule(3, todayPlus10Y)), Notional.Of(Schedule.Product.Fx, Amount.Of(Currency.Usd, -5200000m), ri, CreateTradeInfoSchedule(4, todayPlus3M)), Notional.Of(Schedule.Product.Equity, Amount.Of(Currency.Usd, 1200000m), ri, CreateTradeInfoSchedule(5, todayPlus4Y)), Notional.Of(Schedule.Product.Rates, Amount.Of(Currency.Usd, 3700000m), ri, CreateTradeInfoSchedule(6, todayPlus3M)), Notional.Of(Schedule.Product.Rates, Amount.Of(Currency.Usd, -2000000m), ri, CreateTradeInfoSchedule(7, todayPlus4Y)), Notional.Of(Schedule.Product.Rates, Amount.Of(Currency.Gbp, -1750000m), ri, CreateTradeInfoSchedule(8, todayPlus10Y)), Notional.Of(Schedule.Product.Rates, Amount.Of(Currency.Eur, 1620000m), ri, CreateTradeInfoSchedule(8, todayPlus10Y)), Notional.Of(Schedule.Product.Other, Amount.Of(Currency.Usd, -120000m), ri, CreateTradeInfoSchedule(9, todayPlus3M)), Notional.Of(Schedule.Product.Other, Amount.Of(Currency.Usd, 2140000m), ri, CreateTradeInfoSchedule(9, todayPlus3M)), Notional.Of(Schedule.Product.Other, Amount.Of(Currency.Usd, 4350000m), ri, CreateTradeInfoSchedule(10, todayPlus4Y)), Notional.Of(Schedule.Product.Other, Amount.Of(Currency.Usd, 4100000m), ri, CreateTradeInfoSchedule(11, todayPlus10Y)), Notional.Of(Schedule.Product.Other, Amount.Of(Currency.Usd, -5120000m), ri, CreateTradeInfoSchedule(11, todayPlus10Y)), // Schedule - Present Values PresentValue.Of(Schedule.Product.Commodity, Amount.Of(Currency.Usd, 490000m), ri, CreateTradeInfoSchedule(1, todayPlus3M)), PresentValue.Of(Schedule.Product.Credit, Amount.Of(Currency.Usd, -60000m), ri, CreateTradeInfoSchedule(2, todayPlus3M)), PresentValue.Of(Schedule.Product.Credit, Amount.Of(Currency.Usd, 610000m), ri, CreateTradeInfoSchedule(3, todayPlus10Y)), PresentValue.Of(Schedule.Product.Fx, Amount.Of(Currency.Usd, 320000m), ri, CreateTradeInfoSchedule(4, todayPlus3M)), PresentValue.Of(Schedule.Product.Equity, Amount.Of(Currency.Usd, -230000m), ri, CreateTradeInfoSchedule(5, todayPlus4Y)), PresentValue.Of(Schedule.Product.Rates, Amount.Of(Currency.Usd, 1850000m), ri, CreateTradeInfoSchedule(6, todayPlus3M)), PresentValue.Of(Schedule.Product.Rates, Amount.Of(Currency.Usd, -450000m), ri, CreateTradeInfoSchedule(7, todayPlus4Y)), PresentValue.Of(Schedule.Product.Rates, Amount.Of(Currency.Gbp, -170000m), ri, CreateTradeInfoSchedule(8, todayPlus10Y)), PresentValue.Of(Schedule.Product.Rates, Amount.Of(Currency.Eur, 260000m), ri, CreateTradeInfoSchedule(8, todayPlus10Y)), PresentValue.Of(Schedule.Product.Other, Amount.Of(Currency.Usd, -60000m), ri, CreateTradeInfoSchedule(9, todayPlus3M)), PresentValue.Of(Schedule.Product.Other, Amount.Of(Currency.Usd, -240000m), ri, CreateTradeInfoSchedule(11, todayPlus10Y)), }; return(dataEntities.AsReadOnly()); }