diff --git a/docs/guides/read-your-portfolio.md b/docs/guides/read-your-portfolio.md index 9255511..02b994f 100644 --- a/docs/guides/read-your-portfolio.md +++ b/docs/guides/read-your-portfolio.md @@ -24,6 +24,7 @@ ZFIN_HOME=examples/pre-retirement-both zfin portfolio Portfolio Summary (examples/pre-retirement-both/portfolio.srf) ======================================== Value: $1,383,137.81 Cost: $658,837.01 Gain/Loss: +$724,300.80 (109.9%) + Yesterday: -$1,845.22 (-0.13%) Lots: 13 open, 0 closed Positions: 5 symbols Historical: 1M: +3.2% 3M: +13.3% 1Y: +24.5% 3Y: +56.4% 5Y: +56.1% 10Y: +182.6% @@ -37,6 +38,13 @@ How to read it: - **The header line** is your liquid total, total cost, and aggregate gain/loss. +- **The session line** is a single trading day's move, equities only. + It is labelled by the session it actually describes: `Day` when the + prices are today's, `Yesterday` when the newest available closes are + yesterday's (the usual case mid-session, since this prices from cached + closes), or an explicit date after a weekend or with a stale cache. + Its percentage is against the previous session's whole account value, + so it lines up with the Gain/Loss percentage above. - **Historical** is the portfolio's blended price return over trailing windows -- a quick "how have my holdings done" gut check. - **Each position** shows aggregated shares, average cost, current diff --git a/docs/reference/cli/portfolio.md b/docs/reference/cli/portfolio.md index e3e5b56..33eb82f 100644 --- a/docs/reference/cli/portfolio.md +++ b/docs/reference/cli/portfolio.md @@ -22,6 +22,7 @@ ZFIN_HOME=examples/pre-retirement-both zfin portfolio Portfolio Summary (examples/pre-retirement-both/portfolio.srf) ======================================== Value: $1,383,137.81 Cost: $658,837.01 Gain/Loss: +$724,300.80 (109.9%) + Yesterday: -$1,845.22 (-0.13%) Lots: 13 open, 0 closed Positions: 5 symbols Historical: 1M: +3.2% 3M: +13.3% 1Y: +24.5% 3Y: +56.4% 5Y: +56.1% 10Y: +182.6% @@ -38,6 +39,42 @@ Portfolio Summary (examples/pre-retirement-both/portfolio.srf) Manual-priced rows render in warning color (the price may be stale). +### The session-change line + +The second line is the move over a single trading session -- a brokerage +"day change". It covers equity holdings only; cash, CDs and options have +no daily price move and contribute zero. The percentage is measured +against the *previous session's whole account value*, cash included, so +it is comparable with the Gain/Loss percentage above it. + +**The label names the session it describes, which is not always today:** + +| label | meaning | +|-------|---------| +| `Day` | prices are from today -- live quotes, or today's close once it has posted | +| `Yesterday` | the newest prices available are yesterday's close | +| `2026-08-21` | older still: a weekend, a holiday, or a stale cache | + +So a `zfin portfolio` run during Tuesday's session normally shows +`Yesterday`, because it prices from cached closes and Tuesday's bar does +not exist yet. In the TUI's live mode (`L`) it shows `Day`, updating as +ticks arrive. + +A trailing marker appears when a security that *should* have a daily +price series didn't have one, and names the market value the figure is +therefore short by: + +``` + Day: +$12,345.67 (+0.85%) [$1.2M no history] +``` + +Holdings you price by hand with `price::` are **not** counted as a gap -- +they can never have a daily series, so flagging them every run would be +noise. They already render in warning color. The marker is reserved for +the fixable case: try [`zfin doctor`](doctor.md) or +[`zfin cache stale`](cache.md) to find out why a security has no candle +history. + ## See also - [Read your portfolio](../../guides/read-your-portfolio.md) -- how to interpret this. diff --git a/docs/reference/tui.md b/docs/reference/tui.md index 721446e..810a5a0 100644 --- a/docs/reference/tui.md +++ b/docs/reference/tui.md @@ -74,6 +74,12 @@ price stream (off by default). While on, prices update in place every re-values the whole position table and totals as held symbols tick. Press `L` again (or switch tabs) to stop. +The Portfolio tab's session-change line follows along: outside live mode +it reads `Yesterday` (or a date), because prices come from cached closes; +with the stream on it reads `Day` and tracks today's move as ticks +arrive. See [`zfin portfolio`](cli/portfolio.md#the-session-change-line) +for how that figure is defined. + The feed follows [`ZFIN_LIVE_QUOTE_PROVIDER`](config/environment.md#live-quotes-and-streaming): keyless **Yahoo** (default, ~15-min delayed) or real-time IEX via