# Segments

A **segment** is a slice of your portfolio: a set of filters, one per field, that together narrow every loan you have uploaded down to the ones you want to look at. "Loans originated 2015 to 2019 with a current balance over $250,000 and a FICO score under 680" is a segment. You build it in the **Segment Builder**, a panel that sits beside the loan table on the [Portfolio screen](/portfolio/the-portfolio-screen/) and beside the analysis on the [Modeling screen](/modeling/the-modeling-screen/).

Slicing is the central thing you do with your data once it is in Vintage. The Modeling screen analyzes a segment, not the whole book, because a curve that averages auto loans with mortgages describes neither. So the segment you build here is the cohort every loss curve, prepayment speed, and price is computed over.

## The Segment Builder panel

The panel's header reads **Portfolio Segment**, with **Reset** on the right. Directly beneath the title is the live count, **N of M loans**: how many loans match your segment, out of every loan in the portfolio. Whenever an edit is pending or a new count is being taken, that line reads **Updating…** in place of the number, so the panel never shows a count that no longer describes the segment on screen.

Below the header is the list of fields you can filter on, a search box for that list, and, at the foot of the list, a **Readiness** group of on/off switches. **Reset** clears every filter and switch in the segment at once.

The panel stays put as the page scrolls, and its whole height is always on screen; a panel taller than your display scrolls inside itself.

## How filters combine

A segment is **AND across fields, OR within a field**. A loan is in the segment when it satisfies every field's filter, and it satisfies one field's filter when it matches any of the ranges or values you allowed for that field.

$$
\text{loan } \ell \text{ is in the segment} \iff \bigwedge_{f \in F} \; \bigvee_{c \in C_f} \big(\ell \text{ meets } c\big)
$$

where:

- `F` is the set of fields that carry a filter,
- `C_f` is the set of ranges or values you allowed for field `f`, and
- "meets" means the loan's value for that field falls in the range, or equals the value.

In plain words: adding a second field **narrows** the result, and adding a second range or value to the **same** field **widens** it. A field with no effective constraint imposes nothing; emptying a control returns that field to "any". With no filters at all, the segment is the whole portfolio.

**A worked example.** Take a portfolio of 10,000 loans.

1. Filter FICO Score to 620-679. The count reads, say, 2,400 of 10,000 loans.
2. Add Origination Date from January 2015 to December 2019. Both conditions must now hold, so the count falls, say to 900.
3. Add a second FICO range, 720-850. A loan now passes the FICO filter if it is in *either* band, so the count rises again, say to 2,100. It still has to satisfy the date filter.

The readiness switches combine the same way as a field: each switch you turn on is one more condition every loan in the segment must meet.

## What a filter compares against

For a field that describes the loan itself (Origination Date, Original Loan Amount, FICO Score, or a custom column from an Origination file), a filter reads the loan's value. For a field whose value changes month to month, such as Loan Status or Current Balance, a filter reads the loan's **most recent reported value**. A later snapshot that leaves the field blank does not clear an earlier known value. So "Loan Status is delinquent" means delinquent as of the loan's latest report, and "Current Balance over $250,000" means the latest balance. A note above these fields' controls says so.

## The controls, by field type

Each field offers the control that suits its type. Field types are set on the [Fields screen](/portfolio/fields/).

### Numeric fields: ranges

A numeric field shows a two-handle slider spanning the lowest to the highest value in your whole portfolio, with a box beside each handle for typing an exact bound.

- **Range** or **Exact.** Each row is either a range or a single exact value, chosen with a small toggle.
- **Add range.** Adds another row. Rows are alternatives (OR), so two rows let you carve out an exclusion: all balances except a middle band, say, as one range below the band and one above it.
- **Include missing.** Also includes loans that have no value at all for this field.
- Dragging a handle updates the numbers as you go and applies when you let go.

