The Multiagent Model for Predicting the Behaviour and
Short-term Forecasting of Retail Prices of Petroleum Products
Leonid Galchynsky and Andriy Svydenko
Department of Management and Marketing, National Technical University of Ukraine,
“Ihor Sikorsky Kyiv Polytechnic Institute”, 37 Peremohy Av., Kyiv, Ukraine
Keywords: Multi-agent Models, Oligopolistic Market, Neuron Net, Retail Prices, Petroleum Products, Short–term
Forecasting.
Abstract: In this study, we develop a multi-agent system model for the purpose of predicting the behaviour of
petroleum product prices using short-term forecasting. Having analysed the issue, we found that the ability
of multi-agent models to describe the behaviour of individual market agents along with with the
oligopolistic nature of the market makes it possible to describe a long-term cooperation of agents. But
the accuracy of short-term price predictions for the multi-agent model is insufficient. According to our
hypothesis, this is caused primarily due to the nature of the agent’s heuristic algorithm as well as taking the
price indices as the sole input. The accuracy of the price forecast for the multi-agent model in the short term
is somewhat inferior to co-integration models and forecasting models based on neural networks that use
historical price data of petroleum products. In this paper we have studied a hybrid model containing a
certain set of agents, their price reaction is based on the neural network training process for each agent.
With this approach it is possible to consider not just the price data from the past, but also such factors as
potential threats and market destabilisation. Result comparison between the price obtained through our
short-term forecast model and real data shows the former’s advantage over pure multi-agent models, co-
integration models and over models forecasting based on neural networks.
1 INTRODUCTION
Assessment of the current situation and forecasting
price changes remains being a relevant theme in
market research. Previous studies made in recent
years regarding the petroleum product market in
different countries clearly show a significant margin
of error transience of price. High dependence on the
fuel market of the world oil market impact on retail
prices, and their volatility in recent years has a clear
upward trend. This all led to the existing situation, in
which forecasted retail prices show significant
deviations from the actual data.
Factor analysis has shown that the main sources
of market balance disturbances tend to be of external
nature, especially when it comes to prices of oil its
derivatives around the world and exchange rates.
However, based on the interpretation of Engle-
Granger, it has been proved that the price is fixed
depending on each particular combination of input
factors. This in turn permits using error correction
models to forecast retail prices. At the same time, it
is typical of the petroleum product market to
experience price hikes – sudden changes in retail
price of petroleum products due to shifts in external
factors.
Such price hikes are unpredictable, thus resulting
in destabilization of the petroleum product, which
then leads to negative consequences for the economy
and sometimes may even trigger social unrest. The
co-integration theory is not designated for such
cases; all the while it is effective in predicting the
trends of gasoline prices at times when the impact of
external factors is relatively small. The situation is
even more complicated by the oligopolistic nature of
the retail market. These two circumstances:
fluctuations in wholesale prices and the oligopolistic
nature of the market price give birth to an anomaly
known as price asymmetry. Thus creating the
necessity to not merely predict prices for a given
period, but to somehow anticipate fuel price hikes,
in an effort to control the situation. In this paper we
glance at the system of predicting and forecasting
prices of petroleum products, based on the factors
related to the data monitoring information system
632
Galchynsky, L. and Svydenko, A.
The Multiagent Model for Predicting the Behaviour and Short-term Forecasting of Retail Prices of Petroleum Products.
DOI: 10.5220/0006361706320637
In Proceedings of the 19th International Conference on Enterprise Information Systems (ICEIS 2017) - Volume 1, pages 632-637
ISBN: 978-989-758-247-9
Copyright © 2017 by SCITEPRESS Science and Technology Publications, Lda. All rights reserved
that could potentially be a threat, destabilizing the
market price for petroleum products.
2 RELATED WORKS
The theme of forecasting the price of petroleum
products is important for markets around the world.
In the past decades this topic was focused on by
many researchers in numerous countries around the
world (Lewis, 2003; Sadorsky, 2006; Perdiguero
García, 2010). In (Galczynski, 2014) have been
analyzed the comparative capabilities of different
statistical techniques and neural networks that use
historical data values of retail prices in terms of the
accuracy of short-term forecasting of the product oil
prices.
Many aspects of using the multi-agent approach
to competition in oligopolistic markets were studied
by (Tsvetovat and Carley, 2002; Happenstall et al.,
2004; Levin et al., 2009; Ramezani et al., 2011;
Galchynsky et al., 2011).
Also a number of studies focusing on using
neural networks for short-term forecasting of
commodity market prices have been conducted by
(Hinton et al., 2012), ( Wan. et al., 2013),( He et al.,
2015).
3 MODEL
Previous studies proved the possibility of
constructing agent-based models for the petroleum
product. However, having analyzed their use, a fair
number of deficiencies start to surface, such as the
lack of accurate short-term price forecasts. In our
opinion this is due to the heuristic nature of
describing agent behavior, which is linked to the
current retail prices.
Nonetheless, it is well known that the behavior
of market players, putting wholesale prices and price
competition aside, is affected by various economic
indicators of the network. At any given time period
the agent calculates a simplified set of economic
indicators: cost of sales per unit, current margin of
the retail network and where their own selling prices
stand compared to those of their competitors. In
addition to price indicators, an important factor in
making a decision to change prices for petroleum
products, thus resulting in market stress, is
additional non-price related information on various
threats that may appear on the market. For the
Ukrainian petroleum product these threats can be
grouped into the following classes:
changes in excise duty for manufacturing and
importing petroleum products;
changes in excise duty for retail sales of
petroleum products;
changes in petroleum prices;
significant fluctuations of petroleum product
prices in Europe and wholesale prices in
Ukraine;
rate hikes for rail transport and pipeline
transport;
changes in the legislative framework and/or
introduction of new taxes;
other threats that are potentially able to disrupt
the normal cycle of raw material supply.
Based on this list we can see that information
about threats can be obtained both through
numerical values, and via various textual
information reported by the media and other sources.
Depending on these groups of factors, one must first
predict price behavior, and only then should a
forecast be constructed.
Unlike previous agent-type models of the
petroleum product market, this model includes only
one type of agents - retail petrol station chains. The
model does not implement complex communication
mechanisms between agents, but the agents do share
information about their prices with other agents. The
only action that the agent is capable of is to change
the price.
Figure 1: Model Structure.
The agent’s behavior is based on results of the
calculation of the neural network. In every time
period the agent performs the following actions:
gathers information on prices of other agents;
receives information on wholesale prices and the
list of threats;
decides on a price change.
Figure 1 shows the structure of the object model,
in fact for the real market, in this case the Ukrainian
petroleum product this amounts to 6 agents. The
current number of networks is dictated primarily by
The Multiagent Model for Predicting the Behaviour and Short-term Forecasting of Retail Prices of Petroleum Products
633
the national character of their actions and
relationships with other agents. Other agents have an
insignificant market share, that being said, the
networks are led by market leaders. Therefore,
increasing the number of agents will simply lead to a
significant increase in complexity, without providing
any significant improvement in forecast accuracy.
Per contra one must note that agent-based models
should also directly or indirectly consider the other
party of the market relations – the consumers. In the
latter case, the impact of consumers is considered
indirectly, mainly due to the lack of reliable data on
the dynamics of fuel consumption by individual
market players.
One of the conditions for proper functioning of
the neural network the stationarity of the input and
output data. However, studies show that retail prices
in the petroleum product are far from stationary.
This makes it impossible to use absolute price value
for input prices of the neural network. Having
analyzed the growth of retail prices thus as seen in
Table 1 the increment of the retail price is of the
first order, hence allowing us price surges as inputs
for the neural network.
Table 1: Assessment of stationarity of the retail prices and
their increments.
Temporal series
Dickey-
Fuller
p-value
Retail prices for gasoline A-95 in
the period 2010-2014
2,211 0,49
Growth rate of retail gasoline
prices in the period 2010-2014
-7.921 0,01
It is also important to consider lags related to
purchasing and selling the products. If we ignore lag
compensation this will lead to inconsistencies
between the value of net costs relative to the that of
the selling price. To compensate for the lag in
calculating the margin, we use the following current
lag cost determination algorithm:
Choose date t
0
with a stable wholesale price
t = t
0
lag[t] = L_typ
while t < t_cur
lag[t] = f_LAG((t-lag[t-1])..t)
if lag[t] - lag[t-1] > 1
lag[t] = lag[t-1] + 1
t = t + 1
end
The following algorithm is used to determine lag,
calculated separately for each network at a certain
period of time using the formula below:

