# Methodology: Cover & Reorder Check

Sales are the last 12 weeks by SKU and location. Stock is a snapshot as of the run date (`--as-of`). Lead times come from PO lines received in the last 12-18 months. Every figure on the Location_Results and SKU_Summary tabs is a live formula; `analyze.py` computes the same numbers in Python for the memo.

## Lead time per SKU (SKU_Summary, Purchase_Orders)

```
PO lead time (weeks)    = (receipt date - order date) / 7          (received lines only)
Actual lead time        = average of PO lead times for the SKU
Lead time spread        = standard deviation of PO lead times (needs 2+ POs)
Lead time used          = actual, if received POs >= minimum (default 3)
                          else the lead time in your system (SKU_Master)
                          else your profile answer
Spread used             = actual spread if PO history is used, else 0
Gap                     = actual - system lead time               (shown whenever both exist)
Lead time to a location = lead time used + warehouse-to-Amazon weeks for FBA and AWD locations
```

## Demand per location (Location_Results)

```
Weeks with data         = weeks with a number (leading blanks before a launch are skipped; zeros count)
Weeks in stock          = weeks with data - days out of stock / 7   (at least 1)
Weekly demand           = units in those weeks / weeks in stock     (stockout-corrected)
Demand spread           = standard deviation of the weekly units
Demand shift            = average of the last 4 weeks / 12-week average - 1   (flag only; needs 8+ weeks)
```

## Safety stock, reorder point, order-up-to

```
z                       = from the service level you chose: 90% 1.28 · 95% 1.64 · 97.5% 1.96 · 99% 2.33
Safety stock            = z x sqrt( lead time x demand spread^2 + weekly demand^2 x lead time spread^2 )
Reorder point           = weekly demand x lead time + safety stock
Order-up-to level       = reorder point + weekly demand x weeks between orders
```

The safety stock formula covers both sources of uncertainty: demand swinging week to week while you wait, and the supplier taking longer or shorter than average.

## Stock position and arrival

```
Reserve stock           = on hand + inbound at locations whose 'Feeds location' is this one (e.g. AWD -> FBA)
Open PO units           = open PO lines landing here (a PO to AWD counts toward the FBA location it feeds)
                          + a demand-weighted share of open POs with no destination
Stock position          = on hand + inbound + reserve stock + open PO units
Weeks of cover, on hand = on hand / weekly demand                   (999 = stock but no sales)
Weeks of cover, total   = stock position / weekly demand
Next own stock arrives  = earliest of: inbound expected date (default weeks if blank),
                          reserve stock (warehouse-to-Amazon weeks), open PO expected date
                          (or order date + lead time; + warehouse-to-Amazon weeks if it lands at AWD)
                          If nothing is on the way: the lead time (a PO placed today)
```

Overdue open POs (expected date passed) are treated as arriving now and listed on the Summary.

## Spare stock and transfers

```
Spare units             = 0 at FBA and AWD (stock is not moved out of Amazon)
                          on hand, if the location sold nothing in 12 weeks
                          otherwise the smaller of: on hand - weekly demand x weeks until its own next stock,
                          and stock position - order-up-to level  (never below 0)
Spare elsewhere         = spare units of the same SKU at the other locations
Transfer arrives in     = warehouse-to-Amazon weeks for FBA / AWD; the inbound default for other locations
Bridge                  = spare elsewhere >= smallest transfer, AND the transfer arrives before stock runs out,
                          AND on hand + spare elsewhere lasts until the location's own next stock
```

The Transfers tab (as run, not live) gives each short location stock from the locations with the most spare units, largest shortage first, skipping moves smaller than the minimum transfer.

## Status rules (applied in order; the first that fits decides)

1. 'Feeds location' filled → **Reserve** (counted toward the location it feeds)
2. No sales in 12 weeks → **No sales, stock held** if there is stock or inbound, else **Inactive**
3. Weeks of cover on hand < weeks until own next stock, and no transfer can bridge the gap → **Stockout risk**
4. Stock position < reorder point → **Reorder now**
5. Weeks of cover (total) > your overstock limit and stock position > order-up-to level → **Overstock**
6. Otherwise → **Healthy**

| Status | Units shown | Action |
|---|---|---|
| Stockout risk | Units short of the order-up-to level | Expedite what's on order, or order now if nothing is on the way; move spare stock in first if there is any |
| Reorder now | Units short of the order-up-to level | Move spare stock in first if there is any, then order the rest |
| Overstock | Excess = stock position - order-up-to level | Move to locations that are short (or redirect open POs); otherwise pause reorders and push out open POs |
| No sales, stock held | Excess = on hand + inbound | Move to locations that are short, or clear |

Excess at cost = excess units x landed cost. Cost of holding it = excess at cost x carrying rate (cost of money + holding %).

## Network view (SKU_Summary)

```
Network stock position  = on hand + inbound at every location + all open PO units
Network reorder point   = sum of the locations' reorder points
Network order-up-to     = sum of the locations' order-up-to levels
Suggested supplier order = if network position < network reorder point:
                             max( network order-up-to - network position, MOQ ), rounded up
                           else 0
Worst status            = Stockout risk > Reorder now > Overstock > No sales, stock held > Healthy
```

A SKU can be short at FBA and fine across the network: then the fix is a transfer or redirecting an open PO, not a new PO.

## How the brand's answers change parameters

| Answer | Effect |
|---|---|
| Service level 90 / 95 / 97.5 / 99% | z = 1.28 / 1.64 / 1.96 / 2.33 in the safety stock formula |
| Weeks between POs | Order-up-to level = reorder point + this many weeks of demand |
| Overstock limit (weeks) | Above it (and above the order-up-to level) a location is Overstock |
| Typical lead time | Used only for SKUs with too few received POs and no system lead time |
| Warehouse-to-Amazon weeks | Added to lead time for FBA and AWD; time for reserve stock and transfers to reach FBA |
| Cost of money | Added to the holding % to cost the excess stock |

Template assumptions (editable on the Assumptions tab): minimum received POs to trust history (3), weeks assumed for inbound with no date (2), demand shift flag (30%), smallest transfer worth suggesting (50 units), holding % (15%).

## Glossary

- **Weeks of cover**: how many weeks stock lasts at the current weekly rate.
- **Lead time**: PO placed to stock received and sellable.
- **Safety stock**: the buffer held for demand and lead time swings, sized to the service level you chose.
- **Service level**: the share of lead times you expect to get through without running out.
- **Reorder point**: the stock position at which to order, so the next delivery lands before the safety stock is used up.
- **Order-up-to level**: reorder point plus one order cycle of demand; how high an order should bring the stock position.
- **Stock position**: on hand plus everything on the way (inbound, reserve stock feeding the location, open POs).
- **Reserve stock**: stock held where it can't sell, such as AWD, that replenishes a selling location.
