diff options
| -rw-r--r-- | python/csv_headers/bond_upload.py | 2 | ||||
| -rw-r--r-- | python/csv_headers/globeop_upload.py | 941 | ||||
| -rw-r--r-- | python/upload_bbh_trades.py | 4 |
3 files changed, 683 insertions, 264 deletions
diff --git a/python/csv_headers/bond_upload.py b/python/csv_headers/bond_upload.py index 4973fca7..db1eb066 100644 --- a/python/csv_headers/bond_upload.py +++ b/python/csv_headers/bond_upload.py @@ -1,4 +1,4 @@ -bbh_bonds = [ +BBH_BONDS = [ "Function of Instruction", "Client Reference Number", "Previous Reference Number", diff --git a/python/csv_headers/globeop_upload.py b/python/csv_headers/globeop_upload.py index db5de036..98e82755 100644 --- a/python/csv_headers/globeop_upload.py +++ b/python/csv_headers/globeop_upload.py @@ -1,269 +1,688 @@ -globeop_TRS = [ - "DealType", - "DealId", +HEADERS_PRE = [ + "Deal Type", + "Deal Id", "Action", "Client", - "Reserved", - "Reserved", - "Strategy ", + "Fund", + "Portfolio", + "Folder", "Custodian", - "CashAccount", + "Cash Account", "Counterparty", "Comments", "State", - "TradeDate", - "Reserved", - "Reserved", - "ReceiveLegRateType", - "ReceiveUnderlyingType", - "ReceiveUnderlyingSecurity", - "ReceiveUnderlyingDescription", - "ReceiveFloatRate", - "ReceiveFirstCouponDate", - "ReceiveFirstCouponRate", - "ReceiveFixedRate", - "ReceiveDaycount", - "ReceiveFrequency", - "ReceivePaymentBDC", - "ReceiveEffectiveDate", - "ReceiveMaturityDate", - "ReceiveNotional", - "ReceivePrice", - "ReceiveArrears", - "Reserved", - "Reserved", - "ReceiveCurrency", - "Reserved", - "ReceiveSpread", - "PayLegRateType", - "PayUnderlyingType", - "PayUnderlyingSecurity", - "PayUnderlyingDescription", - "PayFloatRate", - "PayFirstCouponDate", - "PayFirstCouponRate", - "PayFixedRate", - "PayDaycount", - "PayFrequency", - "PayPaymentBDC", - "PayEffectiveDate", - "PayMaturityDate", - "PayNotional", - "PayPrice", - "PayArrears", - "Reserved", - "Reserved", - "PayCurrency", - "Reserved", - "PaySpread", - "Reserved", - "InitialMargin", - "InitialMarginPercent", - "InitialMarginCurrency", - "ClientReference", - "CcpTradeRef", - "BlockId", - "BlockAmount", - "Netting Id", - "ExchangeRate", - "ReceiveQuantity", - "PayQuantity", - "ReceiveAccrued", - "PayAccrued", - "ReceiveNotionalExchange", - "PayNotionalExchange", - "ReceiveResetLag", - "PayResetLag", - "Reserved", - "Reserved", - "Reserved", - "Reserved", - "ReceiveCalendar", - "PayCalendar", - "ReceiveInterestCalcMethod", - "PayInterestCalcMethod", - "ReceiveCompoundAverageFrequency", - "PayCompoundAverageFrequency", - "ReceiveFixingFrequency", - "PayFixingFrequency", - "ReceiveStubLocation", - "ReceiveBeginFloatRate1", - "ReceiveBeginFloatRate2", - "ReceiveEndFloatRate1", - "ReceiveEndFloatRate2", - "PayStubLocation", - "PayBeginFloatRate1", - "PayBeginFloatRate2", - "PayEndFloatRate1", - "PayEndFloatRate2", - "Fees", - "Fee Payment Dates", - "Fee Comments", - "ExecutionDateTimeStamp", - "FeeTypes", - "FeeCurrencies", - "ReceivePaymentAt", - "PayPaymentAt", - "SwapType", - "Reserved1", - "ReceiveAccrualBDC", - "PayAccrualBDC", - "ReceiveMaturityBDC", - "PayMaturityBDC", - "ReceiveRollConvention", - "PayRollConvention", - "ReceivePaymentLag", - "PayPaymentLag", - "ReceiveSettlementCurrency", - "PaySettlementCurrency", - "Collateralized", - "TradeDateFX", + "Trade Date", ] -globeop_IRS = [ - "DealType", - "TradeId", - "ActionId", - "ClientId", - "Fund", - "Portfolio", - "StrategyId", - "CustodianId", - "CashAccountId", - "CounterpartyId", - "Comments", - "StateId", - "TradeDate", - "Reserved3", - "Reserved4", - "RecLegType", - "RecIndex", - "RecFirstCpnDate", - "RecFirstCpnRate", - "RecFixedRate", - "RecDayCount", - "RecPaymentFreq", - "ReceivePaymentBDC", - "RecEffectiveDate", - "RecMaturityDate", - "RecNotional", - "RecArrears", - "Reserved5", - "RecCompound", - "RecCurrency", - "Reserved6", - "PayLegType", - "PayIndex", - "PayFirstCpnDate", - "PayFirstCpnRate", - "PayFixedRate", - "PayDayCount", - "PayPaymentFreq", - "PayPaymentBDC", - "PayEffectiveDate", - "PayMaturityDate", - "PayNotional", - "PayArrears", - "Reserved7", - "PayCompound", - "PayCurrency", - "Reserved8", - "InitialMargin", - "InitialMarginPercent", - "InitialMarginCcy", - "CalendarPay", - "CalendarReceive", - "Reserved9", - "RecFloatingRateSpread", - "RecFixingFreq", - "RecInterestCalcMethod", - "Reserved10", - "PayFloatingRateSpread", - "PayFixingFreq", - "PayInterestCalcMethod", - "Reserved11", - "GiveUpBroker", - "RecBrokenPeriod", - "RecBeginFloatRate1", - "RecBeginFloatRate2", - "RecEndFloatRate1", - "RecEndFloatRate2", - "PayBrokenPeriod", - "PayBeginFloatRate1", - "PayBeginFloatRate2", - "PayEndFloatRate1", - "PayEndFloatRate2", - "Reserved12", - "Reserved13", - "SwapType", - "InflationMarketConv", - "ClientRef", - "Reserved14", - "Reserved15", - "Reserved16", - "Reserved17", - "Reserved18", - "Reserved19", - "RecResetLag", - "PayResetLag", - "RecExchangeAmount", - "PayExchangeAmount", - "AssociatedDealType", - "AssociatedDealId", - "ClearingFacility", - "CcpTradeRef", - "BreakClauseFreq", - "BlockId", - "BlockAmount", - "UpfrontFee", - "UpfrontFeePayDate", - "UpfrontFeeComment", - "UpfrontFeeCurrency", - "NettingId", - "BreakClauseDate", - "Reserved20", - "IndexLevel", - "TradeDateTime", - "ReceivePaymentLag", - "PayPaymentLag", - "ReceiveRateMultiplier", - "PayRateMultiplier", - "ReceiveRateCap", - "PayRateCap", - "ReceiveRateFloor", - "PayRateFloor", - "ReceiveRollConvention", - "PayRollConvention", - "ReceiveAccrualBDC", - "PayAccrualBDC", - "ReceiveMaturityBDC", - "PayMaturityBDC", - "ReceivePaymentAt", - "PayPaymentAt", - "ReceiveClientMargin", - "PayClientMargin", - "Resvered21", - "ReceiveRateCutOff", - "PayRateCutOff", - "ReceiveInflationLag", - "PayInflationLag", - "ReceiveSettlementCurrency", - "PaySettlementCurrency", - "CounterpartyReference", - "ReceiveInflationReference", - "PayInflationReference", - "Collateralized", - "InitialFXRate", - "TradeDateFX", - "ReceiveFixingSource", - "PayFixingSource", - "ReceiveFxFixingLag", - "PayFxFixingLag", - "ReceiveFxFixingCalendar", - "PayFxFixingCalendar", - "SEFFlag", - "ReceiveObservationShift", - "PayObservationShift", - "ReceiveCashFlowStubType", - "PayCashFlowStubType", -] +HEADERS = { + "bond": HEADERS_PRE + + [ + "Settlement Date", + "BrokerShortName", + "GlopeOp Security Identifier", + "CUSIP", + "ISIN", + "Sedol", + "Reserved", + "Reserved", + "Security Description", + "Transaction Indicator", + "SubTransaction Indicator", + "Quantity", + "Price", + "Commission", + "Tax", + "BlockId", + "BlockAmount", + "Reserved", + "Reserved", + "Accrued", + "ClearingMode", + "FaceAmount", + "Reserved", + "SettlementCurrency", + "Reserved", + "CrossCurrencyRate", + "ClientReference", + "Reserved", + "SettlementAmount", + "Yield", + "TradeDateTimeStamp", + "CpiRefRatio", + "SettlementCurrencyHedge", + "TradeDateFx", + ], + "cds": HEADERS_PRE + + [ + "Reserved", + "Reserved", + "EffectiveDate", + "MaturityDate", + "Currency", + "Notional", + "FixedRate", + "PaymentRollDateConvention", + "DayCount", + "PaymentFrequency", + "FirstCouponRate", + "FirstCouponDate", + "ResetLag", + "Liquidation", + "LiquidationDate", + "Protection", + "UnderlyingSecurityId", + "UnderlyingSecurityDescription", + "CreditSpreadCurve", + "CreditEvents", + "RecoveryRate", + "Settlement", + "InitialMargin", + "InitialMarginPercentage", + "InitialMarginCurrency", + "DiscountCurve", + "ClientReference", + "UpfrontFee", + "UpfrontFeePayDate", + "RegenerateCashFlow", + "UpfrontFeeComment", + "Executing Broker", + "SwapType", + "OnPrice", + "OffPrice", + "AttachmentPoint", + "ExhaustionPoint", + "Fees", + "Fee Payment Dates", + "Fee Comments", + "Credit Event Occurred", + "Calendar", + "Clearing Facility", + "Adjusted", + "CcpTradeRef", + "BlockId", + "BlockAmount", + "NettingId", + "AnnouncementDate", + "ExecTS", + "DefaultProbability", + "ClientMargin", + "Factor", + "ISDADefinition", + ], + "swaption": HEADERS_PRE + + [ + "Reserved", + "Reserved", + "Reserved", + "Notional", + "PremiumSettlementDate", + "ExpirationDate", + "PremiumCurrency", + "PercentageOfPremium", + "ExerciseType", + "Reserved", + "SettlementMode", + "SettlementRate", + "Transaction Indicator", + "InitialMargin", + "InitialMarginPercentage", + "InitialMarginCurrency", + "ReceiveLegRateType", + "ReceiveFloatRate", + "ReceiveFirstCouponDate", + "ReceiveFirstCouponRate", + "ReceiveFixedRate", + "ReceiveDaycount", + "ReceiveFrequency", + "ReceivePaymentRollConvention", + "ReceiveEffectiveDate", + "ReceiveMaturityDate", + "ReceiveNotional", + "ReceiveArrears", + "ReceiveAdjusted", + "ReceiveCompound", + "ReceiveCurrency", + "PayLegRateType", + "PayFloatRate", + "PayFirstCouponDate", + "PayFirstCouponRate", + "PayFixedRate", + "PayDaycount", + "PayFrequency", + "PayPaymentRollConvention", + "PayEffectiveDate", + "PayMaturityDate", + "PayNotional", + "PayArrears", + "PayAdjusted", + "PayCompound", + "PayCurrency", + "RegenerateCashFlow", + "GiveUpBroker", + "ClientReference", + "ReceiveDiscountCurve", + "ReceiveForwardCurve", + "PayDiscountCurve", + "PayForwardCurve", + "ReceiveFixingFrequency", + "ReceiveInterestCalcMethod", + "ReceiveCompoundAverageFrequency", + "PayFixingFrequency", + "PayInterestCalcMethod", + "PayCompoundAverageFrequency", + "SwapType", + "AttachmentPoint", + "ExhaustionPoint", + "UnderlyingInstrument", + "AssociatedDealType", + "AssociatedDealId", + "CounterpartyReference", + "PremiumSettlementCurrency", + "PremiumSettlementAmount", + "ReceiveIMM Period", + "PayIMMPeriod", + "Reserved", + "ClearingFacility", + "Strike", + "CcpTradeRef", + "BreakClauseFrequency", + "BlockId", + "BlockAmount", + "Cross Currency Premium Payment", + "Premium Payment Amount", + "Netting Id", + "BreakClauseDate", + ], + "future": HEADERS_PRE + + [ + "Settlement Date", + "Reserved", + "GlopeOp Security Identifier", + "Reserved", + "Reserved", + "Reserved", + "Bloomberg Ticker", + "RIC", + "Security Description", + "Transaction Indicator", + "SubTransaction Indicator", + "Quantity", + "Price", + "Commission", + "Tax", + "VAT", + "Trade Currency", + "Reserved", + "Reserved", + "Broker Short Name", + "MaturityDate", + "Exchange", + "Client Reference", + "Swap Type", + "Initial Margin", + "Initial Margin Currency", + "Future Event", + "Commission Entries", + "BlockId", + "Block Amount", + ], + "wire": HEADERS_PRE + + [ + "Settlement Date", + "Reserved", + "Reserved", + "Currency", + "Amount", + "Associated Deal Type", + "Associated Deal Id", + "Transaction Type", + "Instrument Type", + "Yield", + "Client Reference", + "ClearingFacility", + "Deal Function", + "Reset Price", + "Reset Date", + "Ccp Trade Ref", + "Margin Type", + "Block Id", + "Block Amount", + ], + "spot": HEADERS_PRE + + [ + "Settlement Date", + "Dealt Currency", + "Spot Rate", + "Forward Rate", + "Buy Currency", + "Buy Amount", + "Sell Currency", + "Sell Amount", + "ClearingFees", + "BlockId", + "BlockAmount", + "Commission Currency", + "Commission", + "Reserved", + "AssociatedDealType", + "AssociatedDealId", + "BrokerShortName", + "ClientReference", + ], + "fx_swap": HEADERS_PRE + + [ + "Reserved", + "Dealt Currency", + "Currency Pair", + "Near Side Currency Rate", + "Near Side Settlement Date", + "Near Side Buy Currency", + "Near Side Buy Amount", + "Near Side Sell Currency", + "Near Side Sell Amount", + "Reserved", + "Far Side Rate", + "Far Side Settlement Date", + "Far Side Point", + "Far Side Buy Currency", + "Far Side Buy Amount", + "Far Side Sell Currency", + "Far Side Sell Amount", + "Client Reference", + "BrokerShortName", + "CcpTradeRef", + "BlockId", + "BlockAmount", + ], + "repo": HEADERS_PRE + + [ + "Settlement Date", + "Broker", + "GlopeOp Security Identifier", + "CUSIP", + "ISIN", + "Sedol", + "Reserved", + "Reserved", + "Security Description", + "TransactionIndicator", + "CurrentFactor", + "Quantity", + "Price", + "Reserved", + "Reserved", + "Reserved", + "Currency", + "ExchangeRate", + "Comments", + "Reserved", + "ExpirationDate", + "Reserved", + "WeightedAmount", + "InterestCalcMethod", + "DirtyPrice", + "Haircut", + "RepoRate", + "OpenRepo", + "CallNotice", + "FaceAmount", + "AccruedInterest", + "Yield", + "CouponTo", + "DayCount", + "ClearingMode", + "SecurityType", + "BrokerShortName", + "ClientReference", + "DateTimeStamp", + ], + "capfloor": HEADERS_PRE + + [ + "Reserved", + "Reserved", + "FloatingRateIndex", + "FloatingRateIndexDescription", + "TransactionIndicator", + "Reserved", + "CapOrFloor", + "Notional", + "Strike", + "ValueDate", + "ExpirationDate", + "PremiumPercent", + "PremiumDate", + "PricingType", + "PaymentFrequency", + "FixingFrequency", + "DayCountConvention", + "PaymentBDC", + "Reserved", + "PaymentAtBeginningOrEnd", + "Commission", + "FirstCouponDate", + "InitialMargin", + "InitialMarginPercent", + "InitialMarginCurrency", + "Reserved", + "Reserved", + "Reserved", + "ResetLag", + "Adjusted", + "CashType", + "BinaryFixedAmount", + "BarrierPaymentAt", + "KnockPeriod", + "UpperBarrier", + "LowerBarrier", + "RebateUp", + "RebateDown", + "RebateSettlementLag", + "ClientReference", + "BrokerShortName", + "CptyReference", + "SwapType", + "ClearingFacility", + "CcpTradeRef", + "BlockId", + "BlockAmount", + "Netting Id", + "TradeDateTimeStamp", + "AccrualBDC", + "MaturityBDC", + "RollConvention", + "Calendar", + "Arrears", + "PaymentLag", + "Reserved1", + "InflationLag", + "InflationReference", + "SettlementCurrency", + "Collateralized", + "TradeDateFX", + ], + "trs": HEADERS_PRE + + [ + "TradeDate", + "Reserved", + "Reserved", + "ReceiveLegRateType", + "ReceiveUnderlyingType", + "ReceiveUnderlyingSecurity", + "ReceiveUnderlyingDescription", + "ReceiveFloatRate", + "ReceiveFirstCouponDate", + "ReceiveFirstCouponRate", + "ReceiveFixedRate", + "ReceiveDaycount", + "ReceiveFrequency", + "ReceivePaymentBDC", + "ReceiveEffectiveDate", + "ReceiveMaturityDate", + "ReceiveNotional", + "ReceivePrice", + "ReceiveArrears", + "Reserved", + "Reserved", + "ReceiveCurrency", + "Reserved", + "ReceiveSpread", + "PayLegRateType", + "PayUnderlyingType", + "PayUnderlyingSecurity", + "PayUnderlyingDescription", + "PayFloatRate", + "PayFirstCouponDate", + "PayFirstCouponRate", + "PayFixedRate", + "PayDaycount", + "PayFrequency", + "PayPaymentBDC", + "PayEffectiveDate", + "PayMaturityDate", + "PayNotional", + "PayPrice", + "PayArrears", + "Reserved", + "Reserved", + "PayCurrency", + "Reserved", + "PaySpread", + "Reserved", + "InitialMargin", + "InitialMarginPercent", + "InitialMarginCurrency", + "ClientReference", + "CcpTradeRef", + "BlockId", + "BlockAmount", + "Netting Id", + "ExchangeRate", + "ReceiveQuantity", + "PayQuantity", + "ReceiveAccrued", + "PayAccrued", + "ReceiveNotionalExchange", + "PayNotionalExchange", + "ReceiveResetLag", + "PayResetLag", + "Reserved", + "Reserved", + "Reserved", + "Reserved", + "ReceiveCalendar", + "PayCalendar", + "ReceiveInterestCalcMethod", + "PayInterestCalcMethod", + "ReceiveCompoundAverageFrequency", + "PayCompoundAverageFrequency", + "ReceiveFixingFrequency", + "PayFixingFrequency", + "ReceiveStubLocation", + "ReceiveBeginFloatRate1", + "ReceiveBeginFloatRate2", + "ReceiveEndFloatRate1", + "ReceiveEndFloatRate2", + "PayStubLocation", + "PayBeginFloatRate1", + "PayBeginFloatRate2", + "PayEndFloatRate1", + "PayEndFloatRate2", + "Fees", + "Fee Payment Dates", + "Fee Comments", + "ExecutionDateTimeStamp", + "FeeTypes", + "FeeCurrencies", + "ReceivePaymentAt", + "PayPaymentAt", + "SwapType", + "Reserved1", + "ReceiveAccrualBDC", + "PayAccrualBDC", + "ReceiveMaturityBDC", + "PayMaturityBDC", + "ReceiveRollConvention", + "PayRollConvention", + "ReceivePaymentLag", + "PayPaymentLag", + "ReceiveSettlementCurrency", + "PaySettlementCurrency", + "Collateralized", + "TradeDateFX", + ], + "irs": [ + "TradeDate", + "Reserved3", + "Reserved4", + "RecLegType", + "RecIndex", + "RecFirstCpnDate", + "RecFirstCpnRate", + "RecFixedRate", + "RecDayCount", + "RecPaymentFreq", + "ReceivePaymentBDC", + "RecEffectiveDate", + "RecMaturityDate", + "RecNotional", + "RecArrears", + "Reserved5", + "RecCompound", + "RecCurrency", + "Reserved6", + "PayLegType", + "PayIndex", + "PayFirstCpnDate", + "PayFirstCpnRate", + "PayFixedRate", + "PayDayCount", + "PayPaymentFreq", + "PayPaymentBDC", + "PayEffectiveDate", + "PayMaturityDate", + "PayNotional", + "PayArrears", + "Reserved7", + "PayCompound", + "PayCurrency", + "Reserved8", + "InitialMargin", + "InitialMarginPercent", + "InitialMarginCcy", + "CalendarPay", + "CalendarReceive", + "Reserved9", + "RecFloatingRateSpread", + "RecFixingFreq", + "RecInterestCalcMethod", + "Reserved10", + "PayFloatingRateSpread", + "PayFixingFreq", + "PayInterestCalcMethod", + "Reserved11", + "GiveUpBroker", + "RecBrokenPeriod", + "RecBeginFloatRate1", + "RecBeginFloatRate2", + "RecEndFloatRate1", + "RecEndFloatRate2", + "PayBrokenPeriod", + "PayBeginFloatRate1", + "PayBeginFloatRate2", + "PayEndFloatRate1", + "PayEndFloatRate2", + "Reserved12", + "Reserved13", + "SwapType", + "InflationMarketConv", + "ClientRef", + "Reserved14", + "Reserved15", + "Reserved16", + "Reserved17", + "Reserved18", + "Reserved19", + "RecResetLag", + "PayResetLag", + "RecExchangeAmount", + "PayExchangeAmount", + "AssociatedDealType", + "AssociatedDealId", + "ClearingFacility", + "CcpTradeRef", + "BreakClauseFreq", + "BlockId", + "BlockAmount", + "UpfrontFee", + "UpfrontFeePayDate", + "UpfrontFeeComment", + "UpfrontFeeCurrency", + "NettingId", + "BreakClauseDate", + "Reserved20", + "IndexLevel", + "TradeDateTime", + "ReceivePaymentLag", + "PayPaymentLag", + "ReceiveRateMultiplier", + "PayRateMultiplier", + "ReceiveRateCap", + "PayRateCap", + "ReceiveRateFloor", + "PayRateFloor", + "ReceiveRollConvention", + "PayRollConvention", + "ReceiveAccrualBDC", + "PayAccrualBDC", + "ReceiveMaturityBDC", + "PayMaturityBDC", + "ReceivePaymentAt", + "PayPaymentAt", + "ReceiveClientMargin", + "PayClientMargin", + "Resvered21", + "ReceiveRateCutOff", + "PayRateCutOff", + "ReceiveInflationLag", + "PayInflationLag", + "ReceiveSettlementCurrency", + "PaySettlementCurrency", + "CounterpartyReference", + "ReceiveInflationReference", + "PayInflationReference", + "Collateralized", + "InitialFXRate", + "TradeDateFX", + "ReceiveFixingSource", + "PayFixingSource", + "ReceiveFxFixingLag", + "PayFxFixingLag", + "ReceiveFxFixingCalendar", + "PayFxFixingCalendar", + "SEFFlag", + "ReceiveObservationShift", + "PayObservationShift", + "ReceiveCashFlowStubType", + "PayCashFlowStubType", + ], + "termination": [ + "DealType", + "DealId", + "Action", + "Client", + "SubAction", + "PartialTermination", + "TerminationAmount", + "TerminationDate", + "FeesPaid", + "FeesReceived", + "DealFunction", + "Reserved", + "ClientReference", + "TradeDate", + "EffectiveDate", + "FirstCouponDate", + "FeePaymentDate", + "SpecialInstructions", + "AssignedCounterparty", + "AssignmentFee", + "AssignedFeeTradeDate", + "AssignedFeeValueDate", + "AssignedCustodian", + "AssignedCashAccount", + "Reserved", + "FeeCurrency", + "GoTradeId", + "FeeComments", + "ZeroOutInterestCashFlows", + "Reserved", + "Reserved", + "Reserved", + "Reserved", + "Reserved", + "Reserved", + "Reserved", + "InitialMargin", + "InitialMarginCurrency", + ], +} diff --git a/python/upload_bbh_trades.py b/python/upload_bbh_trades.py index ccce36a2..b0da6dd8 100644 --- a/python/upload_bbh_trades.py +++ b/python/upload_bbh_trades.py @@ -7,12 +7,12 @@ from sqlalchemy.exc import IntegrityError from io import StringIO from serenitas.utils.env import DAILY_DIR from serenitas.utils.remote import SftpClient -from csv_headers.bond_upload import bbh_bonds +from csv_headers.bond_upload import BBH_BONDS if __name__ == "__main__": conn = dbconn("dawndb") with conn.cursor() as c: - headers = bbh_bonds + headers = BBH_BONDS sql_query = "SELECT bond_trades.*, counterparties.dtc_number FROM bond_trades LEFT JOIN counterparties ON cp_code=code WHERE cash_counterparty AND trade_date >= '2022-04-05' AND fund='BRINKER' and faceamount is not null and faceamount >0;" c.execute( sql_query, (datetime.date(2022, 4, 5),) |
