Dynamic pricing using wavelet neural network under uncertain demands

Dynamic pricing is a kind of pricing strategy in which the price of products varies based on present demand value. So far, several research works have been reported for using neural network for pricing, such as predicting demand and modeling the customer's choices. However, less work has been performed on using them for optimizing pricing policies. In this project, we try to explain the way of combining neural network and evolutionary algorithms to optimize pricing policies. We create a neural network on the basis of demand model and benefit from evolutionary algorithms for optimizing the resulted model. This has got two privileges: First, necessary flexibilities are created by using neural network to model different demand scenarios that is occurred with different products and services, and second, using evolutionary algorithms provides us with the ability of solving complicated models. Wavelet neural network has been used and the resulted pricing policy has been compared with other demand models that are widely used. The results show that the suggested model match up well under different scenarios and presents a better pricing policy than other suggested models.


Introduction
Dynamic pricing is a kind of pricing in which the price of products varies based on present demand value to increase revenue as time passes (den Boer, 2015).Using dynamic pricing strategies have got a growing trend in retails and other industries during recent years (Coy, 2000).Determining the right price for a commodity and a customer is a complicated process and, in addition to having information about their own operational expenses and about their providers, sellers must know how much the intended commodity costs for the customer at present and how the demand would be for the commodity in future.So for determining the right price, the seller must be fully aware about his or her customers and determines prices with the last expenses (Özer & Phillips, 2012).Sellers had a limited information about the real needs and taste of their customers in the past and faced with high expenses to determine prices.As a result companies determined a fixed price for a long time, which means the pricing strategy was fixed and static, we may name the reasons for using fixed price as: (1) lack of accurate information about demand, (2) high expenses for changing prices and also the price of systems and software were high for dynamic pricing.But today, it is easier to get information about the customers' preferences by progressing technology and the internet especially.The dynamic pricing strategies have got a lot of applications in net shops because it is easy to change prices in the internet, however changing prices in traditional shops are costly but these expenses could be reduced by using new technologies such as Electronic Shelf Labeling Systems (Southwell, 2002).
Digital sales environment generally provides fields that plenty of sales data are available.Probably these data involve important information on customers' behavior such as how the customers react towards different prices.Availing information of these data and imposing them in the dynamic pricing policies lead to a competitive advantage, knowing how to perform these policies is an interesting subject for studies and researches.These studies are the main sources of research in dynamic pricing.The problem of dynamic optimal pricing in an uncertain environment is that characteristics of customers' behavior are identifiable from sales collection data.Studies regarding the dynamic pricing has grown rapidly in different fields including operational research, management sciences, marketing, and computer sciences.
With the passage of time, companies have taken great steps in knowing and dynamism of providing chain.This has been in both fields of internal operation and their relations with the providing chain companies.In discussion of internal operations many of the companies have exploited good equipment and production means and out of the organization, they strongly follow the innovations of the providing chain such as electronic ordering, joint planning, sales prediction and production replacement.In dynamic pricing the salesperson attempts to change prices during the sales period.Industries like air industries, hotel and etc. were pioneers in using dynamic pricing, due to capacity changes problems in short-term and with the aim of regulating the demand and inventory (Netessine & Shumsky, 2002).
In most of these industries prices could be changed with a little or no expense, on the contrary, industries like retail in which inventory variation enjoys more flexibility in short-term or where price changes are expensive, the focus has been on improvement of inventory management practices.Retailers still incurred a lot of losses due to lost sales and excess inventory in spite of significant reduce of supply chains costs.Therefore, accurate study of market demand and using dynamic pricing policies were considered by organizations, companies and sales persons concluded that making decisions related to pricing and ordering integrally and dynamically will increase their revenue, significantly.

1.1.The existing uncertainty in the model
Most of the time researchers think that their models are real and their data are certain.Anyway, uncertainty is the innate part of the nature and prediction involves coincidental events that happen in future.Also the model system and relations among its members may not be shown accurately.For example when we consider the demand randomly, we can show the relationship between the demand and the price with a suitable approximation, but when we consider the demand certain, we acquire all effective factors on that accurately which is a hard job.Using statistical models and regression on previous data is one the ways for parameters evaluation.Hence, these methods presents us only an approximation of parameters.Also these conditions require to accept the fact that future takes place on the basis of the past and is affected by that, but in practice this fact is not always true.Consequently, considering uncertain variables is a way of solving these problems.
A common approach for uncertainty is to think parameters with a specific probability distribution and use stochastic optimization and dynamic programming but regarding to the above mentioned points, again it is not possible to obtain an exact distribution for parameters.In this research we use neural network for overcoming this problem (Arbib, 2003;Wasserman & Meyer-Arendt, 1990).So far, several research works have been reported on using neural network for dynamic pricing, such as demand forecasting and modeling customer choices (Brooks et al., 1999;Ghose & Tran, 2009;Hruschka et al., 2004;Liu & Wang, 2013).However less has been done about using them for optimizing pricing policies.Opposite to the traditional demand models, neural networks do not make any assumption on relations among different factors.Instead, from the data itself, they learn the functional form of the model.As a result, they can be used for modeling complicated relations that are not identifiable by human mind or computer techniques.This characteristic of neural networks makes them a good option for demand modeling in dynamic pricing.

