Exemple #1
0
class InterestAccrualsCurrency(Schema, AccountMixin):
    """ Wrapped in <InterestAccruals> """
    currency = OneOf(*CURRENCY_CODES)
    fromDate = Date()
    toDate = Date()
    startingAccrualBalance = Decimal()
    interestAccrued = Decimal()
    accrualReversal = Decimal()
    fxTranslation = Decimal()
    endingAccrualBalance = Decimal()
Exemple #2
0
class StatementOfFundsLine(Schema, AccountMixin, SecurityMixin):
    """ Wrapped in <StmtFunds> """
    currency = OneOf(*CURRENCY_CODES)
    reportDate = Date()
    date = Date()
    activityDescription = String()
    tradeID = String()
    debit = Decimal()
    credit = Decimal()
    amount = Decimal()
    balance = Decimal()
    buySell = String()
Exemple #3
0
class TradeTransfer(Schema, TradeMixin):
    """ Wrapped in <TradeTransfers> """
    # Oddly, TradeTransfer uses YYYYMMDD format for origTradeDate
    # instead of ISO format like Trade
    origTradeDate = Date()
    brokerName = String()
    brokerAccount = String()
    awayBrokerCommission = Decimal()
    regulatoryFee = Decimal()
    direction = OneOf("To", "From")
    deliveredReceived = OneOf("Delivered", "Received")
    netTradeMoney = Decimal()
    netTradeMoneyInBase = Decimal()
    netTradePrice = Decimal()
Exemple #4
0
class Trade(Schema, TradeMixin):
    """ Wrapped in <Trades> """
    buySell = OneOf("BUY", "BUY (Ca.)", "SELL", "SELL (Ca.)")
    ibOrderID = String()
    ibExecID = String()
    brokerageOrderID = String()
    orderReference = String()
    volatilityOrderLink = String()
    exchOrderId = String()
    extExecID = String()
    # Despite the name, orderTime actually contains both date & time data.
    orderTime = DateTime()
    changeInPrice = Decimal()
    changeInQuantity = Decimal()
    orderType = OneOf("LMT", "MKT")
    traderID = String()
    isAPIOrder = Boolean()
Exemple #5
0
class SecurityMixin(object):
    assetCategory = String()
    symbol = String()
    description = String()
    conid = String()
    securityID = String()
    securityIDType = String()
    cusip = String()
    isin = String()
    underlyingConid = String()
    underlyingSymbol = String()
    issuer = String()
    multiplier = Decimal()
    strike = Decimal()
    expiry = Date()
    putCall = String()
    principalAdjustFactor = Decimal()
Exemple #6
0
class MTMPerformanceSummaryUnderlying(Schema, AccountMixin, SecurityMixin):
    """ Wrapped in <MTMPerformanceSummaryInBase> """
    listingExchange = String()
    underlyingSecurityID = String()
    underlyingListingExchange = String()
    reportDate = Date()
    prevCloseQuantity = Decimal()
    prevClosePrice = Decimal()
    closeQuantity = Decimal()
    closePrice = Decimal()
    transactionMtm = Decimal()
    priorOpenMtm = Decimal()
    commissions = Decimal()
    other = Decimal()
    total = Decimal()
    code = List()
Exemple #7
0
class OptionEAE(Schema, AccountMixin, CurrencyMixin, SecurityMixin):
    """
    Option Exercise, Assignment, or Expiration

    Wrapped in (identically-named) <OptionEAE>
    """
    date = Date()
    transactionType = OneOf("Assignment", "Exercise", "Expiration", "Sell")
    quantity = Decimal()
    tradePrice = Decimal()
    markPrice = Decimal()
    proceeds = Decimal()
    commisionsAndTax = Decimal()
    costBasis = Decimal()
    realizedPnl = Decimal()
    fxPnl = Decimal()
    mtmPnl = Decimal()
    tradeID = String()
Exemple #8
0
class CashTransaction(Schema, AccountMixin, CurrencyMixin, SecurityMixin):
    """ Wrapped in <CashTransactions> """
    # Despite the name, dateTime actually contains only the date.
    dateTime = Date()
    amount = Decimal()
    type = OneOf("Deposits/Withdrawals", "Broker Interest Paid",
                 "Broker Interest Received", "Withholding Tax",
                 "Bond Interest Received", "Bond Interest Paid", "Other Fees",
                 "Dividends", "Payment In Lieu Of Dividends")
    tradeID = String()
    code = List()
    transactionID = String()
    reportDate = Date()
    clientReference = String()