**A typed bound is taken as typed.** The boxes are for entering an exact number, not a second copy of the slider. Vintage never corrects a bound while you type it, and a bound outside the range your data happens to span is accepted as entered: it matches every loan or none. A typed bound applies once you finish it (leave the box or press Enter), so the count never reflects a half-typed number, and the count and table go on showing your last finished slice while you type. If a finished bound passes its partner (a minimum typed above the maximum), the partner moves to meet it rather than showing an error. Clearing a bound returns that side to no limit, and emptying the control entirely removes the field's filter.

### Date fields: month slider or calendar

A date range uses a **month-stepping slider** that snaps to whole months, the usual grain for cohorts, with **From** and **To** date boxes beneath it. Each box has a calendar button for picking a month; a picked month sets the lower bound to the first day of that month and the upper bound to the last. Choose **Exact** for a single date. You can type or pick any past date, including one earlier than your data begins. Dates after today are not offered: the calendar stops at the current month, and a later typed date is pulled back to today.

### Range controls show where your loans are

Above a numeric or date slider, a small **distribution sketch** draws equal-width bars across the field's whole range, aligned to the slider's track, so you can see where loans cluster and slide a handle to the edge of a cluster you can see. Bars inside your selection are drawn more strongly and bars outside it fade back as you move the handles. The sketch always describes the **whole portfolio**, not your current slice, so it stays still as you narrow the segment. A field with no values, or with every value the same, has no sketch. The sketch is a reading aid only; it has no axes or labels and cannot be clicked.

### Categorical fields: a value checklist

A categorical field (a status, a product code, a branch, any yes/no flag) shows its values, each with the number of loans carrying it, as a checklist.

- The checklist is an **allow-list**: checked values are the ones kept. There is no separate include/exclude switch.
- **Select all** and **Select none** act on the values matching the checklist's own search box. The count of checked values shows beside them.
- **Include blank / missing** also keeps loans with no value for the field.
- While you search, values you have already checked but that the search does not match stay visible under **Enabled Values**, below the **Search Results**, so a checked value never hides.
- Unchecking everything removes the field's filter.

**Fields with many distinct values.** A field with more distinct values than the checklist holds (the top 200 by loan count) says so: "Showing top 200 of 3,412 values. Search to find the rest." Searching it looks across every distinct value in your portfolio, not only the ones on screen. **Select all** then selects exactly every matching value; when the matching set is too large to select safely, it asks you to narrow your search first rather than quietly applying part of the list.

### Text fields: operators

A free-text field offers an operator, a value, and a **Case sensitive** switch. The operators are **Contains**, **Equals**, **Starts with**, **Ends with**, **Does not contain**, **Matches regex**, **Is blank**, and **Is not blank**. The last two need no value. Clearing the value for any other operator removes the field's filter.

**Matches regex** takes a regular expression, a small pattern language for text (for example `^ACME-\d+$`: starts with "ACME-", then digits, then ends). Use basic POSIX syntax. The pattern is checked as you type: it can be up to 200 characters, and named groups, backreferences, and `\p` property escapes are not supported. A pattern Vintage cannot run is refused, never quietly dropped, because dropping it would silently widen your slice to the whole portfolio while the panel still showed the filter.

## The readiness switches

At the foot of the field list, under **Readiness**, four switches narrow the segment by what each loan can support:

| Switch | Keeps only loans that |
|---|---|
| **Credit-loss ready** | are ready for the credit-loss measure |
| **Payoff ready** | are ready for payoff detection |
| **Prepayment ready** | are ready for the partial-prepayment measure |
| **Has transactions** | have at least one transaction of any kind |

They live inside the segment, so one object describes the whole view. What "ready" means is defined on [Reviewing before you finalize](/uploading/reviewing-before-you-finalize/).

## Which fields you can filter on

The panel lists **state** fields: values a loan carries at a point in time.

- Origination facts: Origination Date, Original Loan Amount, Term (Months), Maturity Date, Interest Rate, FICO Score.
- Current standing: Current Balance, Loan Status, Scheduled Payment Amount.
- Closure facts: Closure Reason, Closed Date, Closed Snapshot Month.
- Every custom field your Origination or Snapshot files have produced.