1.2.Wavelet neural network
As the demand must be predicted in this research and assume that effective factor on the demand, is the product price, the price of product or services is considered as an input data during the last periods to predict the demand in next periods.We have used wavelet neural network with regard to the data type.Wavelets are a class of functions that is applied for parting a function in a place or scale.Wavelets are used for cases like signal processing and for analyzing time series.Wavelet forms the base of wavelet transforms which crushes functions data and or operators into different frequent subseries and then studies each subseries with its scale with suitable clarity.In the field of signal processing, wavelet transformation depends on two variables: scale (or frequency) and time (Burrus et al., 1997) There are two distinct kinds of wavelet transforms: continuous wavelet transform (CWT) and discrete wavelet transform (DWT).The first kind is a time frequency analysis method that offers very good time and frequency localization.The second kind is any wavelet transform for which the wavelets are discretely sampled (usually 0,1, … , 1, where N shows the number of time series amount).Discrete wavelet transformation (DWT) got an interesting quality that has made it useful for time series.Continuous wavelet transformation acts on a typical function or time series.From discrete wavelet transformation we can refer to Haar, Daubechies, symlet, and Coiflet wavelets (Addison, 2005).
Wavelet neural networks combines wavelets theory and neural networks.A wavelet neural network generally involves a backward propagation wavelet neural network with a hidden layer which its activation function has brought from an orthogonal wavelet family.One of applications of the wavelet neural network is the estimation of function.Having observed amount of series of a function, a wavelet network can be educated for learning how to make that function and consequently, can compute an expected amount for specific input (Veitch, 2005).

Dynamic pricing model
The dynamic pricing model introduced and used in this part is adopted from (Shakya et al., 2009).Factors used have been presented in following: : number of periods during planning period : any given period during planning period : number of production (sells) at period t : average price of a product at period t : cost production of one additional product at period t Π: total profit obtained The total profit obtained (Π) out of one product during the whole planning period can be modeled as follow: where, is the total sell (or product) of the productions during t period (that is equal or smaller than demand for the product), is equal to the total revenue obtained during t period and is the cost variable in t period.Now we define a few constraints that a production or trade unit needs to consider when defining the price policy for intended product (service).Two most commons limitations are presented as follow: A-Capacity constraints: is equal to the number of productions that can be produced in an intended period and consider sources can be used such as the number of workers on machineries in producing the intended product.Capacity has got the higher or lower limit.For all periods we have got 1, … , -Lower limit for capacity limitation -Upper limit for capacity limitation (2) B-Price constraints: in an intended period it is related to the price of the produced commodity.The price of the product cannot move upper or lower than specific amount.For all periods we have got 1, … , -Lower limit for price capacity -Upper limit for price capacity (3) As mentioned before, there is another important factor for dynamic pricing, and that is the demand model which models the interaction between different factors on demand.The most important factor which affects on the demand model is the price of the product.More accurately, in a period the demand for a product, is related either to the price of that product in that period or to the price of that product in the other periods of the planning horizon.As a result the demand in each period of t can be written as a function of prices of all periods as follow: where, 0 is the demand function at period .Related to the different scenarios, 0 can have different functional forms.In the next part we talk in details on this matter.
By replacing from Eq. (4) into Eq.( 1), we can compute the profit as a function out of the price as following: As a result, for dynamic pricing, general modeling can be written as follow: The aim of finding optimal pricing policy of , , … , in this model is like that the profit (Π) can be maximized and the constraints as satisfied.

Model of demand
0 can take shape into different function depending on the given assumptions about relation between price and demand.In following we have presented three of the most functional models of demand (price).

Linear model
In optimizing the price, linear model is the most famous model of demand.These models assume the price as a line related to the production.General form of this model for all periods 1, … , can be written as follow: where is a function that shows the customers' whole tendency towards buying that specific product at period and are the slopes parameters which shows the impact of the price at time have on the demand at period .Consider that is negative in general because for a product, a higher price in a period probably cause a lower demand for the product in that period.
Of Eq. ( 6) and Eq. ( 7) we get a dynamic pricing equation as an optimizing problem with a linear demand model:

