Portfolio Accounting
Keeping an accurate, valued record of holdings, cost basis, profit and loss, income, and net asset value.
Learning outcomes
A bank ledger answers one question well: how much money is in this account. A portfolio is harder, because the thing you hold is not money. It is two hundred shares of a company, a bond that pays you twice a year, a position in yen that is worth a moving number of dollars. Portfolio accounting is the discipline of keeping an accurate, valued, defensible record of what a portfolio holds and how it has performed, even though almost nothing in it stands still. Get it right and a fund can strike a price every day that an auditor, a regulator, and an investor all trust. Get it wrong and you misprice the fund, pay the wrong investor the wrong amount, and discover the error only when someone redeems at a number that was never real.
After studying this page, you can:
- Explain what a portfolio accounting system records that a cash ledger does not, and why a position needs cost basis, accruals, and a market value rather than a single number.
- Distinguish realized from unrealized profit and loss, and compute each from lots and prices without confusing a paper gain with a banked one.
- State what net asset value is, how it is built from valued positions less liabilities, and why a single stale price can poison the whole number.
- Say precisely when a firm uses trade-date accounting and when it uses settlement-date accounting, and what each one does to a position and a cash balance on the day in between.
- Explain why firms run both an investment book of record and an accounting book of record, what each optimizes for, and where they are allowed to disagree.
- Trace a corporate action, a dividend, a split, a merger, through positions, cost basis, accruals, and cash, and name where it silently breaks if it is missed.
- Describe how a portfolio accounting engine is built (position keeping, a valuation pipeline, corporate-action processing) and reconciled against custody and a security master, and name the failure modes that reconciliation exists to catch.
Before we dive in
You do not need a markets background to start, but you do need a handful of terms, and we will define each one as it first appears. This page assumes you already accept the core of double-entry accounting: that every economic event is recorded as balanced movements, that balances are derived from immutable postings rather than overwritten, and that the books proving consistent with themselves is different from the books being true. Portfolio accounting is built directly on that skeleton.
A portfolio is a collection of holdings managed as a unit: a mutual fund, a pension mandate, a hedge fund book, a single client account. A security (or instrument) is a tradable financial asset: a share of stock, a bond, a currency forward. A position is how much of one security a portfolio holds, for example long two hundred shares or short fifty. Long means you own it and gain if it rises; short means you have sold something you do not own and gain if it falls. Cost basis is what you paid to acquire a position, the anchor against which gain is measured. Profit and loss, written P&L or PnL, is the change in value of a position. Net asset value, or NAV, is the total value of a portfolio’s assets minus its liabilities, and per share it is the price at which investors buy and sell into a fund.
A custodian is the bank that legally holds the securities and cash on the portfolio’s behalf and reports what it sees. A fund accountant is the person or team (often at a third-party administrator) responsible for striking the official NAV. Reconciliation is the control that compares the portfolio’s own records against an external source of truth, most often the custodian. Hold these loosely for now; each gets its own section. The one idea to carry from the first line is that a portfolio is a moving target, and accounting for it well means pinning down a moving target precisely enough that a number you publish today survives an audit two years from now.
Mental Model
The wrong model, and it is the one most engineers arrive with, is that a portfolio is a bank account with a balance. You held some shares, the price went up, so your balance went up, and the system just needs to multiply quantity by price and store the result. In this picture there is one number per holding and it floats with the market.
That model fails immediately, and understanding why it fails is most of the subject. A portfolio is not one number; it is a stack of distinct facts that move on different clocks and must be kept separately or the answer is meaningless. Your two hundred shares are a quantity, and that quantity only changes when you trade or a corporate action changes it, never because the price moved. What you paid for them is a fixed historical fact, frozen the day you bought, that the market cannot touch. What they are worth today is a market number that changes every second the market is open. The gain is the difference between worth and paid, and even that splits in two: the part you have locked in by selling (realized) and the part that is still riding the market (unrealized). On top of all that, some instruments earn income just by being held, a bond accruing interest day by day whether or not anyone trades it.
So the model to hold is a portfolio as a set of independent ledgers layered on the same holding: a quantity ledger that only trades move, a cost ledger frozen at purchase, an income ledger that ticks with the calendar, and a valuation that is recomputed from outside prices and never stored as the truth. The skill of portfolio accounting is keeping these layers separate and consistent at once, because the moment you collapse them into one floating balance, you can no longer say how much of today’s number is real, how much is a paper gain that could vanish tomorrow, and how much is interest you have earned but not yet been paid. The bank-account instinct collapses exactly the distinctions the whole discipline exists to preserve.
Breaking it down
The teaching runs in fifteen steps. The first six build the static picture: what a position is, what it costs, what it earns, and what it is worth. The next three add the dimensions that make real portfolios hard: time, the two books of record, and currency. The last six turn to performance, the events that break everything, reconciliation, the engine that runs it all, and how the whole thing scales and fails.
1. What a portfolio accounting system is actually for
Start with the job, because the architecture follows from it. A portfolio accounting system exists to answer three questions, every day, defensibly: what do we hold, what is it worth, and how has it performed. Each word in that sentence is load-bearing. What do we hold is a question about quantities and positions, and it must be exact, because being wrong by a single share means you are pricing the wrong portfolio. What is it worth is a valuation question, and the answer must be reproducible: you must be able to say which price you used, where it came from, and as of what moment, because an investor redeeming at today’s NAV is trusting that number. How has it performed is a question about change over time, attributed correctly between what you earned and what the market gave you.
The reason this is its own discipline, rather than a feature of a trading system, is that the consumers are different and unforgiving. A trader cares about the position right now to make the next decision. An accountant cares about a clean, final, dated record that ties out to the penny and survives an audit. A regulator cares that the NAV an investor transacted on was struck fairly and consistently with the fund’s own stated policy. An investor cares that the gain reported to them is real and the tax lot is right. One system has to serve all of them, and they disagree about what “correct” even means: the trader will tolerate an approximate price for speed, the accountant will not tolerate anything but the official price. Holding both standards of truth at once, fast-and-approximate for decisions and slow-and-exact for the record, is the structural tension this whole page keeps returning to.
2. The position is the atom and it rests on double-entry
A position is the central object: a quantity of one security held in one portfolio, long or short, with everything you need to value it and reason about its history. Naively a position looks like one row, security plus quantity. In a real system it is much more, because a position is not a stored number you increment; it is a derived view over an immutable history of events, exactly as an account balance is in double-entry.
This is the first place the skeleton from the ledger track shows through. A portfolio accounting system is a double-entry ledger, with securities and cash as the things that move. When you buy two hundred shares for ten thousand dollars, you do not just bump a share count. You record a balanced transaction: the securities position rises by two hundred shares (and by ten thousand dollars of cost), and cash falls by ten thousand dollars, and the two sides must equal. Quantity itself participates in the conservation: shares do not appear from nowhere; they arrive from a counterparty and leave your cash to pay for them. The same self-checking structure that keeps a cash ledger honest keeps a securities ledger honest, which is why position quantities and the cash that paid for them can be reconciled against each other and against the custodian.
flowchart LR E["Trade event<br/>buy 200 shares at $50"] --> J["Balanced transaction"] J --> P["Securities position<br/>+200 shares, +$10,000 cost"] J --> C["Cash<br/>-$10,000"] P --> V["Position view<br/>quantity, cost, market value, PnL"] C --> V
The payoff of treating a position as a derived view over events, rather than a mutable counter, is the same as in any ledger. You can reconstruct the position as of any past date by replaying its events to that point, which is exactly what an auditor or a tax report demands. You never lose the history of how you got to today’s quantity. And the quantity, the cost, and the cash can each be checked against the others, because they all fall out of the same balanced transactions. A position that is just a number in a column has thrown all of that away before the system has even gone live.
3. Cost basis and the lots underneath a position
Cost basis is what you paid to acquire a position, and it is the anchor for every gain calculation that follows. Here is the subtlety that catches people: a position of two hundred shares is rarely a single purchase. You might have bought one hundred at fifty dollars in January and another hundred at sixty dollars in March. The position is two hundred shares, but its cost is not a single price. It is two lots, two separately tracked acquisitions, each with its own quantity, price, and acquisition date.
The lots matter the moment you sell, because to compute the gain on a sale you must know which shares you sold, and that is a policy choice, not a fact of nature. If you sell one hundred shares, did you sell the cheaper January lot or the pricier March one? The answer changes your realized gain and your tax. The common conventions are FIFO (first in, first out: the oldest lot goes first), LIFO (last in, first out: the newest lot goes first), average cost (collapse all lots into one blended price), and specific identification (you name the exact lots to sell). These are not interchangeable. FIFO and average cost are the workhorses; many jurisdictions and fund types mandate one or constrain the choice, and the method must be applied consistently, because switching it mid-stream to flatter a number is exactly the kind of manipulation accounting standards exist to prevent.
Notice the engineering consequence. Because the realized gain depends on which lot you relieve, the system cannot store a position as quantity-and-average-price and call it done; it must keep the lots, with their dates and prices, as first-class records, and apply the chosen relief method deterministically on every sale. A system that throws away lot detail can still report a total quantity, but it can no longer compute a defensible tax lot or support specific identification, and retrofitting lots after the fact is painful precisely because the history was discarded.
4. Realized and unrealized profit and loss
Now the distinction the mental model warned you not to collapse. Unrealized P&L is the gain or loss on a position you still hold: the difference between what it is worth at today’s market price and what it cost. It is a paper number. It moves every time the price moves, and it can evaporate tomorrow, because you have not sold. Realized P&L is the gain or loss you have locked in by actually selling: the difference between what you received and the cost basis of the specific lots you relieved. Once realized, it does not move with the market, because the position is gone. The same total gain is unrealized while you hold and becomes realized at the instant you sell.
Why insist on the split? Because they mean different things to every consumer. Tax usually attaches to realized gains, not paper ones, so the line between them is a legal boundary, not a presentational nicety. A fund’s distributable income depends on what is realized. A risk manager watching unrealized P&L is watching exposure that could reverse; a treasurer watching realized P&L is looking at cash that has actually changed hands. Collapse the two into one number and you can no longer answer the question every one of those people is really asking.
There is a quieter point hiding in that walkthrough. Unrealized P&L is only as trustworthy as the price you marked it at. Realized P&L is anchored to a real transaction price that someone actually paid, so it is hard to argue with. Unrealized P&L rests on a valuation you chose, and if that valuation is stale, illiquid, or mismarked, the unrealized number is fiction dressed as fact. This is why valuation, the next few sections, is where the integrity of the whole portfolio number is won or lost.
5. Income accruals and the passage of time
Some instruments pay you simply for holding them, and the timing of that payment almost never lines up with when you earned it. A bond with a five percent coupon paying semiannually hands you cash twice a year, but you earned that interest every single day you held the bond. If you only recorded income on the two coupon dates, the portfolio’s value would lurch up twice a year and sit flat in between, which is both wrong and unfair: an investor who redeemed the day before a coupon would be cheated of interest they were owed, and one who bought the day before would get a windfall.
The fix is accrual accounting: you recognize income as it is earned, day by day, not when the cash arrives. Each day the bond accrues a slice of its coupon, recorded as accrued interest, an asset representing income earned but not yet received. This accrual is part of the position’s value and therefore part of NAV. When the coupon finally pays, the accrued interest that had built up converts to cash, and the accrual resets. The same logic governs dividend income (accrued from the ex-dividend date to the pay date) and any other periodic income. The principle is the one from the ledger track: revenue is recognized when earned, which is not always when cash moves.
sequenceDiagram participant T as Time participant A as Accrued interest (asset) participant C as Cash T->>A: Day by day, accrue a slice of the coupon Note over A: NAV rises smoothly as interest is earned T->>A: Coupon pay date arrives A->>C: Accrued interest converts to cash received Note over A,C: Accrual resets to zero, NAV unchanged at the flip
Accruals are a classic silent failure. If the accrual stops running, say a holiday calendar is wrong or a rate feed breaks, the income simply fails to build, and nothing screams. NAV is quietly understated, every day, by an amount nobody sees until the coupon pays and the cash does not match the (missing) accrual, or until reconciliation flags the gap. Because the error is small each day and accumulates invisibly, missed accruals are among the most common and most embarrassing portfolio accounting breaks: the books still balance internally, they are just understating what the portfolio has truly earned.
6. Valuation and net asset value
Valuation is the act of assigning a current worth to each position, and net asset value is what you build from it. The definition is simple and the difficulty is entirely in the inputs:
NAV = sum of all positions at market value
+ cash and accrued income
- liabilities (fees payable, amounts owed)
Per share, you divide NAV by shares outstanding, and that NAV per share is the price at which investors enter and exit the fund. Everything rides on the market values. For a liquid stock, the market value is quantity times a clean closing price, and the only hard parts are using the right price, as of the right moment, in the right currency. For less liquid instruments it gets genuinely hard. A thinly traded bond may not have a trade on the valuation day at all, so its price comes from a pricing vendor’s model or a matrix, and now the NAV depends on a model you must be able to defend. This is the line between mark to market (value at an observable traded price) and mark to model (value at a modeled price when no clean market price exists), and regulators and auditors care intensely about which you used and why, because mark to model is where mispricing hides.
The discipline that surrounds this is a valuation policy (sometimes administered by a valuation or pricing committee): a written, consistently applied set of rules for which price source to use for each instrument type, what time to snap prices, how to handle stale or missing prices, and how to value hard-to-price assets. The policy exists because NAV is the number an investor transacts on, so it must be struck fairly and the same way every day; choosing a flattering price on a bad day is not an oversight, it is misvaluation, and it harms whichever investors are on the wrong side of the trade that day. The single most common valuation failure is a stale price: a price feed that stopped updating, so a position is carried at yesterday’s (or last week’s) number while the market moved. The position looks fine, NAV looks fine, and yet the fund is mispriced, and everyone who buys or sells at that NAV is transacting at a wrong price.
The slider makes the asymmetry visceral: there is no safe amount of staleness. From day one, an investor can transact at a NAV that does not reflect reality, and because a fund typically prices once a day, a stale input means an entire day of subscriptions and redemptions happen at a wrong price that may never be clawed back. This is why the valuation pipeline, covered in the engineering section, treats price freshness as a hard control, not a nicety.
7. Trade-date versus settlement-date accounting
A trade and its settlement do not happen at the same moment. You agree to buy two hundred shares today (the trade date), but the cash and the securities actually exchange a few days later (the settlement date), when the trade becomes final. In most major equity markets settlement is now T+1, one business day after the trade; many markets moved from T+2 to T+1 in 2024, and historically settlement was even longer. That gap raises a question the books must answer: on the day in between, do you own the shares or not?
There are two consistent answers, and firms use both for different purposes. Under trade-date accounting, you record the position and the corresponding obligation the instant the trade is agreed: you own two hundred more shares as of trade date, and you owe the cash, recorded as a payable until it settles. Under settlement-date accounting, you record nothing in positions or cash until settlement actually occurs; until then the trade is a pending, off-balance commitment. The economic substance is identical; what differs is when the books reflect it.
stateDiagram-v2
[*] --> Agreed: trade executed (trade date)
Agreed --> TradeDateBooks: trade-date accounting posts now
Agreed --> Pending: settlement-date accounting waits
TradeDateBooks --> Settled: cash and shares exchange (settlement date)
Pending --> Settled: posts now, at settlement
Settled --> [*]
note right of TradeDateBooks
Position and a payable exist
from trade date onward.
end note
note right of Pending
No position or cash change
until settlement.
end noteWhich one wins depends on what the book is for. Investment views, the ones a portfolio manager uses to decide the next trade, almost always want trade-date: the moment you have committed to buy, that exposure is real to your strategy and your risk, regardless of when cash moves, and managing against settlement-date positions would leave you blind to commitments you have already made. Accounting views often run settlement-date for cash, because cash is not legally yours until it settles, and a financial statement should reflect what has actually, finally happened. This is not a contradiction to be resolved; it is the reason firms run two books, which is the next section. The key fact to hold: trade date is about economic commitment, settlement date is about legal finality, and a serious firm needs to see both, on the same trade, at the same time.
8. IBOR and ABOR and why firms run both
This is the structural heart of institutional portfolio accounting, and it confuses people because it looks like running two copies of the same thing for no reason. It is not. The investment book of record (IBOR) and the accounting book of record (ABOR) answer different questions for different masters, and a firm of any size runs both deliberately.
The IBOR is the front-office view: the position book a portfolio manager and trader rely on to make decisions, intraday, in near real time. It optimizes for timeliness and decision-relevance. It is typically trade-date based, it reflects pending trades and expected cash, and it wants to be current to the minute so the manager never trades against a position they do not actually have. The ABOR is the back-office, official view: the position and valuation book used to strike the published NAV, produce financial statements, and report to regulators and investors. It optimizes for accuracy, finality, and auditability. It is reconciled to the custodian, struck once a day at an official valuation point, and it is the number of record. The IBOR answers “what should I do next”; the ABOR answers “what is the final, true, defensible state of this fund.”
So why not one book? Because the two requirements genuinely conflict. The IBOR must be fast and forward-looking, which means it sometimes shows things that are not yet final: a trade that might still be amended, an expected dividend, a price that is good enough but not official. The ABOR must be exact and final, which means it deliberately waits for confirmation, settlement, and the official price. If you forced the manager to trade only off the slow official book, they would be perpetually blind to their own recent activity; if you struck NAV off the fast provisional book, you would publish numbers that later move. The two books are allowed to disagree on any given intraday moment, and a healthy firm watches that gap and explains it. The gap is not an error to eliminate; it is the difference between a working estimate and a final fact, and seeing both is the point.
9. Multi-currency holdings and revaluation
The moment a portfolio holds anything denominated in a currency other than its base currency (the currency it reports and strikes NAV in), a second source of P&L appears, and it is easy to get wrong. Suppose a US dollar fund buys a stock priced in euros. The position now has two ways to gain or lose: the stock’s price can move in euros, and the euro can move against the dollar. The dollar value of the holding is the euro price times the quantity times the exchange rate, and the exchange rate is itself a market number that changes constantly.
This forces revaluation: at each valuation point you must restate every foreign-currency holding into the base currency at the current exchange rate, not the rate that prevailed when you bought. The change in base-currency value caused purely by the exchange rate moving is foreign exchange P&L, or FX revaluation, and a serious system separates it from the price P&L of the instrument itself, because they have different causes and different consumers. A manager who picked a good stock but lost it all to an adverse currency move needs to see those two effects apart, or they cannot tell whether their thesis was right.
The engineering consequences ripple outward. Cost basis must be stored in both the local currency (to track the instrument’s own gain) and the base currency (for the books). Accruals on a foreign bond accrue in the local currency and must be revalued too. Realized FX P&L crystallizes not only when you sell the security but also when foreign cash is converted or repatriated. And every exchange rate you use needs the same provenance discipline as every price: which source, as of what moment. Multi-currency does not add a column; it multiplies the dimensions of every position, and a system that bolts currency on late, rather than designing for it from the start, tends to discover that its cost basis and P&L were single-currency assumptions baked into a hundred places.
10. Performance measurement is not accounting
Here is a distinction that is constantly blurred and should not be: accounting answers “what is it worth and what did it cost,” while performance measurement answers “how good was the return, fairly stated.” They use the same underlying data, but they are different disciplines with different correct answers, and conflating them produces returns that flatter or mislead.
The crux is how you handle cash flowing in and out of the portfolio. If an investor adds a million dollars mid-month and the portfolio’s value rises, naively dividing ending value by starting value credits the manager for money the investor brought, which is not skill. Performance measurement strips that out. Time-weighted return (TWR) removes the effect of the timing and size of external cash flows, so it measures the manager’s decisions independent of when investors happened to add or withdraw money; it is the standard for comparing managers and the basis of most reporting standards. Money-weighted return, equivalent to an internal rate of return, deliberately keeps the effect of cash-flow timing, because it answers a different and equally valid question: what return did this particular investor actually experience, given when they put money in. The two can differ sharply for the same portfolio over the same period, and neither is wrong; they answer different questions.
flowchart TB D["Same valued positions<br/>from the accounting books"] --> ACC["Accounting<br/>NAV, P&L, cost basis,<br/>the dated record of record"] D --> PERF["Performance measurement"] PERF --> TWR["Time-weighted return<br/>strips out cash-flow timing<br/>measures the manager"] PERF --> MWR["Money-weighted return<br/>keeps cash-flow timing<br/>measures the investor's experience"]
Why keep them separate in a system? Because performance is a derived, opinionated layer on top of clean accounting, and it depends utterly on the accounting being right first. You cannot compute an honest return on a portfolio whose positions do not reconcile or whose prices are stale; garbage NAV in, garbage return out. So performance measurement is downstream: it consumes the official, reconciled valuations from the ABOR and applies return mathematics on top. An engineer who builds performance off un-reconciled, provisional numbers will produce returns that change after the fact, which destroys their credibility. Accounting earns the trust; performance spends it.
11. Corporate actions the silent break factory
A corporate action is an event initiated by a security’s issuer that changes the security or what holders receive: a cash dividend, a stock split, a merger, a spin-off, a rights issue, a name or identifier change. These are the single richest source of portfolio accounting breaks, because each one must propagate correctly through positions, cost basis, accruals, and cash, often on tight deadlines, and a single mishandled action quietly corrupts a position and everything derived from it.
Walk a few to feel the spread. A cash dividend is the gentlest: holders of record on a date receive cash per share. It accrues from the ex-dividend date, then pays, exactly like the income in section five; miss it and you understate value. A stock split (say two-for-one) doubles the share count and halves the price; the position’s quantity and per-share cost basis both change, but total cost and total value do not, so a split that adjusts quantity without adjusting cost basis instantly corrupts your P&L. A merger can convert your shares into cash, into shares of the acquirer, or a mix, each with its own basis treatment, and getting the new cost basis wrong poisons every future gain calculation on the surviving position. A spin-off splits one holding into two and requires allocating the original cost basis across them. The deadline pressure is real: many actions have elections (a choice the holder must make, for example cash versus stock) with a hard cutoff, and missing the window means accepting a default you may not want.
The architectural lesson is that corporate-action processing cannot be an afterthought bolted onto the side of position keeping; it is a core pipeline with its own data feed, its own deadlines, and its own reconciliation. Firms subscribe to corporate-action data from vendors (and the custodian announces them too), and a recurring break is the two sources disagreeing on the terms or the dates, which must be resolved before the action is applied. Because one missed or misapplied action corrupts a position permanently, and the corruption then flows into NAV, P&L, performance, and tax, corporate actions are where careful firms invest disproportionate control, and where careless ones bleed slow, hard-to-find errors.
12. Reconciliation to custody and the security master
The portfolio’s own books are internally consistent by construction, because they rest on double-entry. That guarantees the books agree with themselves; it says nothing about whether they agree with reality. Reconciliation is the control that closes that gap by comparing the firm’s records against an external source of truth, and it is not optional polish; it is the daily discipline that makes a NAV trustworthy.
There are two reconciliations that matter most here. The first is reconciliation to the custodian: every day, the firm compares its own positions and cash against the custodian’s report of what it actually holds for the portfolio. A mismatch is a break, and breaks are investigated and resolved before NAV is struck, because the custodian holds the real assets and is closer to legal truth than the firm’s internal ledger. A position break (the firm thinks it holds two hundred shares, the custodian shows one hundred ninety) usually means a trade was dropped, duplicated, booked to the wrong account, or a corporate action was missed on one side. The second is reconciliation against the security master: the firm’s reference database of every instrument’s static facts (its identifiers, currency, asset type, coupon, maturity, lot size). If the security master is wrong, every position in that security is valued and accounted wrongly in the same way, so a single bad reference record corrupts an entire class of holdings at once.
flowchart LR
INT["Firm's own books<br/>positions and cash"] --> CMP{"Compare daily"}
CUST["Custodian report<br/>what is really held"] --> CMP
CMP -->|"matches"| OK["Clean: strike NAV"]
CMP -->|"differs"| BRK["Break: investigate<br/>dropped, duplicated,<br/>misbooked, missed action"]
BRK --> FIX["Resolve, then re-reconcile"]
FIX --> CMP
SM["Security master<br/>identifiers, currency,<br/>coupon, asset type"] --> INTThe reason reconciliation is the load-bearing control, rather than the trial balance, is exactly the lesson from the ledger track: internal consistency is not external correctness. A portfolio’s books can balance perfectly while being wrong, because a dropped trade, a missed dividend, or a stale price each leaves the internal books self-consistent. Only comparison against the outside world, the custodian, the pricing vendor, the corporate-action feed, reveals the gap. This is why fund accounting is built around a daily reconciliation cycle with breaks cleared before NAV is published: the NAV is only as trustworthy as the reconciliation behind it, and an unreconciled NAV is a guess wearing a number’s clothing.
13. Engineering the accounting engine
Now assemble the machine. A portfolio accounting engine has three core subsystems, and they correspond directly to the concepts above. Position keeping ingests trades, cash movements, and corporate actions as immutable events and derives positions, lots, cost basis, and accruals from them, exactly as a double-entry ledger derives balances from postings. Corporate-action processing consumes the corporate-action feed, applies each action to the affected positions and cost bases on schedule, and reconciles the terms across sources before applying. The valuation pipeline pulls prices and exchange rates from vendors, applies the valuation policy (which source, which time, freshness checks), revalues every position into the base currency, and computes NAV. Performance, tax, and reporting are downstream consumers of the valued, reconciled output.
flowchart TB
subgraph ingest["Event ingestion (immutable)"]
TR["Trades"]
CF["Cash flows"]
CA["Corporate actions"]
end
subgraph engine["Accounting engine"]
PK["Position keeping<br/>positions, lots, cost basis, accruals"]
CAP["Corporate-action processing"]
VP["Valuation pipeline<br/>prices, FX, freshness, NAV"]
end
subgraph control["Controls"]
REC["Reconciliation to custody"]
SM["Security master"]
end
TR --> PK
CF --> PK
CA --> CAP
CAP --> PK
SM --> PK
PK --> VP
VP --> NAV["NAV and the books of record"]
PK --> REC
NAV --> REC
REC --> NAVA few engineering principles fall out of everything above. Store events, derive state: positions, lots, accruals, and balances are all folds over an immutable event log, so any past state can be reconstructed for an audit or a tax report, and an error is corrected by a new compensating event, never by editing history. Represent quantities and money exactly: share quantities can be fractional (many funds and brokerages hold fractional shares), and money is integer minor units carrying its currency, never a float, for the same reasons a cash ledger demands it. Make valuation reproducible: store which price and rate you used, from which source, as of which moment, alongside the NAV, so the number is defensible and replayable rather than a snapshot you can never reconstruct. And treat freshness and reconciliation as hard gates: a NAV should not be publishable while a price is stale beyond policy or a custody break is open, because publishing past those controls is precisely how a wrong number reaches an investor.
The engine, in other words, is double-entry with three hard extensions: lots and cost basis under each position, a valuation layer that pulls in outside prices and currencies, and a corporate-action pipeline that mutates positions on the issuer’s schedule. Every hard part of the engine is one of those three extensions interacting with the immutable-event, derived-state foundation.
14. Failure modes and the controls that catch them
A portfolio accounting system, like any ledger, is internally self-checking but not self-correcting, and the failures that hurt are the ones the internal books cannot see. Knowing which control catches which failure is the difference between trusting the structure blindly and building the right guards around it.
The pattern is the one to carry away. Every failure above leaves the internal books either balanced (so the trial-balance-style check is silent) or off by an amount no internal sum can attribute. That is why the real controls live outside the internal ledger: freshness checks against the market, reconciliation against the custodian, cross-source validation of corporate-action terms and reference data. The internal double-entry structure guarantees the books agree with themselves; everything that makes a portfolio number actually true is a control that checks the books against an external reality. An engineer who believes a balanced set of books is a correct set of books will ship a perfectly consistent, perfectly wrong NAV.
15. Scaling from a startup to a large institution
The principles do not change with size, but the architecture and the division of labor do, and knowing the trajectory keeps you from over-building on day one or under-building on day one thousand.
A small shop, a single fund or a robo-advisor’s book, can run the entire thing as one service over one database: positions derived from an event log, a daily price pull, a nightly NAV, and a reconciliation against a single custodian. At this size, IBOR and ABOR can even be the same book queried two ways, because the volume and instrument complexity do not yet force them apart, and one team owns the whole pipeline. This is the right starting point; resist building a multi-book, multi-currency, vendor-integrated platform before any of those pressures are real.
flowchart TB
subgraph s1["Startup: one fund, one book"]
A["Single engine and DB:<br/>events, daily NAV,<br/>one custodian reconciliation"]
end
subgraph s2["Growth: multiple funds, currencies, instruments"]
B["Distinct IBOR and ABOR;<br/>vendor price and corporate-action feeds;<br/>multi-currency revaluation"]
end
subgraph s3["Institution: outsourced and segregated"]
C["Third-party administrator strikes ABOR/NAV;<br/>front office owns IBOR;<br/>independent reconciliation and oversight"]
end
s1 --> s2 --> s3As the firm grows, the pressures arrive in a recognizable order. More instruments and currencies force a real valuation pipeline with multiple vendors, freshness controls, and revaluation. The conflict between fast decisions and exact records forces IBOR and ABOR apart into genuinely separate books. More funds and clients force per-mandate segregation and stricter controls. At the largest scale, a structural separation appears: many institutions outsource the ABOR and the official NAV to a third-party fund administrator, while the asset manager keeps the IBOR in house for decisions. This is deliberate: an independent administrator striking the official NAV provides separation between the people who run the money and the people who price it, which is exactly the control an investor and a regulator want, since a manager pricing their own fund has an obvious conflict.
The constant across every size is the foundation this page has built: positions derived from immutable events, lots and cost basis kept precisely, income accrued as earned, valuation reproducible and fresh, and the whole thing reconciled against an external reality before any number is published. A startup runs that loop once a day in one process; an institution runs it across front office, administrator, custodian, and vendors with independent oversight at each seam. The diagram of responsibilities grows enormously; the underlying loop, hold something, value it, prove the value is real, does not change at all.
Mastery Questions
-
A portfolio manager insists the firm should run a single book of record to eliminate the daily reconciliation gap between the IBOR and the ABOR, arguing that two books showing different numbers for the same fund is obviously a bug. How do you respond, and is there any sense in which they are right?
Answer. The manager has mistaken a deliberate design for a defect. The IBOR and ABOR disagree on purpose because they answer different questions under conflicting requirements. The IBOR is fast, trade-date, and forward-looking so the manager can decide the next trade without being blind to their own recent activity and pending settlements; it deliberately reflects things that are not yet final. The ABOR is exact, settlement-aware, reconciled to the custodian, and struck once a day at an official price, because it is the number an investor transacts on and a regulator inspects, so it must wait for confirmation and finality. Collapsing them forces an impossible choice: either the manager trades off a slow official book and is perpetually blind, or you publish NAV off a fast provisional book and your official numbers move after the fact. The intraday gap between the two is not an error to be eliminated; it is the measurable difference between a working estimate and a final fact, and a healthy firm watches and explains it rather than erasing it. Where the manager has a point: at small scale, with few instruments and currencies, one book queried two ways can serve both roles, and forcing a heavyweight two-book architecture too early is over-engineering. The two books are a response to scale and conflicting requirements, not a law that applies from day one. The right answer is to keep one logical book while the pressures are absent and split them when timeliness and finality genuinely pull apart, not to pretend the pressures do not exist.
-
Your fund’s positions reconcile perfectly to the custodian, every transaction is internally balanced, and yet an auditor finds the NAV reported last Tuesday was materially wrong. Is that possible, and where would you look?
Answer. It is entirely possible, because reconciling quantities to the custodian and balancing the books prove that you hold the right amount of each security and that the books agree with themselves. They prove nothing about whether each position was valued correctly. The most likely culprit is a valuation failure that leaves quantities untouched: a stale price, where a feed stopped updating and a holding was carried at an old number while the market moved, or a mark-to-model price that was wrong, or a wrong exchange rate revaluing a foreign holding. Quantity reconciliation is silent on all of these, because the share count was right; only the price applied to it was wrong. A second family of causes is an accrual or corporate-action error that does not change quantity: a missed income accrual understating value, or a stock split that adjusted quantity (so it still reconciles) without correctly adjusting cost basis, or a mishandled merger basis. A third is a security-master error, a wrong currency or coupon, that corrupted valuation for a whole class of holdings whose quantities still tie out. So the investigation goes to the valuation pipeline first: check price freshness and source for each holding as of the valuation point, check the exchange rates, then check accruals and any corporate action effective that week, then the reference data. The general lesson is the recurring one: position reconciliation and internal balancing guarantee internal consistency and correct quantities; they do not guarantee the value is true, and a materially wrong NAV with clean position reconciliation almost always lives in the valuation layer.
-
A junior engineer builds the performance-reporting feature to compute returns directly from the live IBOR positions, because that book is the most current, and they want returns to update in real time. Explain what is wrong with this, and what return number their approach actually risks producing.
Answer. The mistake is building an opinionated, downstream layer on top of provisional, un-reconciled data. Performance measurement consumes valuations and must be built on the official, reconciled ABOR numbers, not the live IBOR, for two reasons. First, the IBOR is provisional by design: it reflects trades that may still be amended, expected cash and dividends not yet confirmed, and prices that are current but not the official marks, none of it reconciled to the custodian. Computing returns off it produces numbers that change after the fact as trades settle, prices are finalized, and breaks are cleared, which destroys the credibility of a performance figure, since a return that silently revises is worse than no return. Garbage NAV in, garbage return out. Second, and more subtly, real-time naive returns risk computing the wrong return concept entirely: if they simply divide current value by starting value, they credit the manager for external cash flows that investors added or withdrew, which is not investment skill. A correct performance number uses a time-weighted return that strips out the timing and size of those external cash flows to isolate the manager’s decisions (or a deliberately money-weighted return to measure a specific investor’s experience), and that calculation needs clean, dated, reconciled valuations and a record of every external flow, none of which the live IBOR is built to provide reliably. The fix is to make performance a downstream consumer of the official, reconciled, dated ABOR valuations, accept that the headline return is struck on the same cadence as the official NAV rather than in real time, and apply a defensible return methodology rather than a naive ratio. Accounting earns the trust; performance only gets to spend trust the accounting has already earned.
Sources & evidence15 claims · 7 cited
Grounded in standard fund-accounting and investment-operations practice (positions, lots, cost basis, accruals, NAV, IBOR/ABOR, multi-currency revaluation, TWR vs money-weighted return, corporate actions, custody reconciliation) and built on the site's double-entry exemplar. The 2024 T+1 transition is the one hard dated fact; lot-relief and accrual mechanics are textbook; engineering and scaling claims are internal-reasoning consistent with the ledger track. No gaps in core scope; jurisdiction-specific tax rules are described in principle rather than per-country.
- Portfolio accounting exists to answer, defensibly every day, what a portfolio holds, what it is worth, and how it has performed.stable common knowledge
- A portfolio accounting system is a double-entry ledger in which securities positions and cash move as balanced transactions, with positions derived from an immutable event history rather than stored as mutable counters.internal reasoning
- Cost basis is tracked at the lot level, and the realized gain on a sale depends on the lot-relief method chosen: FIFO, LIFO, average cost, or specific identification, which must be applied consistently.stable common knowledge
- Unrealized P&L is the change in value of a position still held (a paper number that moves with price), while realized P&L is locked in by an actual sale against the relieved lots' cost basis; tax generally attaches to realized gains.stable common knowledge
- Income such as bond coupons is recognized as earned, day by day, via accrued interest (an asset), which converts to cash on the pay date; dividends accrue from the ex-dividend date to the pay date.stable common knowledge
- NAV equals the sum of positions at market value plus cash and accrued income minus liabilities, and NAV per share is the price at which investors subscribe to and redeem from a fund.verified
- Valuation distinguishes mark to market (observable traded price) from mark to model (a modeled price when no clean market price exists), governed by a written, consistently applied valuation policy; a stale price misprices NAV from day one.stable common knowledge
- Most major equity markets settle on a T+1 basis, having moved from T+2 to T+1 in 2024; trade-date accounting records the position and obligation at execution while settlement-date accounting waits until settlement.verified
- Firms run both an Investment Book of Record (IBOR), a timely trade-date front-office view for decisions, and an Accounting Book of Record (ABOR), an official settled, reconciled, once-a-day view for NAV and reporting, because timeliness and finality requirements conflict.verified
- Holdings in a currency other than the base currency must be revalued at the current exchange rate at each valuation point, producing FX revaluation P&L that a serious system separates from the instrument's price P&L.stable common knowledge
- Performance measurement is distinct from accounting: time-weighted return strips out the timing and size of external cash flows to measure the manager, while money-weighted return (an internal rate of return) keeps cash-flow timing to measure a specific investor's experience.verified
- Corporate actions (dividends, stock splits, mergers, spin-offs, rights issues) must propagate through positions, cost basis, accruals, and cash; a split multiplies quantity and divides per-share basis while keeping total cost and value invariant, and many actions involve holder elections with hard deadlines.stable common knowledge
- Daily reconciliation compares the firm's positions and cash against the custodian's report and against the security master; breaks are investigated and resolved before NAV is struck, because internal balancing proves internal consistency, not external correctness.stable common knowledge
- Money is stored as integer minor units carrying its currency (never a float), and share quantities can be fractional; positions, lots, accruals, and balances are folds over an immutable event log so any past state can be reconstructed for audit or tax.internal reasoning
- At large scale, many asset managers outsource the ABOR and official NAV to an independent third-party fund administrator while keeping the IBOR in house, providing separation between those who run the money and those who price it.verified
Cited sources
- Investment Company Act of 1940 and SEC rules on fund valuation and NAV (including Rule 2a-5 on fair value determination) · US Securities and Exchange Commission
- Investment Operations and Fund Accounting practice (positions, cost basis, lots, reconciliation to custody) · CFA Institute
- Lot accounting and cost-basis methods for securities (FIFO, LIFO, average cost, specific identification) · US Internal Revenue Service
- Accrual basis of accounting and income recognition · IFRS Foundation / FASB
- T+1 settlement transition for US securities · US Securities and Exchange Commission
- Investment Book of Record (IBOR) and Accounting Book of Record (ABOR) in investment operations · Investment management operations practice
- Global Investment Performance Standards (GIPS) and return measurement · CFA Institute