Fields that record **activity**, meaning amounts or flags describing what happened in one month or one ledger event (charge-offs, recoveries, payoffs, prepayments, principal flows), are deliberately not offered. A filter reads a loan's most recent value, and "the most recent month's charge-off amount" is not a meaningful question; on books that report activity in a transaction ledger, the panel would also have had to show fully uploaded data as absent. Activity still drives the Modeling screen in full. Custom fields carried only on Transaction files cannot be filtered on today either; **Has transactions** is the one transaction fact a segment can use.

If a field you had filtered on is no longer offered (it was removed or its type changed), its filter is quietly dropped. It never goes on constraining the loan list or the count out of sight.

### How the list is arranged

Fields your portfolio **has data for** come first, in alphabetical order. Below them, a separate **Unavailable Fields** group holds fields that were mapped in an upload but have no values yet, introduced as "Mapped in your uploads, but no values yet." Under each field's name is its coverage: how many loans in the whole portfolio have a value for it.

Turning a filter on does not move its field, so an active filter never jumps out of view. A field with an active filter is marked, is open by default so its constraint is visible at a glance, and carries a button to clear it. Searching the field list shows matches under **Search Results**, with any filtered field the search does not match listed below under **Enabled Fields**, so a live filter never disappears from view while you search.

## The numbers behind the controls

Every control is built from measurements of the **whole portfolio**: a slider's span, a checklist's values and counts, each field's coverage. They are fixed while you filter, so the controls never shift under you as the segment narrows.

Those measurements are taken after an upload's loans have been added to your portfolio, not at the same moment. Until they exist, the panel cannot be built, so Vintage does not hand you a portfolio whose measurements are still being taken: the same wait that covers processing the loans covers this last step, and it says so plainly ("Finishing up"). The "your portfolio is ready" email waits for the same moment.

One exception follows from the Portfolio screen's rule that a later upload never blanks a list you are already reading. If you have already been shown a complete portfolio and a new upload lands, the panel stays usable while the new measurements are taken, and says so instead of reporting numbers it has not taken: each field reads **Coverage is updating…**, nothing is filed under Unavailable Fields on the strength of a count that has not happened, and a single notice explains that field statistics are still updating. A count Vintage has not taken is never shown as a finding of zero.

## The live count

The **N of M loans** line updates as you change the segment. `M` is always every loan in the portfolio, never the previous slice.

When a count cannot be taken, the panel keeps the last count it did take, marks it as not current, offers **Retry**, and says which of two things happened:

- **"Counting took too long. Try narrowing the segment."** Your slice ran out of time. Narrowing it is advice you can act on. The limit is elapsed time, not a property of the segment, so Vintage retries once quietly before showing this, and the same slice often succeeds a moment later.
- **"Could not update the count."** Anything else went wrong, including the whole-portfolio total. There is nothing for you to change; retry.

## Your segment is remembered

Your segment saves itself to your account as you edit it, and is restored when you come back, including on a different device. There is no Save button. Each person has their own segment in each organization: yours and a colleague's never collide, and switching organizations switches to your segment in that one.

It is your working slice, not a named or shareable report. You cannot name a segment, keep several, or send one to a colleague. A link to the Portfolio screen carries your search and sort but not your segment.

## The same segment drives Modeling

The Modeling screen shows the same panel and reads the same saved segment, so you can refine the cohort on either screen and the other agrees.

**Tip:** A segment is modeled up to a maximum number of loans, set for your organization by how many months of history your data spans. Past it, the Modeling screen says the segment is too large and names your organization's maximum. Watch the live count here while you narrow, and you can steer under the maximum rather than hit it blind. See [The Modeling screen](/modeling/the-modeling-screen/).

## Related

- [The Portfolio screen](/portfolio/the-portfolio-screen/)
- [Fields](/portfolio/fields/)
- [The Modeling screen](/modeling/the-modeling-screen/)
- [Vintage analysis](/concepts/vintage-analysis/)
- [Reviewing before you finalize](/uploading/reviewing-before-you-finalize/)
- [Limits](/reference/limits/)