Newsvendor model

The newsvendor (or newsboy or single-period or salvageable) model is a mathematical model in operations management and applied economics used to determine optimal inventory levels. It is (typically) characterized by fixed prices and uncertain demand for a perishable product. If the inventory level is formula_1, each unit of demand above formula_1 is lost in potential sales. This model is also known as the "newsvendor problem" or "newsboy problem" by analogy with the situation faced by a newspaper vendor who must decide how many copies of the day's paper to stock in the face of uncertain demand and knowing that unsold copies will be worthless at the end of the day.
History.
The mathematical problem appears to date from 1888 where Edgeworth used the central limit theorem to determine the optimal cash reserves to satisfy random withdrawals from depositors. 
According to Chen, Cheng, Choi and Wang (2016), the term "newsboy" was first mentioned in an example of the Morse and Kimball (1951)'s book. The modern formulation relates to a paper in "Econometrica" by Kenneth Arrow, T. Harris, and Jacob Marshak.
More recent research on the classic newsvendor problem in particular focused on behavioral aspects: when trying to solve the problem in messy real-world contexts, to what extent do decision makers systematically vary from the optimum? Experimental and empirical research has shown that decision makers tend to be biased towards ordering too close to the expected demand (pull-to-center effect) and too close to the realisation from the previous period (demand chasing).
Profit function and the critical fractile formula.
The standard newsvendor profit function is
where formula_4 is a random variable with probability distribution formula_5 representing demand, each unit is sold for price formula_6 and purchased for price formula_7, formula_1 is the number of units stocked, and formula_9 is the expectation operator. The solution to the optimal stocking quantity of the newsvendor which maximizes expected profit is:
where formula_10 denotes the generalized inverse cumulative distribution function of formula_4.
Intuitively, this ratio, referred to as the critical fractile, balances the cost of being understocked (a lost sale worth formula_12) and the total costs of being either overstocked or understocked (where the cost of being overstocked is the inventory cost, or formula_7 so total cost is simply formula_6).
The critical fractile formula is known as Littlewood's rule in the yield management literature.
Numerical examples.
In the following cases, assume that the retail price, formula_6, is $7 per unit and the purchase price is formula_7, is $5 per unit. This gives a critical fractile of formula_17
Uniform distribution.
Let demand, formula_4, follow a uniform distribution (continuous) between formula_19 and formula_20.
Therefore, optimal inventory level is approximately 59 units.
Normal distribution.
Let demand, formula_4, follow a normal distribution with a mean, formula_23, demand of 50 and a standard deviation, formula_24, of 20.
Therefore, optimal inventory level is approximately 39 units.
Lognormal distribution.
Let demand, formula_4, follow a lognormal distribution with a mean demand of 50, formula_23, and a standard deviation, formula_24, of 0.2.
Therefore, optimal inventory level is approximately 45 units.
Extreme situation.
If formula_30 (i.e. the retail price is less than the purchase price), the numerator becomes negative. In this situation, it isn't worth keeping any items in the inventory.
Derivation of optimal inventory level.
To derive the critical fractile formula, start with formula_31 and condition on the event formula_32:
Now use
where formula_35. The denominator of this expression is formula_36, so now we can write:
So formula_38
Take the derivative with respect to formula_1:
Now optimize: formula_41
Technically, we should also check for convexity: formula_42
Since formula_5 is monotone non-decreasing, this second derivative is always non-positive, so the critical point determined above is a global maximum.
Alternative formulation.
The problem above is cast as one of maximizing profit, although it can be cast slightly differently, with the same result. If the demand D exceeds the provided quantity q, then an opportunity cost of formula_44 represents lost revenue not realized because of a shortage of inventory. On the other hand, if formula_45, then (because the items being sold are perishable), there is an overage cost of formula_46. This problem can also be posed as one of minimizing the expectation of the sum of the opportunity cost and the overage cost, keeping in mind that only one of these is ever incurred for any particular realization of formula_4. The derivation of this is as follows:
The derivative of this expression, with respect to formula_1, is
This is obviously the negative of the derivative arrived at above, and this is a minimization instead of a maximization formulation, so the critical point will be the same.
Cost based optimization of inventory level.
Assume that the 'newsvendor' is in fact a small company that wants to produce goods to an uncertain market. In this more general situation the cost function of the newsvendor (company) can be formulated in the following manner:
where the individual parameters are the following:
In formula_63, the "first order loss function" formula_64 captures the expected shortage quantity; its complement, formula_65, denotes the expected product quantity in stock at the end of the period.
On the basis of this cost function the determination of the optimal inventory level is a minimization problem. So in the long run the amount of cost-optimal end-product can be calculated on the basis of the following relation:
Data-driven models.
There are several data-driven models for the newsvendor problem. Among them, a deep learning model provides quite stable results in any kind of non-noisy or volatile data. More details can be found in a blog explained the model.