--- title: "Realising gain/loss for cash holdings on transaction date rather than settlement date" slug: "realising-gainloss-for-cash-holdings-on-trade-date-rather-than-settlement-date" tags: ["cost normalisation"] updated: 2025-09-10T13:47:38Z published: 2025-09-10T13:47:38Z canonical: "support.lusid.com/realising-gainloss-for-cash-holdings-on-trade-date-rather-than-settlement-date" --- > ## 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. # Realising gain/loss for cash holdings on transaction date rather than settlement date By default, LUSID calculates realised gain/loss for a transaction impacting a cash holding on the *settlement* date rather than the *transaction* date. You can change this to calculate realised gain/loss for all cash holdings in a portfolio on the transaction date instead. Since payable/receivable 'cash commitment' holdings may settle in a different order to that in which the original transactions were booked, the total cash balance from which an average cost is derived may be different, and so the realised gain/loss amount may also be different. The difference between the recorded cost and the transaction date average cost is reported as the **cost normalisation**. The amount changes each time a new transaction is booked that alters the average cost of the transaction date cash balance. ## Setting up a portfolio to calculate realised gain/loss on transaction date ### LUSID web app Navigate to **Data Management > Portfolios** and either create a new portfolio or edit an existing one to choose **TransactionDate** from the **Cash gain loss calculation date** dropdown on the **Details** tab: ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image(502).png?sv=2026-02-06&spr=https&st=2026-11-04T02%3A01%3A03Z&se=2026-11-04T03%3A01%3A03Z&sr=c&sp=r&sig=UuiZcdy6dD%2F23NgLsXOlajfDPrM%2FxAAPKbtDTaTa6Ew%3D) ### LUSID REST API You can [create a new transaction portfolio](/v1/docs/how-do-i-create-a-transaction-portfolio) with the `cashGainLossCalculationDate` field set to `TransactionDate`, for example: ```json curl -X POST "https://.lusid.com/api/api/transactionportfolios/myexamplescope" -H "Authorization: Bearer " -H "Content-Type: application/json-patch+json" -d '{ "displayName": "Trade date cash portfolio", "code": "TradeDate", "created": "2023-11-01", "baseCurrency": "GBP", "cashGainLossCalculationDate": "TransactionDate" }' ``` You can [configure an existing portfolio](/v1/docs/updating-certain-characteristics-of-an-existing-portfolio) to retrofit this behavior, for example: ```json curl -X POST "https://.lusid.com/api/api/transactionportfolios/myexamplescope/TradeDate/details" -H "Authorization: Bearer " -H "Content-Type: application/json-patch+json" -d '[  {    "value": "TransactionDate",    "path": "/cashGainLossCalculationDate",    "op": "add"  } ]' ``` ### Luminesce You can use the [Lusid.Portfolio.Writer](/v1/docs/lusidportfoliowriter) provider to populate the `CashGainLossCalculationDate` field, for example: ```sql @table_of_data = select 'Transaction' as PortfolioType, 'myexamplescope' as PortfolioScope, 'TradeDate' as PortfolioCode, 'Trade date cash portfolio' as DisplayName, #2023-11-01# as Created, 'GBP' as BaseCurrency, 'TransactionDate' as CashGainLossCalculationDate; select * from Lusid.Portfolio.Writer where ToWrite = @table_of_data; ``` ## Reporting cost normalisation amounts in a valuation You can include the `Holding/CostNormalisation` [metric](/v1/docs/what-is-a-metric) when you [perform a valuation](/v1/docs/how-do-i-perform-a-valuation) to report cost normalisation amounts, for example: ```json curl -X POST "https://.lusid.com/api/api/aggregation/$valuation" -H "Authorization: Bearer " -H "Content-Type: application/json-patch+json" -d '{   "portfolioEntityIds": [ {"scope": "myexamplescope", "code": "TradeDate", "portfolioEntityType": "SinglePortfolio"} ],   "valuationSchedule": {"effectiveAt": "2023-11-14T00:00:00.0000000+00:00" },   "recipeId": {"scope": "myexamplescope", "code": "TradeDateRecipe"},   "metrics": [     {"key": "Instrument/default/Name", "op": "Value"},     {"key": "Valuation/EffectiveAt", "op": "Value"},     {"key": "Holding/default/Units", "op": "Value"},     {"key": "Holding/Cost/Pfolio", "op": "Value"},     {"key": "Valuation/PvInPortfolioCcy", "op": "Value"},     {"key": "Holding/CostNormalisation", "op": "Value"},     {"key": "ProfitAndLoss/Realised/Fx/PortfolioCcy", "op": "Value", "options": {"Window": "YTD"}},     {"key": "ProfitAndLoss/Unrealised/Fx/PortfolioCcy", "op": "Value", "options": {"Window": "YTD"}},   ] }' ``` The response might look like this, transformed to a table and with columns renamed for clarity: ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/dd297f07-21f2-4eeb-9c86-79227fb872b2.png?sv=2026-02-06&spr=https&st=2026-11-04T02%3A01%3A03Z&se=2026-11-04T03%3A01%3A03Z&sr=c&sp=r&sig=UuiZcdy6dD%2F23NgLsXOlajfDPrM%2FxAAPKbtDTaTa6Ew%3D) ## Auditing cost normalisation amounts in a fund LUSID categorises [journal entry lines](/v1/docs/how-does-lusid-generate-journal-entry-lines-from-economic-activity) representing cost normalisation amounts in a `NA_CostNormalisation` [economic bucket](/v1/docs/what-are-economic-buckets). Note also that LUSID automatically balances cost normalisation journal entry lines by offsetting credit amounts for cash holdings above the transaction date average with debit amounts for cash holdings below the average. You can view journal entry lines to audit cost normalisation amounts, for example: ```json curl -X POST 'https://.lusid.com/api/api/funds/MyFundScope/MyFundCode/valuationpoints/journalentrylines/$query'   -H 'Content-Type: application/json-patch+json'   -H 'Authorization: Bearer '   -d '{   "start": {"date": "2023-11-01T00:00:00.0000000+00:00"},   "end": {"date": "2023-11-14T00:00:00.0000000+00:00"} }' ``` The response might look like this, transformed to a Pandas dataframe for clarity: ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/f253773e-203f-4f47-aec8-2a289eda005a.png?sv=2026-02-06&spr=https&st=2026-11-04T02%3A01%3A03Z&se=2026-11-04T03%3A01%3A03Z&sr=c&sp=r&sig=UuiZcdy6dD%2F23NgLsXOlajfDPrM%2FxAAPKbtDTaTa6Ew%3D) Note the following: - Journal entry lines representing cost normalisation amounts are produced by a `LusidValuation` rather than a `LusidTransaction` operation. - They can be of [holding types](/v1/docs/what-are-the-holding-types) `C` (unsettled cash commitment), `R` (unsettled cash receivable), `A` (unsettled cash accrual) or `B` (settled cash balance). - They are only calculated in base (portfolio) currency. You can [create a trial balance](/v1/docs/what-is-a-trial-balance#generating-a-trial-balance) with a general ledger profile that includes an `EconomicBucket` level to drill down into accounts containing cost normalisation amounts, for example: ```json curl -X POST 'https://.lusid.com/api/api/funds/MyFundScope/MyFundCode/valuationpoints/trialbalance/$query'  -H 'Content-Type: application/json-patch+json'  -H 'Authorization: Bearer '  -d '{  "start": {"date": "2023-11-01T00:00:00.0000000+00:00"},  "end": {"date": "2023-11-14T00:00:00.0000000+00:00"},  "generalLedgerProfileCode" : "CostNormDrillDown" }' ``` The response might look like this, transformed to a Pandas dataframe for clarity: ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/d829dbc9-11b6-48f4-ace2-e5a8094c3424.png?sv=2026-02-06&spr=https&st=2026-11-04T02%3A01%3A03Z&se=2026-11-04T03%3A01%3A03Z&sr=c&sp=r&sig=UuiZcdy6dD%2F23NgLsXOlajfDPrM%2FxAAPKbtDTaTa6Ew%3D)