Exemple #9
0
class Transfer(Schema, AccountMixin, CurrencyMixin, SecurityMixin):
    """ Wrapped in <Transfers> """
    date = Date()
    type = OneOf("INTERNAL", "ACATS")
    direction = OneOf("IN", "OUT")
    company = String()
    account = String()
    accountName = String()
    quantity = Decimal()
    transferPrice = Decimal()
    positionAmount = Decimal()
    positionAmountInBase = Decimal()
    pnlAmount = Decimal()
    pnlAmountInBase = Decimal()
    fxPnl = Decimal()
    cashTransfer = Decimal()
    code = List()
    clientReference = String()
Exemple #10
0
class DividendAccrualMixin(AccountMixin, CurrencyMixin, SecurityMixin):
    exDate = Date()
    payDate = Date()
    quantity = Decimal()
    tax = Decimal()
    fee = Decimal()
    grossRate = Decimal()
    grossAmount = Decimal()
    netAmount = Decimal()
    code = List()
    fromAcct = String()
    toAcct = String()
Exemple #11
0
class OpenPosition(Schema, AccountMixin, CurrencyMixin, SecurityMixin):
    """ Wrapped in <OpenPositions> """
    reportDate = Date()
    position = Decimal()
    markPrice = Decimal()
    positionValue = Decimal()
    openPrice = Decimal()
    costBasisPrice = Decimal()
    costBasisMoney = Decimal()
    percentOfNAV = Decimal()
    fifoPnlUnrealized = Decimal()
    side = OneOf('Long', 'Short')
    levelOfDetail = OneOf('LOT', 'SUMMARY')
    openDateTime = DateTime()
    holdingPeriodDateTime = DateTime()
    code = List()
    originatingOrderID = String()
    originatingTransactionID = String()
    accruedInt = String()
Exemple #12
0
class SLBActivity(Schema, AccountMixin, CurrencyMixin, SecurityMixin):
    """ Wrapped in <SLBActivities> """
    date = Date()
    slbTransactionId = String()
    activityDescription = String()
    type = OneOf("DirectBorrow", "DirectLoan", "ManagedLoan")
    exchange = String()
    quantity = Decimal()
    feeRate = Decimal()
    collateralAmount = Decimal()
    markQuantity = Decimal()
    markPriorPrice = Decimal()
    markCurrentPrice = Decimal()
Exemple #13
0
class CorporateAction(Schema, AccountMixin, CurrencyMixin, SecurityMixin):
    """ Wrapped in <CorporateActions> """
    reportDate = Date()
    dateTime = DateTime()
    amount = Decimal()
    proceeds = Decimal()
    value = Decimal()
    quantity = Decimal()
    fifoPnlRealized = Decimal()
    mtmPnl = Decimal()
    code = List()
    type = OneOf("BC", "BM", "CA", "CC", "CD", "CH", "CI", "CO", "CP", "CS",
                 "CT", "DI", "DW", "ED", "FA", "FI", "FS", "GV", "HD", "HI",
                 "IC", "OR", "PI", "PV", "RI", "RS", "SD", "SO", "SR", "TC",
                 "TI", "TO")
Exemple #14
0
class FxLot(Schema, AccountMixin):
    """ Wrapped in <FxLots> """
    assetCategory = String()
    reportDate = Date()
    functionalCurrency = OneOf(*CURRENCY_CODES)
    fxCurrency = OneOf(*CURRENCY_CODES)
    quantity = Decimal()
    costPrice = Decimal()
    costBasis = Decimal()
    closePrice = Decimal()
    value = Decimal()
    unrealizedPL = Decimal()
    code = List()
    lotDescription = String()
    lotOpenDateTime = DateTime()
    levelOfDetail = OneOf('LOT', 'SUMMARY')
Exemple #15
0
class PriorPeriodPosition(Schema, AccountMixin, CurrencyMixin, SecurityMixin):
    """ Wrapped in <PriorPeriodPositions> """
    priorMtmPnl = Decimal()
    date = Date()
    price = Decimal()
Exemple #16
0
class ConversionRate(Schema):
    """ Wrapped in <ConversionRates> """
    reportDate = Date()
    fromCurrency = OneOf(*CURRENCY_CODES)
    toCurrency = OneOf(*CURRENCY_CODES)
    rate = Decimal()
