Transactions and manual vs automatic calculation of amounts

Prev Next

When you book a trade, you can manually set various numeric data points yourself, or ask LUSID to calculate them for you:

  • While you are not required to capture all these data points, certain LUSID downstream features may rely on them, in particular instrument events.

  • If you manually set (for example) a total consideration and ask LUSID to calculate it for you, your manual amount prevails.

The table below lists each amount, whether you can set it yourself, and how LUSID calculates it if you don't. Note some amounts (such as gross trade amount) are always calculated by LUSID and can't be overridden.

Amount

Supported instruments

Represents…

Currency

Calculation mechanism

Can user set or override?

Can be automated using transaction type calculation?

Reported on output transaction?

Can be used in side to impact holdings?

Explanation of calculated amount

Gross trade amount

All

Amount before fees

Transaction

Automatic

❌

❌

grossTransactionAmount field

Txn:GrossTradeAmount

The value of the trade before fees and excluding accrued interest, in transaction currency. See how LUSID calculates this.

Note LUSID aligns the sign with that of the units traded, which may mean it differs from the gross consideration.

Trade amount

All

Amount after fees

Transaction

Automatic

❌

❌

transactionAmount field

Txn:TradeAmount

The value of the trade after fees and excluding accrued interest, in transaction currency. Which fees are included depends on the calculation your domain uses. See how LUSID calculates this.

Note LUSID aligns the sign with that of the units traded, which may mean it differs from the total consideration.

Gross consideration

All

Amount including accrued interest but before fees

Settlement

Manual or automatic

✅

Txn:GrossConsideration

Transaction/default/GrossConsideration system property

Txn:GrossConsideration

See this article

Gross consideration in trade currency

All

Amount including accrued interest but before fees

Transaction

Automatic

❌

❌

❌

Txn:GrossConsiderationInTradeCurrency

Gross consideration / Exchange rate

If gross consideration is not set or calculated, the amount is 0.

Total consideration

All

Amount including accrued interest and after fees

Settlement

Manual or automatic

✅

DeriveTotalConsideration

totalConsideration.amount field

Txn:TotalConsideration

See this article

Total consideration in trade currency

All

Amount including accrued interest and after fees

Transaction

Automatic

❌

❌

❌

Txn:TotalConsiderationInTradeCurrency

Total consideration / Exchange rate

Bond interest

Bond, ComplexBond, InflationLinkedBond, CdsIndex, CreditDefaultSwap

Accrued interest bought or sold

Transaction

(Settlement, if your domain uses the original calculation)

Manual or automatic

✅

Txn:BondInterest

Transaction/default/BondInterest system property

Txn:BondInterest

See this article

Notional

Future, ContractForDifference

Notional value

Transaction

Manual or automatic

✅

Txn:NotionalAmount

Transaction/default/NotionalAmount system property

Txn:NotionalAmount

See this article

Current face

MBS and PIK bonds (both special kinds of ComplexBond)

Outstanding notional value

Transaction

Manual or automatic

✅

❌

Transaction/default/CurrentFace system property

Txn:CurrentFace

If you don't set a current face on a transaction, LUSID derives one from the first of the following that applies:

  1. The gross consideration and price of the transaction.

  2. A Transaction/default/CurrentPoolFactor system property on the transaction.

  3. A pool factor in the Quote Store.

  4. A pool factor of 1.

How LUSID calculates gross trade amount and trade amount

LUSID calculates gross trade amount and trade amount for every output transaction. You can't set either of them yourself. There are two versions of the calculation: an enhanced calculation, and the original calculation that many domains still use.

Note: The enhanced calculation takes into account notional instruments such as futures, contract sizes and price scale factors, and the difference between capitalised and expensed fees. To move your domain to the enhanced calculation, contact Technical Support. Moving changes the gross trade amount, trade amount and calculated bond interest that LUSID reports for existing transactions, so check any processes that read these amounts first.

Enhanced calculation

For each amount, LUSID uses the first row that applies:

If…