Exponential model
This model assumes that the relation between the price and the demand is exponential.This model is much like the linear model and for all periods of 1, … , can be written as follow: where, and are parameters alike linear model that indicate the impact of the price on the production.From Eq. ( 6) and Eq. ( 9) we get dynamic pricing equation as optimizing problem with an exponential demand model: 1,2, … , . (10)

Multinomial logit model
Multinomial logit model is one of the most famous demand models that has been used in different studies.It can effectively model the customer's choice, this is the reason behind its popularity, in other words, by having the price of all periods it gives clear estimate of customer's possible choice for buying specific product in an intended period (Talluri & Van Ryzin, 2006).This capability lets the customer have additional information.For all periods of 1, … , this model can be written as follow: where, is the customer's base and are parameters which show the price impact on demand at time .From Eq. ( 11), a multinomial probability can be cut out as follow: By having the price of a product in all periods, this is an equation that gives us the possible customer's choice for buying the intended product in period t.
From Eq. ( 6) and Eq. ( 11), a dynamic pricing equation as an optimizing problem with multinomial logit demand model is acquired as follow:

Estimating parameters of the demand model
Model parameters should be given for solving dynamic pricing optimization problems.These data have been presented earlier by the market experts sometimes.However, most of these parameters are not known and must be estimated.This estimation is performed by using the product's price-demand data.
In other words, by having the data on previous prices and related sells, in relation with these the demand model will be acquired so that the model parameters could be estimated.Then these estimated amounts are used for optimizing the price.For example in case of linear model (7) or exponential model ( 9) we can use linear regression or in case of multinomial logit, a nonlinear curve can be used.Then estimated parameters of the model can be used as an input for solving optimization problem of Eq. ( 8), Eq. ( 10) or Eq. ( 13), to get the maximized profit from pricing policies.

Neural network demand models
All three models described before require some assumptions such as linearity or non-linearity of the data.However in real world problems, there is not such an assumptions and probably, the model does not show the distribution of the data properly.Optimal pricing policy will find a low quality solution with such a demand model.
In this paper, neural networks has been used as the demand model for optimizing pricing policies.The reason behind such a use is that the neural networks do not make any assumption for data.Instead, try to learn the functional form from the data itself (Kong, 2004).Here we try to explain how to use neural network for modeling demand-price relationship.A neural network is defined with its topology and its weights.Network topology is a series of nodes and manes that connect them together.These nodes are placed into different layers where each layer contains one or more nodes.The network weights show the strength of each of connections.For the network used in this research, each neural network consists of N entering nodes where these nodes are the prices entry and there is a node in the output layer that shows the amount of production (or demand).Neural networks are in different kinds and can be used under various conditions.In this study, with regards to the uncertainty of demands, we try to determine future demand from the last prices and their relationships with the rate of production (as we said before) based on the wavelet transform.Neural network used in this research is loose wavelet neural network (LWNN).This method, decomposes original time series into a set of wavelet coefficients by using discrete wavelet transforms preprocessing tools, then reconstruct these coefficients into the time subseries.In the prediction modules, this model uses the conversional BP neural networks to predict the decomposed subseries (Mohammadi, 2006).Fig. 1 shows the structure of this neural network.

Evolutionary algorithm for solving dynamic pricing
As we mentioned before, demand models presented in Section 3 are widely used for optimizing pricing policies in which usually optimizing done by numerical techniques like mathematical programming, for example, the optimization problem with linear demand model defined in the Eq. ( 8) and also exponential model in the Eq. ( 10) can be considered as a constrained quadratic optimization problem and can be solved by using a quadratic programming technique.Also, the optimization problem with a multinomial logit demand defined in the Eq. ( 13) can be considered as a constrained nonlinear optimization problem and can be solved by a nonlinear programming technique.However, an optimization problem with a neural network may not be solved by mathematical planning.Let us explain the use of neural network for a dynamic pricing with more details.Some works have been done on using neural network for forecasting the demand or modeling the customer's choice.Notwithstanding this has not been done for optimizing pricing policy.This matter can bear several reasons.Firstly, neural network has formed in fields related to artificial intelligence community, while dynamic pricing is related to the field of operation research.Secondly, mathematical programming techniques have been used traditionally for optimizing pricing, for complication related to finding gradient information, probably cannot present a good response in Eq. ( 19).These reasons cause mathematical programming not a proper choice for solving the problem of pricing optimization on the basis of neural network.Eventually, the result obtained along with mathematical programming probably is a local solution to the problem and is not a global optimal solution.For solving the neural network based pricing optimization problem, we have used evolutionary algorithms (Ramezani et al., 2011;Shakya et al., 2009) in this paper, because they do not need gradient information in one hand, and on the other they have the ability to search over a large space of possible answers and consequently they present a closer answer to the global optimal solution.These characteristics of evolutionary algorithms, make them a proper choice for solving dynamic pricing on the basis of neural network.Meanwhile one can use them for solving the problem of dynamic pricing on the basis of other traditional demand models which is presented in Eq. ( 8), Eq. ( 10), and Eq. ( 13).In following we show the way of using evolutionary algorithms to optimize pricing policies with wavelet neural network demand model used in this paper.