Exemple #17
0
class TradeMixin(AccountMixin, CurrencyMixin, SecurityMixin):
    tradeID = String()
    reportDate = Date()
    tradeDate = Date()
    tradeTime = Time()
    settleDateTarget = Date()
    transactionType = OneOf("ExchTrade", "TradeCancel", "FracShare",
                            "FracShareCancel", "TradeCorrect", "BookTrade",
                            "DvpTrade")
    exchange = String()
    quantity = Decimal()
    tradePrice = Decimal()
    tradeMoney = Decimal()
    proceeds = Decimal()
    taxes = Decimal()
    ibCommission = Decimal()
    ibCommissionCurrency = OneOf(*CURRENCY_CODES)
    netCash = Decimal()
    closePrice = Decimal()
    openCloseIndicator = OneOf("O", "C", "C;O")
    notes = List(separator=';')
    cost = Decimal()
    fifoPnlRealized = Decimal()
    fxPnl = Decimal()
    mtmPnl = Decimal()
    origTradePrice = Decimal()
    origTradeDate = Date()
    origTradeID = String()
    origOrderID = String()
    clearingFirmID = String()
    transactionID = String()
    openDateTime = DateTime()
    holdingPeriodDateTime = DateTime()
    whenRealized = DateTime()
    whenReopened = DateTime()
    levelOfDetail = OneOf("EXECUTION", "ORDER", "CLOSED_LOT",
                          "TRADE_TRANSFERS")
Exemple #18
0
class ChangeInPositionValue(Schema, AccountMixin):
    """ Wrapped in <ChangeInPositionValues> """
    currency = OneOf(*CURRENCY_CODES)
    assetCategory = String()
    priorPeriodValue = Decimal()
    transactions = Decimal()
    mtmPriorPeriodPositions = Decimal()
    mtmTransactions = Decimal()
    corporateActions = Decimal()
    other = Decimal()
    accountTransfers = Decimal()
    linkingAdjustments = Decimal()
    fxTranslationPnl = Decimal()
    futurePriceAdjustments = Decimal()
    settledCash = Decimal()
    endOfPeriodValue = Decimal()
Exemple #19
0
class ChangeInNAV(Schema, AccountMixin):
    """ Wrapped in <FlexStatement> """
    fromDate = Date()
    toDate = Date()
    startingValue = Decimal()
    mtm = Decimal()
    realized = Decimal()
    changeInUnrealized = Decimal()
    costAdjustments = Decimal()
    transferredPnlAdjustments = Decimal()
    depositsWithdrawals = Decimal()
    internalCashTransfers = Decimal()
    assetTransfers = Decimal()
    debitCardActivity = Decimal()
    billPay = Decimal()
    dividends = Decimal()
    withholdingTax = Decimal()
    withholding871m = Decimal()
    withholdingTaxCollected = Decimal()
    changeInDividendAccruals = Decimal()
    interest = Decimal()
    changeInInterestAccruals = Decimal()
    advisorFees = Decimal()
    clientFees = Decimal()
    otherFees = Decimal()
    feesReceivables = Decimal()
    commissions = Decimal()
    commissionReceivables = Decimal()
    forexCommissions = Decimal()
    transactionTax = Decimal()
    taxReceivables = Decimal()
    salesTax = Decimal()
    softDollars = Decimal()
    netFxTrading = Decimal()
    fxTranslation = Decimal()
    linkingAdjustments = Decimal()
    other = Decimal()
    endingValue = Decimal()
    twr = Decimal()
    corporateActionProceeds = Decimal()
Exemple #20
0
class EquitySummaryByReportDateInBase(Schema, AccountMixin):
    """ Wrapped in <EquitySummaryInBase> """
    reportDate = Date()
    cash = Decimal()
    cashLong = Decimal()
    cashShort = Decimal()
    slbCashCollateral = Decimal()
    slbCashCollateralLong = Decimal()
    slbCashCollateralShort = Decimal()
    stock = Decimal()
    stockLong = Decimal()
    stockShort = Decimal()
    slbDirectSecuritiesBorrowed = Decimal()
    slbDirectSecuritiesBorrowedLong = Decimal()
    slbDirectSecuritiesBorrowedShort = Decimal()
    slbDirectSecuritiesLent = Decimal()
    slbDirectSecuritiesLentLong = Decimal()
    slbDirectSecuritiesLentShort = Decimal()
    options = Decimal()
    optionsLong = Decimal()
    optionsShort = Decimal()
    commodities = Decimal()
    commoditiesLong = Decimal()
    commoditiesShort = Decimal()
    bonds = Decimal()
    bondsLong = Decimal()
    bondsShort = Decimal()
    notes = Decimal()
    notesLong = Decimal()
    notesShort = Decimal()
    funds = Decimal()
    fundsLong = Decimal()
    fundsShort = Decimal()
    interestAccruals = Decimal()
    interestAccrualsLong = Decimal()
    interestAccrualsShort = Decimal()
    softDollars = Decimal()
    softDollarsLong = Decimal()
    softDollarsShort = Decimal()
    forexCfdUnrealizedPl = Decimal()
    forexCfdUnrealizedPlLong = Decimal()
    forexCfdUnrealizedPlShort = Decimal()
    dividendAccruals = Decimal()
    dividendAccrualsLong = Decimal()
    dividendAccrualsShort = Decimal()
    fdicInsuredBankSweepAccount = Decimal()
    fdicInsuredBankSweepAccountLong = Decimal()
    fdicInsuredBankSweepAccountShort = Decimal()
    fdicInsuredAccountInterestAccruals = Decimal()
    fdicInsuredAccountInterestAccrualsLong = Decimal()
    fdicInsuredAccountInterestAccrualsShort = Decimal()
    total = Decimal()
    totalLong = Decimal()
    totalShort = Decimal()