lagtt
typ
PP
a
LLAGf
100
;min_
where P
t-lag
– is the price at the beginning of the
period, P
t
– is the price at the end of the period, L
typ
– is the default lag value for stable market
conditions. Indicators a and γ are evaluated
separately for each of the agents on the , based on
the analysis of the price surges and behaviour of the
market entities.
The cost is not only used for calculating the
margin, but is also used in a rule that limits the
behavior of the network: the selling price cannot be
lower than the cost of production. Under standard
conditions this rule is practically never used, but at
times of significant volatility of incoming data it
generally minimizes risk of experiencing situations
with delay in model response for the surges of
inputted data.
All incoming threat-related information is
assigned not only a class, but also a threat rank,
which corresponds to the threat level for the market.
In this study we have identified the following threat
ranks:
-2 – a significant impact on the market towards a
drop in prices;
-1 – a moderate impact on the market towards a
drop in prices;
0 – no impact on the market is observed;
1 – a moderate impact on the market towards a
hike in prices;
2 – a significant impact on the market towards a
hike in prices.
Taking into account the price formulation factors
shown above, Figure 2 depicts the structure of the
neural network and the interpretation of the input. It
was found that the best form of neural networks for
solving this problem is a multilayer perceptron with
4 hidden layers. At the core of this network is a
fully-connected multilayer perceptron (layers 2-6).
The first layer has the activation ReLU (Rectified
Linear Unit) function and is intended to form linear
combinations of input. During the learning process it
generates indicators, based on which the retail
network acquires a behavioral classification. Unlike
the linear activation function, ReLU can reduce the
number of neurons per layer thanks to its non-linear
nature. Output has no activation function, but is
rather used as a multiplexer of the perceptron’s
output layer of price growth for the next time period.
Such network structure is dictated primarily by the
specificity of the input and output data.
About categorized under threat of impact forces
form the index of informational load. This index is
the sum of ranks of active threats at a time. This
approach takes into account both direct and indirect
impacts on the market with the formation of the
ICEIS 2017 - 19th International Conference on Enterprise Information Systems
634
retail price.
Figure 2: The structure of the neural network.
4 LEARNING NETWORKS
Each agent’s neural network is trained separately.
To generate a set of input data we used a mock
launch of the agent model without the use of neural
networks. All values used for input to the neural
network will be calculated for each agent based on
real statistic data. Information on threats is
formulated beyond the agent model – in the threat
identifying system for the petroleum product, where
the corresponding information gathering,
classification and threat ranking are carried out.
To train the network we used daily prices of
retail chains, daily wholesale price on the Ukrainian
border and the total value of the active threats
broken down by day.
Training and testing was conducted based on the
data collected from the following 2 periods:
- January 2010 to June 2012 with verification on
data from July to December 2012 - a period of
normal market conditions
- June 2013 to May 2014 with verification on
data from June 2014 onwards - a period of
significant price volatility.
The main challenge in using neural networks for
economics-related tasks is the inhomogeneity of
data, thus over-educating the network. In an effort to
avoid such a scenario this model uses the Dropout
method.
5 EXPERIMENTAL RESULTS
The figure seen below depicts a comparison of price
forecast graphs calculated using the agent forecast
model and the real data for the period from 2010 to
2012.
Figure 3: Comparison of price forecasts for the described
model with real data for 2010-2012.
Shares of zeroing for our network are presented in
Table 2. Regularization was never carried out for the
last layer, since it serves solely to formulate linear
combinations of output data. For other layers the
ratio depends on the number of neurons in adjacent
layers.
Table 2: Regularization ratios for the Dropout method.
Number of
layer
1 2 3 4 5 6 7
dropout
ratio
0.5 0,5 0.5 0.3 0.3 0.3 -
To build and train a network we have used our own
software written in C++ based on the FANN library.
To train the system we used a packet method of
error backpropagation with a stochastic method of
gradient descent. Due to the significant size of
neural networks, the training algorithms were
modified to work in a multi-stream mode on video
display cards by utilizing CUDA.
Figure 4: Error margin dynamics during the training
process of the neural network.
It should be noted that when one constructs a
forecast for wholesale prices, the forecast horizon
remains unchanged. This is a certain simplification
dictated due to a wholesale price forecast requiring a
forecast of the exchange rate. The latter would be
quite challenging to acquire at times of market
The Multiagent Model for Predicting the Behaviour and Short-term Forecasting of Retail Prices of Petroleum Products
635
instability. Therefore the precision of the forecast
may be improved by using forecast values from
input data of the agent model.
We have made comparisons with real data and
other short-term forecast models in an effort to
assess the potential of the model’s forecasting
capabilities.
Figure 5 shows an error comparison between the
agent model and the co-integration model under
normal market conditions. In this situation, the agent
model shows the best result with an error rate of
1.1% for the forecasted two week period compared
to 1.8% for the co-integration model.
Short-term prediction accuracy measured by the
absolute standard deviation calculated from real data
within the prediction interval.
Figure 5: Comparison of prediction accuracy between the
agent model and the co-integration model under normal
market conditions.
We have also assessed the error margin if there had
been an "ideal" model capable of predicting the
behavior of wholesale prices, which are part of the
input data for the agent model. The results show that
by using third-party agent models the forecast model
can be increased to nearly 3 weeks, while
maintaining a reasonable result.
Figure 6 shows a comparison of average
forecasting errors for a period of considerable
volatility in market prices. As we can see, the co-
integration model displays a higher accuracy rate for
periods up to 1 week, while forecasts for periods
over 7 days are more accurate when using the neural
network model. In any case, the main cause of
disturbances for this period was the exchange rate.
The accuracy of the model granted with an ideal
wholesale forecast model was not conducted due to
absence of exchange rate forecasting models for an
unstable economic climate.
Figure 6: Comparison of prediction accuracy between the
agent model and the co-integration model, in the case of
significant market price volatility.
6 CONCLUSIONS
Results show that the combination of agent-based
models and neural networks in which the neural
network serves as a tool/method of price reactions
for each of the agents in response to the actions of
the competition allows for the best results when it
comes to predicting retail prices of petroleum
products compared to those taken separately from a
pricing forecast model based on separate multi-agent
model rules and a single neural network. This hybrid
model improves the solution of this nontrivial
problem primarily due to the consideration of the
petroleum product’s particular features as an
oligopolistic competitive environment and
incorporation of particular information, which is
used by retailers to formulate their prices. As a
result of combining several approaches to data
formulation: using information including threats as
input parameters and using parallel computing to
accelerate the training process of the neural network,
we were able to build a model capable of predicting
the short-term behavior of retail prices and
considering the pricing dynamics of each market
participant.
This hybrid model doesn’t just build a forecast
based on the historical data for the previous time
periods, but it also considers the ever-changing
market behavior. We were able to lower the forecast
uncertainty levels below what was possible with
statistical methods. This paper shows the results the
first proposed hybrid model for oligopolistic oil
product market based on multi-agent approach, in
which the algorithm is based on behavior calculation
agent by neural network. This allows to get a better
short-term prognosis with substantial volatility of oil
product prices than predictions based on historical
data.
ICEIS 2017 - 19th International Conference on Enterprise Information Systems
636
ACKNOWLEDGEMENTS
The authors express their gratitude to the
management of consulting and analysis firm
"Psyche" for providing detailed data on the retail
prices of petroleum products on the Ukrainian
market.
REFERENCES
Matt Lewis "Asymmetric Price Adjustment and Consumer
Search: An Examination of the Retail Gasoline
Market" University of California, Berkeley
Department of Economics November 13, 2003.
Perry Sadorsky, Modeling and forecasting petroleum
futures volatility Energy Economics Volume 28, Issue
4, July 2006, Pages 467–488.
Perdiguero García, Jordi, 2010. "Dynamic pricing in the
spanish gasoline market: A tacit collusion
equilibrium," Energy Policy, Elsevier, vol. 38(4),
pages 1931-1937, April.
Leonid Galczynski The Short-Time Forecasts of Gasoline
Proces in Ukraine. ZESZYTY NAUKOWE
Uniwersytet Ekonomickij POZNAŃ 242 с.44-56,
2014.
Alison Heppenstall, Andrew Evans and Mark Birkin
Using Hybrid Agent-Based Systems to Model
Spatially-Influenced Retail Markets Journal of
Artificial Societies and Social Simulation vol. 9, no. 3.
Tsvetovat, V. and Carley, K., 2002, Emergent
Specialisation in a Commodity Market: A Multi-Agent
Model, Computational and Mathematical
Organisation Theory, 8, pp. 221 – 234.
Dynamic pricing by software agents Jeffrey O. Kephart,
James E. Hanson, Amy R. Greenwald Computer
Networks 32 (2000) 731-752.
S. Ramezani, P. A. N., Bosman, J. A., La Poutré. Adaptive
Strategies for Dynamic Pricing Agents. Proceedings of
the 23rd Benelux Conference on Artificial Intelligence,
423–424, 2011.
Galchynsky, Leonid, Andrij Svydenko, and Iryna
Veremenko. "The agent-based model of regulation of
retail prices on the market of petroleum products."
Polish journal of management studies 3 (2011): 135-
146.
Y. Levin, J. McGill, and M. Nediak. Dynamic pricing in
the presence of strategic consumers and oligopolistic
competition. Management Science, 55(1):32–46,
2009.
Hinton G. E. Improving neural networks by preventing co-
adaption of feature detectors / Hinton G. E., Srivastave
N., Krizhevsky A., Sutskever I., Salakhutdinov R. R. -
arXiv:1207.0580 – 2012.
Wan, L., Zeiler, M., Zhang, S., Cun, Y. L., & Fergus, R.
(2013). Regularization of neural networks using
dropconnect. In Proceedings of the 30th International
Conference on Machine Learning (ICML-13) (pp.
1058-1066).
He, K., Zhang, X., Ren, S., & Sun, J. (2015). Delving deep
into rectifiers: Surpassing human-level performance
on imagenet classification. In Proceedings of the IEEE
International Conference on Computer Vision (pp.
1026-1034).
The Multiagent Model for Predicting the Behaviour and Short-term Forecasting of Retail Prices of Petroleum Products
637