EA strategies
Usually an evolutionary algorithm starts its work by creating a population of solutions randomly.In our example these population of solutions are the pricing policies.Each pricing policy is evaluated by passing the prices from policies to the neural network because total profit is derived in this way.A collection of nice policies out of chosen answers are used for creating a population of new solutions (which are known as a population of children).Various evolutionary algorithms use different techniques for creating new pricing policies from chosen set.For example, genetic algorithm (Horn, Nafpliotis & Goldberg, 1994), which is a famous EA and used in this research, uses crossover and mutation for creating next generation.Crossover operator chooses two answers from the best pricing policies and interchanges some of the pricing among them.The aim of doing this is to combine good answers and final better answer.Similarly, mutation operator also does some changes in some parts of the answer.The aim is to search unexplored part of the search space, created children are replaced with parents, and operators of mutation and crossover is exercised on this collection.This process continues until the algorithm repeated to specific number of iteration or has reached a plateau such that successive iterations no longer produce better results.

Results
The aim of our research is to compare pricing policies derived from wavelet neural network on the basis of dynamic pricing with the policies obtained by the three other demand models.For this, a large number of data sets has been created, then all the four demand models have used these data to estimate the model parameters.These parameters are given as an input to the optimization problem.Afterwards, the optimization problem has been solved with the genetic algorithm.Since the aim of this study is to compare the demand models performance, we only report the results obtained with GA.Each time the optimization problem has been solved, all pricing policies obtained from the four models have been recorded and compared with the pricing policy found by the original model from which the data was generated (linear, exponential, multinomial logit).We use the root mean square error (RMSE) given in Eq. ( 14) as a comparison to compare the closeness of the answers with those found by original model.
where K is the number of data sample.In this paper we are looking for weekly dynamic pricing problem, meaning that we place 7 the total number of periods in planning horizon and assume that dynamic pricing problem must determine production price for the next week by looking for the demand-price data for the past 60 weeks.Three models of linear, exponential, and multinomial logit have been used for generating demand-price data.For each model, we chose a different parameter set and for each parameter set, we created five different collection data of price and demand.Each data set consists 60 pricing policy and related sales.Total data set produced for one model is 5.As a result, total of 3 5 15 data set have been produced for 3 different models.
Dataset has generated due to following procedure: 1. Generating 60 pricing policies randomly that shows the policy during recent 60 weeks.2. Estimating the related production (or demand) by using three models of linear, exponential and logit.3.By doing this, we acquire dataset consist of prices and productions (demand) related to that, for recent 60 weeks.We consider this dataset as an original and reference for evaluating the results.
We have taken the following steps in order to test the performance of the demand models.
At first, the optimization problem with the original parameter set which has used the original model (that was explained through three steps) were solved by GA.The obtained pricing policy has been considered as the best policy for that data set.Then demand parameter has been acquired with each of the four models for 15 samples.Each time that parameters are estimated, they are considered as an input for the optimization problem and optimal pricing policy has been found for them by using genetic algorithm.Between these pricing policies and the best pricing policy, RMSE is an indicator of competitive performance between this model and the rate of closeness with the amount of optimal.

Conclusion
We have shown in this paper how one is able to use the wavelet neural network for optimizing pricing policies.We have created a neural network on the basis of demand model and determined how we could fit that on the demand-price historical data to obtain its parameters.Afterwards we have used neural network demand model for formulating dynamic pricing problem.We have also shown that by using evolutionary algorithms, we can optimize pricing policy with neural network demand model.Several numerical examples were performed for comparing obtained pricing policy using wavelet neural network with that obtained by other widely used demand models and the results have shown that when the data source matches the model, other models had a good performance with the intended model but when the data source does not match the results, they showed a weak performance.On the contrary the wavelet neural network was the most consistent model on a vast range of generated data and gave closer results to the optimal answer in different scenarios.This result is important because in the real world, the amounts and parameters (including demand) are often unknown and uncertain.

Table 1
RMSE for each demand model.

Table 2
Grand average RMSE of all the models.