---
title: "How does LUSID generate journal entry lines from economic activity?"
slug: "how-does-lusid-generate-journal-entry-lines-from-economic-activity"
updated: 2025-09-10T13:48:37Z
published: 2025-09-10T13:48:37Z
canonical: "support.lusid.com/how-does-lusid-generate-journal-entry-lines-from-economic-activity"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://support.lusid.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How does LUSID generate journal entry lines from economic activity?

LUSID automatically generates at least one *journal entry lin*e for each item of economic activity in each source transaction portfolio underlying a fund. Journal entry lines constitute the building blocks of [financial reports](/v1/docs/generating-fund-reports) for that fund.

Each journal entry line is a debit or credit amount representing a financial impact of that economic activity. The [posting rules](/v1/docs/assigning-economic-activity-to-general-ledger-accounts-using-posting-rules) you've chosen for a particular fund [NAV type](/v1/docs/how-do-i-create-a-fund#understanding-nav-types) then post the amount to a specific general ledger account.

LUSID generates journal entry lines in response to the following types of economic activity in a portfolio:

- **Transaction activity** LUSID generates at least **one** journal entry line per [output transaction](/v1/docs/input-and-output-transactions). Note the following:
  - The number of journal entry lines is determined by the *transaction type*. Every movement belonging to that transaction type generates at least one journal entry line, while some movements generate multiple lines on trade and settlement dates. [More about transaction types and movements](/v1/docs/what-is-a-transaction-type).
  - The nature of a journal entry line depends on the [economic bucket](/v1/docs/what-are-economic-buckets#transaction-buckets) (for example `NA_Cost` or `CA_Capital`) into which it is automatically categorised by LUSID, which itself depends on the movement type. The amount is reported in both local (transaction) and base (portfolio) currency.
  - It is your responsibility to use transaction types with movements that create pairs of journal entry lines categorised into appropriate economic buckets. For example, a transaction representing a subscription might have a `FundsIn`-style transaction type with two movements, one generating a `NA_Cost` journal entry line for a positive debit amount to be posted to an investments account (or similar), and the other generating an equal and opposite `CA_Capital` journal entry line for a negative credit amount to be posted to a cash account (or similar).
  - To ensure journal entry lines balance, LUSID may produce a balancing entry for an 'unknown P&L component' categorised into a `PL_Other` economic bucket. This can be mapped by posting rules to an appropriate account, or more commonly to an error account for easy diagnosis of possible configuration problems.
- **Valuation activity** LUSID generates at least **one pair** of journal entry lines per holding impacted by the latest market data (prices and/or FX rates) detected in the LUSID Quote Store. Note the following:
  - The number of journal entry line pairs is determined by the type of underlying instrument and the impact of that market data on the valuation.
  - The nature of a journal entry line depends on the economic bucket into which it is automatically categorised by LUSID. The amount is always reported in base currency, and for most buckets in local currency as well.
  - LUSID automatically balances journal entry lines for valuation activity, so for example a positive debit amount for unrealised share price gain/loss for posting to an investments account (or similar) is always paired with an equal and opposite negative credit amount for posting to a PnL account (or similar).
  - It is your responsibility to load market data suitable for valuing each holding on the start and end dates of an accounting period. You do not need to load market data for intermediate dates. [More about valuation and market data](/v1/docs/valuations).

## Auditing journal entry lines

LUSID web appLUSID APILuminesce

Call the [GetValuationPointJournalEntryLines](https://www.lusid.com/docs/api/lusid/endpoints/funds/GetValuationPointJournalEntryLines/) API:

```json
curl -X POST 'https://<your-domain>.lusid.com/api/api/funds/MyFundScope/MyFundCode/valuationpoints/journalentrylines/$query'
  -H 'Content-Type: application/json-patch+json'
  -H 'Authorization: Bearer <your-API-access-token>'
  -d '{
  "end": {
    "diaryEntry": "VP-28Feb2024"
  }
}'
```

Navigate to **Fund Accounting > Journal Entry Lines** and select a **Fund**, a **NAV Type** and, at a mimimum, a **To Calendar Entry**. Note that LUSID shows lines since the last finalised valuation point:

![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-CMFR0KAJ.png)

You can specify a range of valuation points by enabling **Display Range** and selecting a **From Calendar Entry** to show additional journal entry lines. Alternatively, you can specify dates by enabling **Ad-Hoc Mode**.

*Coming soon*

![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image(969).png)

## Example: Journal entry lines for a portfolio containing equities

Imagine we have a simple GBP-denominated portfolio containing equities. And a fund [set up to reference](/v1/docs/setting-up-a-fund-a-checklist) that portfolio with the following four general ledger accounts in the underlying chart of accounts:

![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/e425455e-52ba-428e-83d5-9de1d697bc9b.png)

In this example we'll see how to configure LUSID to generate balanced pairs of journal entry lines representing a typical selection of portfolio economic activity for posting to these accounts.

### Subscription transaction

On 1 July we seed the portfolio with $15,000 at a USD/GBP exchange rate of 0.75, using a `FundsIn` transaction type with two movements, `Capital` and `CashAccrual`. When the trade settles on 3 July, these [movement types](/v1/docs/what-movement-types-are-available) combine to generate a balanced pair of journal entry lines, so no further configuration is required.

LUSID generates the following journal entry lines for this transaction; note these have a source type of `LusidTransaction`:

| **Transaction type** | **Movement(s)** | **Journal entry lines** | **Notes** |
| --- | --- | --- | --- |
| **Date** | **Economic bucket** | **Holding type** | **DR or CR** | **Local amount (USD)** | **Base amount (GBP)** |
| `FundsIn` | `Capital` | 1 July | `CA_Capital` | `B` | Credit | -15000 | -11250 | Balances the cash holding. |
| **Subtotal** |  |  |  |  | **-15000** | **-11250** |  |
| `CashAccrual` | 1 July | `NA_Cost` | `A` | Debit | 15000 | 11250 | Receivable cash holding on the trade date. |
| 3 July | `NA_Cost` | `A` | Credit | -15000 | -11250 | Reverses the receivable cash holding on the settlement date. |
| 3 July | `NA_Cost` | `B` | Debit | 15000 | 11250 | Permanent cash holding. |
| **Subtotal** | **15000** | **11250** |  |
| **Total** | **0** | **0** |  |

We can post the:

- Debit amount (journal entry line with an [economic bucket](/v1/docs/what-are-economic-buckets) of `NA_Cost` and [holding type](/v1/docs/what-are-the-holding-types) of `B`) to the `2-Cash` account.
- Credit amount (economic bucket of `CA_Capital`) to the `3-Capital` account.

> **Note**: You can choose to post journal entry lines reflecting temporary receivable/payable cash holdings (holding types of `A`, `C` or `R`) to specific accounts on the trade date if you wish. For the purpose of simplicity in this example, these journal entry lines are ignored.

### Purchase transaction

On 3 July we buy 300 Microsoft shares @ $10 at a USD/GBP exchange rate of 0.7, using a `Buy` transaction type with two movements, `StockMovement` and `CashCommitment`. When the trade settles on 5 July, these movement types combine to generate a balanced pair of journal entry lines, so no further configuration is required. A holdings report on 5 July shows a position of 300 Microsoft shares and a USD cash balance of $12,000.

LUSID generates the following journal entry lines for this transaction:

| **Transaction type** | **Movement(s)** | **Journal entry lines** | **Notes** |
| --- | --- | --- | --- |
| **Date** | **Economic bucket** | **Holding type** | **DR or CR** | **Local amount (USD)** | **Base amount (GBP)** |
| `Buy` | `StockMovement` | 3 July | `NA_Cost` | `P` | Debit | 3000 | 2100 | Security (non-cash) holding. |
| **Subtotal** |  |  |  |  | **3000** | **2100** |  |
| `CashCommitment` | 3 July | `NA_Cost` | `C` | Credit | -3000 | -2100 | Payable cash holding on the trade date. |
| 5 July | `NA_Cost` | `C` | Debit | 3000 | 2100 | Reverses the payable cash holding on the settlement date. |
| 5 July | `NA_Cost` | `B` | Credit | -3000 | -2250 | Permanent cash holding. |
| 5 July | `PL_RealFXGL` | `B` | Debit | 0 | 150 | Currency gain/loss is only reported in the base (or portfolio) currency. |
| **Subtotal** | **-3000** | **-2100** |  |
| **Total** | **0** | **0** |  |

We can post the:

- Debit amount for the security (economic bucket of `NA_Cost` and holding type of `P`) to the `1-Investments` account.
- Credit amount for cash (economic bucket of `NA_Cost` and holding type of `B`) to the `2-Cash` account.
- Debit amount for realised currency gain/loss to the `4-PnL` account. Note an equal and opposite amount of base currency has already been factored into the credit amount for cash.

### Dividend transaction

On 5 July we load a dividend of 10 cents per share for our 300 Microsoft shares at a USD/GBP exchange rate of 0.77, using a `Dividend` transaction type with two movements, `Carry` and `CashAccrual`. When the trade settles on 7 July, these movement types combine to generate a balanced pair of journal entry lines, so no further configuration is required. A holdings report on 7 July shows a position of 300 Microsoft shares and a USD cash balance of $12,030.

LUSID generates the following journal entry lines for this transaction:

| **Transaction type** | **Movement(s)** | **Journal entry lines** | **Notes** |
| --- | --- | --- | --- |
| **Date** | **Economic bucket** | **Holding type** | **DR or CR** | **Local amount (USD)** | **Base amount (GBP)** |
| `Dividend` | `Carry` | 5 July | `PL_Carry` | `P` | Credit | -30 | -23.10 | Security (non-cash) holding. |
| **Subtotal** |  |  |  |  | **-30** | **-23.10** |  |
| `CashAccrual` | 5 July | `NA_Cost` | `A` | Debit | 30 | 23.10 | Receivable cash holding on the trade date. |
| 7 July | `NA_Cost` | `A` | Credit | -30 | -23.10 | Reverses the receivable cash holding on the settlement date. |
| 7 July | `NA_Cost` | `B` | Debit | 30 | 23.10 | Permanent cash holding. |
| **Subtotal** | **30** | **23.10** |  |
| **Total** | **0** | **0** |  |

We can post the:

- Credit amount representing a flow of value out of the security (economic bucket of `PL_Carry` and holding type of `P`) to the `4-PnL` account.
- Debit amount for cash (economic bucket of `NA_Cost` and holding type of `B`) to the `2-Cash` account.

### Portfolio fee transaction

On 7 July we pay a portfolio fee of £50 using a `PortfolioFee` transaction type with two movements, `Fee` and `CashCommitment`. When the trade settles on 9 July, these movement types combine to generate a balanced pair of journal entry lines, so no further configuration is required. A holdings report on 9 July shows a position of 300 Microsoft shares, a USD cash balance of $12,030 and a GBP cash balance of -£50.

LUSID generates the following journal entry lines for this transaction:

| **Transaction type** | **Movement(s)** | **Journal entry lines** | **Notes** |
| --- | --- | --- | --- |
| **Date** | **Economic bucket** | **Holding type** | **DR or CR** | **Local amount (GBP)** | **Base amount (GBP)** |
| `PortfolioFee` | `Fee` | 7 July | `PL_Fees` | `B` | Debit | 50 | 50 | Balances the cash holding. |
| **Subtotal** |  |  |  |  | **50** | **50** |  |
| `CashCommitment` | 7 July | `NA_Cost` | `C` | Credit | -50 | -50 | Payable cash holding on the trade date. |
| 9 July | `NA_Cost` | `C` | Debit | 50 | 50 | Reverses the payable cash holding on the settlement date. |
| 9 July | `NA_Cost` | `B` | Credit | -50 | -50 | Permanent cash holding. |
| **Subtotal** | **-50** | **-50** |  |
| **Total** | **0** | **0** |  |

We can post the:

- Credit amount (economic bucket of `NA_Cost` and holding type of `B`) to the `2-Cash` account.
- Debit amount (economic bucket of `PL_Fees` and holding type of `B`) to the `4-PnL` account.

### Sale transaction

On 9 July we sell 100 Microsoft shares @ $15 at a USD/GBP exchange rate of 0.8, using a `Sell` transaction type with movements, `StockMovement` and `CashCommitment`. When the trade settles on 11 July, these movement types combine to generate a balanced pair of journal entry lines, so no further configuration is required. A holdings report on 11 July shows a position of 200 Microsoft shares, a USD cash balance of $13,530 and a GBP cash balance of -£50.

LUSID generates the following journal entry lines for this transaction:

| **Transaction type** | **Movement(s)** | **Journal entry lines** | **Notes** |
| --- | --- | --- | --- |
| **Date** | **Economic bucket** | **Holding type** | **DR or CR** | **Local amount (USD)** | **Base amount (GBP)** |
| `Sell` | `StockMovement` | 9 July | `NA_Cost` | `P` | Credit | -1000 | -700 | Security (non-cash) holding. |
| 9 July | `PL_RealPriceGL` | `P` | Credit | -500 | -400 | Realised gain/loss is a combination of price gain/loss and currency gain/loss. Currency gain/loss is only reported in the base (or portfolio) currency. |
| 9 July | `PL_RealFXGL` | `P` | Credit | 0 | -100 |
| **Subtotal** |  | **-1500** | **-1200** |  |
| `CashCommitment` | 9 July | `NA_Cost` | `C` | Debit | 1500 | 1200 | Receivable cash holding on the trade date. |
| 11 July | `NA_Cost` | `C` | Credit | -1500 | -1200 | Reverses the receivable cash holding on the settlement date. |
| 11 July | `NA_Cost` | `B` | Debit | 1500 | 1200 | Permanent cash holding. |
| **Subtotal** |  | **1500** | **1200** |  |
| **Total** |  | **0** | **0** |  |

We can post the:

- Credit amount for the security (economic bucket of `NA_Cost` and holding type of `P`) to the `1-Investments` account.
- Debit amount for cash (economic bucket of `NA_Cost` and holding type of `B`) to the `2-Cash` account.
- Credit amounts for realised share price and currency gain/loss to the `4-PnL` account. Note a combined equal and opposite amount has already been factored into the debit amount for cash.

### Valuation

On 15 July we load the latest market data into the LUSID quote store: a MSFT share price of $20 and USD/GBP spot rate of 0.9. Our remaining 200 shares, which originally cost $2,000 or £1,400, are now worth $4,000 or £3,600, an unrealised gain of £2,200. Our cash balance of $13,530 which cost £10,223.10 is now worth £12,177, an unrealised gain of £1,953.90.

There are no transaction types (and therefore no movements) associated with valuation activity, and LUSID automatically generates balanced pairs of journal entry lines, so no further configuration is required.

LUSID generates the following journal entry lines for the valuation; note these have a source type of `LusidValuation`:

| **Journal entry lines** |
| --- |
| **Date** | **Economic bucket** | **Holding type** | **DR or CR** | **Local amount (USD)** | **Base amount (GBP)** | **Notes** |
| 15 July | `NA_UnrealPriceGL` | `P` | Debit | 2000 | 1800 | The `PL*` automatically balances the `NA*` unrealised price gain/loss for the security holding. |
| `PL_UnrealPriceGL` | `P` | Credit | -2000 | -1800 |
| `NA_UnrealFXGL` | `P` | Debit | 0 | 400 | The `PL*` automatically balances the `NA*` unrealised currency gain/loss for the security holding. Note this is only reported in the base (or portfolio) currency. |
| `PL_UnrealFXGL` | `P` | Credit | 0 | -400 |
| `NA_UnrealFXGL` | `B` | Debit | 0 | 1953.90 | The `PL*` automatically balances the `NA*` unrealised currency gain/loss for the cash holding. Note this is only reported in the base (or portfolio) currency. |
| `PL_UnrealFXGL` | `B` | Credit | 0 | -1953.90 |

We can post the:

- Debit amounts for unrealised share price gain/loss and currency gain/loss for the security (economic bucket starting with `NA_` and holding type of `P`) to the `1-Investments` account.
- Debit amount for unrealised currency gain/loss for cash (economic bucket starting with `NA_` and holding type of `B`) to the `2-Cash` account.
- Credit amounts (economic bucket starting with `PL_`) to the `4-PnL` account.