Gross trade amount is…

The instrument is a currency

The number of units

A notional amount is set or calculated, for example for a future

0

A gross consideration is set or calculated

(Gross consideration / Exchange rate) - Bond interest

Otherwise

Units * Price * Contract size / Price scale factor

If…

Trade amount is…

The instrument is a currency, or a notional amount is set or calculated

The same as gross trade amount

Total consideration is 0

Gross trade amount plus capitalised fees for a purchase, or minus capitalised fees for a sale

Otherwise

(Total consideration / Exchange rate) - Bond interest, minus expensed fees for a purchase, or plus expensed fees for a sale

Note the following:

  • Bond interest is the value of the Transaction/default/BondInterest system property, in transaction currency.

  • Capitalised and expensed fees are the Transaction/default/TotalCapitalisedFees and Transaction/default/TotalNonCapitalisedFees system properties, which the transaction fee engine sets. This means trade amount includes capitalised fees only.

  • LUSID decides whether a transaction is a purchase or a sale from the direction of the first StockMovement in its transaction type. If there is no stock movement, LUSID makes no fee adjustment.

  • LUSID aligns the sign of both amounts with the sign of the units traded.

Original calculation

LUSID uses the first row that applies:

If…

Gross trade amount is…

Trade amount is…

The instrument is a currency

The number of units

The number of units

Gross consideration (for gross trade amount) or total consideration (for trade amount) is set or calculated

(Gross consideration - Bond interest) / Exchange rate

(Total consideration - Bond interest) / Exchange rate

Otherwise

Units * Price

Units * Price

Note the following:

  • Bond interest is the value of the Transaction/default/BondInterest system property, in settlement currency.

  • Notional instruments are treated like any other instrument, so for example the gross trade amount of a future that closes a position reflects its realised gain or loss.

  • Contract size and price scale factor are not applied, and trade amount includes every fee in the total consideration.

  • LUSID aligns the sign of both amounts with the sign of the units traded.

Example: Comparing manual vs automatic for a bond purchase

Consider the following example of a bond purchase transaction:

  • Number of units purchased: 100000

  • Price: 100

  • Trade commission: £50

  • Bond interest bought: £452.06

The input transactions for the two methods are quite different:

Manual specification of amounts

Automatic calculation by LUSID

You calculate totalConsideration.amount yourself, and record all the data points using a combination of system and custom properties:

{
  "transactionRequest-1": {
    "transactionId": "Txn-001",
    "type": "Buy",
    "instrumentIdentifiers": {"Instrument/default/Figi": "BBG000ABC123"},
    "transactionDate": "2024-06-15T00:00:00.0000000+00:00",
    "settlementDate": "2024-06-18T00:00:00.0000000+00:00",
    "units": 100000,
    "transactionPrice": {"price": 100, "type": "CleanPrice"},
    "totalConsideration": {"amount": 100502.06, "currency": "GBP"},
    "properties": {
      "Transaction/default/GrossConsideration": {
        "key": "Transaction/default/GrossConsideration",
        "value": {
          "metricValue": {
            "value": 100452.06,
            "unit": "GBP"
          }
        }
      },
      "Transaction/MyProperties/TotalCapitalisedFees": {
        "key": "Transaction/MyProperties/TotalCapitalisedFees",
        "value": {
          "metricValue": {
            "value": 50,
            "unit": "GBP"
          }
        }
      },
      "Transaction/default/BondInterest": {
        "key": "Transaction/default/BondInterest",
        "value": {
          "metricValue": {
            "value": 452.06,
            "unit": "GBP"
          }
        }
      }
    }
  }
}

You set totalConsideration.amount to 0, and only need record the trade commission using a custom property:

{
  "transactionRequest-1": {
    "transactionId": "Txn-001",
    "type": "Buy",
    "instrumentIdentifiers": {"Instrument/default/Figi": "BBG000ABC123"},
    "transactionDate": "2024-06-15T00:00:00.0000000+00:00",
    "settlementDate": "2024-06-18T00:00:00.0000000+00:00",
    "units": 100000,
    "transactionPrice": {"price": 100, "type": "CleanPrice"},
    "totalConsideration": {"amount": 0, "currency": "GBP"},
    "properties": {
      "Transaction/MyProperties/TotalCapitalisedFees": {
        "key": "Transaction/MyProperties/TotalCapitalisedFees",
        "value": {
          "metricValue": {
            "value": 50,
            "unit": "GBP"
          }
        }
      }
    }
  }
}

The Buy transaction type can have any economic impact you like, but might be defined as follows:

Buy transaction type for manual specification

Buy transaction type for automatic calculation

{
  "aliases": [
    {
      "type": "Buy",
      "description": "Transaction type for purchases",
      "transactionClass": "Basic",
      "transactionRoles": "AllRoles",
      "isDefault": false
    }
  ],
  "movements": [
    {
      "name": "Increase units",
      "movementTypes": "StockMovement",
      "side": "Side1",
      "direction": 1
    },
    {
      "name": "Decrease cash",
      "movementTypes": "CashCommitment",
      "side": "Side2",
      "direction": -1
    }
  ]
}

{
  "aliases": [
    {
      "type": "Buy",
      "description": "Transaction type for purchases",
      "transactionClass": "Basic",
      "transactionRoles": "AllRoles",
      "isDefault": false
    }
  ],
  "movements": [
    {
      "name": "Increase units",
      "movementTypes": "StockMovement",
      "side": "Side1",
      "direction": 1
    },
    {
      "name": "Decrease cash",
      "movementTypes": "CashCommitment",
      "side": "Side2",
      "direction": -1
    }
  ],
  "calculations": [
    {
      "type": "Txn:BondInterest"
    },
    {
      "type": "Txn:GrossConsideration"
    },
    {
      "type": "DeriveTotalConsideration",
      "formula": "Txn:GrossConsideration + Properties[Transaction/MyProperties/TotalCapitalisedFees]"
    }
  ]
}

Note that LUSID generates the same output transaction in both circumstances, so the impact on holdings is identical:

{
      "transactionId": "Txn001",
      "type": "Buy",
      "instrumentIdentifiers": {
        "Instrument/default/LusidInstrumentId": "LUID_00003E75",
        "Instrument/default/Figi": "BBG000ABC123"
      },
      "instrumentScope": "default",
      "instrumentUid": "LUID_00003E75",
      "transactionDate": "2024-06-15T00:00:00.0000000+00:00",
      "settlementDate": "2024-06-18T00:00:00.0000000+00:00",
      "units": 100000,
      "grossTransactionAmount": 100000,
      "transactionAmount": 100050,
      "transactionPrice": {
        "price": 100,
        "type": "CleanPrice"
      },
      "totalConsideration": {
        "amount": 100502.06,
        "currency": "GBP"
      },
      "exchangeRate": 1,
      "transactionToPortfolioRate": 1,
      "transactionCurrency": "GBP",
      "properties": {
        "Transaction/MyProperties/TotalCapitalisedFees": {
          "key": "Transaction/MyProperties/TotalCapitalisedFees",
          "value": {
            "metricValue": {
              "value": 50
            }
          }
        },
        "Transaction/default/GrossConsideration": {
          "key": "Transaction/default/GrossConsideration",
          "value": {
            "metricValue": {
              "value": 100452.06
            }
          }
        },
        "Transaction/default/BondInterest": {
          "key": "Transaction/default/BondInterest",
          "value": {
            "metricValue": {
              "value": 452.06
            }
          }
        },
        "Transaction/default/ResultantHolding": {
          "key": "Transaction/default/ResultantHolding",
          "value": {
            "metricValue": {
              "value": 100000
            }
          }
        }
      },
      "transactionStatus": "Active",
      "realisedGainLoss": [],
      "sourceType": "InputTransaction",
      "resolvedTransactionTypeDetails": {
        "scope": "default",
        "source": "default",
        "type": "Buy"
      }
}