Exemple #21
0
class CurrencyMixin(object):
    currency = OneOf(*CURRENCY_CODES)
    fxRateToBase = Decimal()
Exemple #22
0
class TradeConfirmation(Schema, TradeMixin):
    """ Wrapped in <TradeConfirms> """
    buySell = OneOf("BUY", "BUY (Ca.)", "SELL", "SELL (Ca.)")
    levelOfDetail = OneOf("SYMBOL_SUMMARY", "ORDER", "EXECUTION")
    commissionCurrency = OneOf(*CURRENCY_CODES)
    price = Decimal()
    thirdPartyClearingCommission = Decimal()
    orderID = Decimal()
    allocatedTo = String()
    thirdPartyRegulatoryCommission = Decimal()
    dateTime = DateTime()
    brokerExecutionCommission = Decimal()
    thirdPartyExecutionCommission = Decimal()
    amount = Decimal()
    otherCommission = Decimal()
    commission = Decimal()
    brokerClearingCommission = Decimal()
    ibOrderID = String()
    ibExecID = String()
    execID = String()
    brokerageOrderID = String()
    orderReference = String()
    volatilityOrderLink = String()
    exchOrderId = String()
    extExecID = String()
    # Despite the name, orderTime actually contains both date & time data.
    orderTime = DateTime()
    changeInPrice = Decimal()
    changeInQuantity = Decimal()
    orderType = OneOf("LMT", "MKT", "MOC")
    traderID = String()
    isAPIOrder = Boolean()
