Showing
entries for file position_value.php.
Show everything
Position value page gains an assertion-fed split bridge
Oct 24, 2026
added
Oct 24, 2026
A second edition of the position value page takes its split bridge from the change-assertion tables, so the days between a split taking effect in the market and the shares being posted are valued on the right share count. The original page is unchanged apart from a link that opens the same view in the new edition.
The new edition reads each asset's recorded quantity changes first and uses the older corporate-actions table only for a split that has no assertion yet; a switch draws the bridge from assertions alone. The correction adds each posting row's own shares inside its window rather than scaling the whole count, so later purchases inside the window are left alone and no posting is counted twice. Every bridge applied is listed on the page with its source and dates. The two editions run side by side until the new one takes over the original name.
Position Value shows capital at work, per account, on a fixed timeline
Oct 24, 2026
removed
Oct 24, 2026
The page's version history was moved out of its file header into this changelog, and the inline comments were trimmed to what the code needs. The header now points here. No behaviour changed.
changed
Oct 24, 2026
The chart's timeline now belongs to the whole position in the portfolio: it starts at the first purchase in any account and runs to today, or to the day the portfolio's last share left. Choosing accounts changes only what is drawn on it, so an account that has sold out shows as zero rather than shortening the chart.
added
Oct 24, 2026
The accounts in the active portfolio that hold the position appear as checkboxes on the search bar. Ticking a subset limits the figures, chart, timeline table, coverage bar and worklist to those accounts; the selection is carried in the page's links and toggles.
The selection can only narrow within the active portfolio: account ids are checked against the portfolio before any query runs, and switching portfolio clears it. Identity lookups are unaffected. When a subset is selected and the position appears to end without a sale, the page notes that the shares may simply have moved to an unselected account.
changed
Oct 24, 2026
A sale now releases capital from the account that sold, in proportion to that account's own shares, instead of at the blended average cost across every account. Selling out of one account releases exactly what that account had put in, even when another account bought the same security at a different price.
The page keeps a capital bucket and a share count per account from the ledger rows it already reads. Bought adds capital and shares to that account, reinvested dividends add shares only, and Sold releases from that account's bucket. If a sale exceeds what the selling account holds on the ledger, the uncovered part is released at the blended rate and a warning on the page says so. This is per-account average cost, not lot accounting.
changed
Oct 24, 2026
The dashed capital line, the timeline table's capital column and the capital card now show capital at work: money put in, less what each sale released. Previously the line showed total money put in and never came down after a sale, while the Capital River page's line did. Total return still measures against money put in and is unchanged.
On each sale the running capital is released in proportion to the shares sold. The card reads 'Capital At Work' and, once a sale exists, shows the amount put in and the amount released underneath. The chart tooltip and the table's gain column follow the same figure.
The Position Value page
Sep 21, 2026
changed
Sep 21, 2026
Reconstructed from file notes
The valuation follows the selected portfolio view. Position reads — the rows behind the figures, the accounts list, the coverage bar and the worklist — are limited to the view's accounts, while identity reads still use the whole workspace so a half-keyed ticker joins its asset. When a view has no rows for a position but the workspace does, the page says so and links to the wider view. The 'Viewing' line moved into the page subtitle.
fixed
Aug 22, 2026
Reconstructed from file notes
Around a stock split the chart could drop to a fraction of the position's value for one session, when the market had already repriced but the broker had not yet posted the new share count. The daily series now scales the share count by the recorded split ratio between the split's effective date and the day the ledger posts it, without rewriting either the ledger or the price series.
The bridge never scales cost, never alters the transaction table, does not fire for positions opened after the split, and warns rather than guesses when shares were held before a split that the ledger never recorded. Under a reused ticker it is the one calculation still keyed by symbol, and the shared-ticker note says so. A stray alias for the split row type was removed after checking the stored values.
fixed
Aug 17, 2026
Reconstructed from file notes
A position that ended by a reorganization, spin-off, split or transfer rather than a sale was reported as a near-total loss, because those events book no proceeds. The return figure is now suppressed for such positions and the page says how the position ended instead; capital invested, dividends, share history and the chart are unaffected.
Valuing the conversion at market was rejected as an interpretation that would double-count unless the receiving position were credited in the same pass.
fixed
Aug 17, 2026
Reconstructed from file notes
When two different assets had used the same ticker, the all-rows view and the price lookup could pull the other asset's transactions and prices into this position's figures. Both now reach a symbol only for rows that carry no asset id yet, so a row already keyed to another asset is never counted. The coverage bar's denominator was corrected the same way.
The share count had been right all along, because the per-leg asset ids ignored the foreign rows; the money columns had not, which is why the fault looked plausible rather than broken. A position with no price series of its own now shows an explanatory note instead of borrowing a neighbour's series, and the chart's caption follows the trimmed range after an exit. The conflict warning learned that a reused ticker is a legitimate third cause.
added
Aug 17, 2026
Reconstructed from file notes
The value chart gained a time axis with year gridlines and labels, spaced 1, 2, 5 or 10 years apart depending on the span so that a multi-decade position stays readable. Presentation only; no figure changed.
changed
Aug 17, 2026
Reconstructed from file notes
The page adopted the shared ledger toolbar: the same search box, asset picker and cross-page links as the other four ledger pages, with the search grammar (including the rule that bare digits mean an asset id) owned by the shared code rather than copied here. The mode line now states both how the position was addressed and how much of it is counted.
Row selection deliberately keeps this page's own identity rule rather than the shared one, because this page multiplies shares by a price and a wider row set would be a different valuation, not a longer list. A stale version stamp was corrected.
added
Aug 15, 2026
Reconstructed from file notes
The search box accepts an asset id as well as a ticker. Entering an id values only the rows already keyed to that asset, which makes the page a progress view of the backfill: the gap between the keyed-only figures and the all-rows figures is how much work remains, and a coverage bar shows it. Ambiguous symbols now link to each candidate asset's own view.
All-digit input, '#7' and 'id:7' all mean asset 7; a prefix on a non-number is reported as a typo rather than guessed past. Prices are never narrowed this way, so a keyed position is not valued at zero while its price series waits for backfill.
changed
Aug 14, 2026
Reconstructed from file notes
A position is now identified by its asset record rather than by its ticker string, so a holding that traded under two symbols over its life is valued as one position, from either symbol. While the asset-id backfill is in progress every lookup accepts either key, preferring the asset id, so positions not yet backfilled behave exactly as before.
A symbol that maps to more than one asset is reported as ambiguous rather than merged. Where a ledger row names the asset on each leg, that decides whether shares were added or removed; when the leg and the symbol map disagree, the rows are listed. Price collisions between symbols are ranked, with the row keyed to the resolved asset winning. The backfill note also lists the specific rows still missing an asset id, with an id list ready to paste into a query.
security
Jul 27, 2026
Reconstructed from file notes
The page's own access gate was removed; access is now decided by the site's user accounts and capabilities, with a fail-closed check kept in the file. The page no longer writes anything, not even a cookie.
changed
Jul 26, 2026
Reconstructed from file notes
The page moved into the ledger workspace folder and adopted the site's shared header, footer and navigation. A long-standing markup defect — two container elements never closed — was repaired at the same time, because the shared footer would otherwise have been swallowed into the content column.
added
July 2026
Reconstructed from file notes
A read-only page that values one position over time: summary cards for market value, capital invested, dividends, sale proceeds and total return; a value-over-time chart drawn as a plain inline vector graphic; and a timeline table of transactions and year-end snapshots. Accounting is reinvestment-neutral — reinvested dividends add shares but are not counted as new capital.
Shares held come from the ledger's step function; the daily value multiplies them by the market close, carried forward on days with no price. A diagnostic lists dates where more than one historical symbol supplied a price and which one was kept; notes can be dismissed or suppressed for clean screenshots.