Models of demand curves — linear model
In the real world, the demand curves - functions of the number of pieces sold from the price, depend on so many factors that it is impossible to describe them analytically.
Nevertheless, considering some simple theoretical models of demand is very useful in the context of estimating measurement errors, the potential profitability of implementing dynamic valuation and building the intuition related to this topic. Analytical models have one more advantage, they can be parameterized, which in turn allows to see dependencies that would not be easy to detect among raw measurement data.
Therefore, this entry will be devoted to presenting a few simple models of demand curves and discussing them in the context of price optimization.
Demand models:
- Linear [s =-|α|p+β]
- Exponential [s =αe^-βp]
- Rational [s =1/(α+p^β)]
- Inelastic [s =αθ(β-p)]
In the given formulas, `s` means the sales speed,`p` is the price, α and β are the parameters of the model, and θ the stepped Haviside function (takes 0 for negative arguments, 0.5 in zero and 1 for positive arguments).
In each case, the goal is to find the speed of earning, i.e. the product of the speed of sales and the margin (we will mark it by `g`) and determine how its maximum depends on the given parameters.
Before we get to that, we will introduce two more parameters: `p_0` which is the price of production or purchase from the warehouse, and` m` the margin equal to `p-p_0`.
Linear model

The blue line presented on the chart presents sales. We see that it decreases with the price increase, it is a rational assumption for many products. The vertical red line is the price below which the sale does not pay off. On the left side of the red line, we see a decrease in profits marked orange below zero. It can be seen that, on the one hand, with such a model, raising the price to the maximum as well as lowering it to around zero margin are bad tactics. In this case, it’s better to find a gold measure that is equal between the zero point of sale and the zero margin, specifically where the green graph or profit derivative reaches zero value.
An interesting question is how the algorithm to determine the optimal price would cope in this case. In order to investigate this, we assume that the purchase has a Poisson distribution. We will also reasonably assume that the seller has some idea of a reasonable price and set it at 0.4 or two times the wholesale price. We assume that both the seller and the algorithm do not know the parameters of the demand curve. The task of the algorithm is to examine the demand curve while changing the price to the optimal one. For a unit of time, we take the time in which 60 pieces of goods have been sold so far. Thanks to this, we obtain a reasonable compromise between the reduction of measurement errors and the speed of reaching the best price.
Let’s see how the algorithm coped with this task.

We started with a price of 0.4. Not knowing anything about supply at other price levels, the algorithm began with testing the level of 0.3. Noticing very poor sales, he made a correction and brought the price of 0.42. Here the result was unexpectedly good, because as a result of measurement error suddenly more people bought than usual. The price soared to 0.75, which again translated into a drop in sales. It is worth noting, however, that it is still better than at the initial price. The next hit in 0.6 gave record profits, after which the algorithm started to research only points from the price range from 0.55 to 0.62, not going further into more risky price levels. Of course, further selling at these extreme prices would yield more accurate data, but would involve an opportunity cost of not getting the maximum profit.
With the assumed parameters, the profit per unit of time when selling at the initial price of 0.4 was 0.12, after raising the price to 0.6 increased to 0.16, the average profit during the price optimization process (12 time units) was 0.136, and if we finished optimization at the last price we tested, then the average profit would be 0.158. Below is a graph that shows how the profit during the price optimization process behaved.

Summing up in the example in the test data we showed how using the algorithm for dynamic price optimization, you can increase your profit by 31%. This result was obtained by selling the same product in the same remaining terms. The only difference was that at first the price was determined intuitively, and finally based on the results of measurements.
Although the sale lasted so much time that 720 units would be sold without changing the price, and only 533 items were sold during the optimization process, hence the sales dropped by 26%, while the margin increased by 78%, which in turn allowed it to raise profits by 31%. Sometimes it pays off the reverse action, that is, lowering the price and increasing sales, it depends on which side of the optimum we start.
In the next article, we discuss the exponential model, in which it is exciting that there is no upper price limit above which no one would ever buy.