Exemple #23
0
class CashReportCurrency(Schema, AccountMixin):
    """ Wrapped in <CashReport> """
    currency = OneOf(*CURRENCY_CODES)
    fromDate = Date()
    toDate = Date()
    startingCash = Decimal()
    startingCashSec = Decimal()
    startingCashCom = Decimal()
    clientFees = Decimal()
    clientFeesSec = Decimal()
    clientFeesCom = Decimal()
    clientFeesMTD = Decimal()
    clientFeesYTD = Decimal()
    commissions = Decimal()
    commissionsSec = Decimal()
    commissionsCom = Decimal()
    commissionsMTD = Decimal()
    commissionsYTD = Decimal()
    billableCommissions = Decimal()
    billableCommissionsSec = Decimal()
    billableCommissionsCom = Decimal()
    billableCommissionsMTD = Decimal()
    billableCommissionsYTD = Decimal()
    depositWithdrawals = Decimal()
    depositWithdrawalsSec = Decimal()
    depositWithdrawalsCom = Decimal()
    depositWithdrawalsMTD = Decimal()
    depositWithdrawalsYTD = Decimal()
    deposits = Decimal()
    depositsSec = Decimal()
    depositsCom = Decimal()
    depositsMTD = Decimal()
    depositsYTD = Decimal()
    withdrawals = Decimal()
    withdrawalsSec = Decimal()
    withdrawalsCom = Decimal()
    withdrawalsMTD = Decimal()
    withdrawalsYTD = Decimal()
    accountTransfers = Decimal()
    accountTransfersSec = Decimal()
    accountTransfersCom = Decimal()
    accountTransfersMTD = Decimal()
    accountTransfersYTD = Decimal()
    linkingAdjustments = Decimal()
    linkingAdjustmentsSec = Decimal()
    linkingAdjustmentsCom = Decimal()
    internalTransfers = Decimal()
    internalTransfersSec = Decimal()
    internalTransfersCom = Decimal()
    internalTransfersMTD = Decimal()
    internalTransfersYTD = Decimal()
    dividends = Decimal()
    dividendsSec = Decimal()
    dividendsCom = Decimal()
    dividendsMTD = Decimal()
    dividendsYTD = Decimal()
    insuredDepositInterest = Decimal()
    insuredDepositInterestSec = Decimal()
    insuredDepositInterestCom = Decimal()
    insuredDepositInterestMTD = Decimal()
    insuredDepositInterestYTD = Decimal()
    brokerInterest = Decimal()
    brokerInterestSec = Decimal()
    brokerInterestCom = Decimal()
    brokerInterestMTD = Decimal()
    brokerInterestYTD = Decimal()
    bondInterest = Decimal()
    bondInterestSec = Decimal()
    bondInterestCom = Decimal()
    bondInterestMTD = Decimal()
    bondInterestYTD = Decimal()
    cashSettlingMtm = Decimal()
    cashSettlingMtmSec = Decimal()
    cashSettlingMtmCom = Decimal()
    cashSettlingMtmMTD = Decimal()
    cashSettlingMtmYTD = Decimal()
    realizedVm = Decimal()
    realizedVmSec = Decimal()
    realizedVmCom = Decimal()
    realizedVmMTD = Decimal()
    realizedVmYTD = Decimal()
    cfdCharges = Decimal()
    cfdChargesSec = Decimal()
    cfdChargesCom = Decimal()
    cfdChargesMTD = Decimal()
    cfdChargesYTD = Decimal()
    netTradesSales = Decimal()
    netTradesSalesSec = Decimal()
    netTradesSalesCom = Decimal()
    netTradesSalesMTD = Decimal()
    netTradesSalesYTD = Decimal()
    netTradesPurchases = Decimal()
    netTradesPurchasesSec = Decimal()
    netTradesPurchasesCom = Decimal()
    netTradesPurchasesMTD = Decimal()
    netTradesPurchasesYTD = Decimal()
    advisorFees = Decimal()
    advisorFeesSec = Decimal()
    advisorFeesCom = Decimal()
    advisorFeesMTD = Decimal()
    advisorFeesYTD = Decimal()
    feesReceivables = Decimal()
    feesReceivablesSec = Decimal()
    feesReceivablesCom = Decimal()
    feesReceivablesMTD = Decimal()
    feesReceivablesYTD = Decimal()
    paymentInLieu = Decimal()
    paymentInLieuSec = Decimal()
    paymentInLieuCom = Decimal()
    paymentInLieuMTD = Decimal()
    paymentInLieuYTD = Decimal()
    transactionTax = Decimal()
    transactionTaxSec = Decimal()
    transactionTaxCom = Decimal()
    transactionTaxMTD = Decimal()
    transactionTaxYTD = Decimal()
    taxReceivables = Decimal()
    taxReceivablesSec = Decimal()
    taxReceivablesCom = Decimal()
    taxReceivablesMTD = Decimal()
    taxReceivablesYTD = Decimal()
    withholdingTax = Decimal()
    withholdingTaxSec = Decimal()
    withholdingTaxCom = Decimal()
    withholdingTaxMTD = Decimal()
    withholdingTaxYTD = Decimal()
    withholding871m = Decimal()
    withholding871mSec = Decimal()
    withholding871mCom = Decimal()
    withholding871mMTD = Decimal()
    withholding871mYTD = Decimal()
    withholdingCollectedTax = Decimal()
    withholdingCollectedTaxSec = Decimal()
    withholdingCollectedTaxCom = Decimal()
    withholdingCollectedTaxMTD = Decimal()
    withholdingCollectedTaxYTD = Decimal()
    salesTax = Decimal()
    salesTaxSec = Decimal()
    salesTaxCom = Decimal()
    salesTaxMTD = Decimal()
    salesTaxYTD = Decimal()
    fxTranslationGainLoss = Decimal()
    fxTranslationGainLossSec = Decimal()
    fxTranslationGainLossCom = Decimal()
    otherFees = Decimal()
    otherFeesSec = Decimal()
    otherFeesCom = Decimal()
    otherFeesMTD = Decimal()
    otherFeesYTD = Decimal()
    other = Decimal()
    otherSec = Decimal()
    otherCom = Decimal()
    endingCash = Decimal()
    endingCashSec = Decimal()
    endingCashCom = Decimal()
    endingSettledCash = Decimal()
    endingSettledCashSec = Decimal()
    endingSettledCashCom = Decimal()