Using Artificial Neural Networks to Find Buy Signals for WTI Crude Oil Call Options

Oil price changes significantly influence proper functioning of the entire world economy, which entails the risk of losses. One of the possible ways to reduce this risk is to use some dedicated risk management tools, such as options contracts. In this paper we investigate the possibility of using multilayer perceptron neural networks to provide signals of long positions to take in the European call options. The experiments conducted on the West Texas Intermediate (WTI) oil prices (2630 observations coming from 16 June 2009 until 14 February 2020) allowed the selection of the network parameters, such as the activation function or the network error measure, giving the highest return on options contracts. Despite the fact that about 2/3 call options produced losses, the buying signals provided by the network for the test set allowed it to reach a positive return value. This indicates that neural networks can be a useful tool supporting the process of managing the risk of changes in oil prices using option contracts.


Introduction
Changes in oil prices have been a key component of the economic life for many years, and they are now the subject of numerous scientific studies. As history shows, oil price shocks have often been accompanied by financial crises which resulted in the collapse of companies in various industries or affected their liquidity [1]. Moreover, despite continuous technological progress, oil still remains the most crucial energy source in the world, which makes it even more important for the global economy. According to the BP 2019 report [2], the oil's share in global primary energy increased to 33.2% in 2018 and despite a noticeable increase in the importance of renewables, it will remain the main source of energy for the next few decades.
Previous studies have shown that there are strong correlations between oil prices and a variety of macroeconomic variables [3][4][5][6]. A popular direction of research is also the search for correlations between the volatility of the crude oil market and the stock markets in various economic regions. Aroui et al. [7] used the vector autoregressive-generalized autoregressive conditional heteroscedasticity (VAR-GARCH) model to investigate the volatility spillover effect between crude oil and equity markets for European companies in 1998-2009. The authors have shown that there is evidence of significant cross-market volatility transmission. What is more, spillover effects are more apparent from oil to the stock market, and come entirely from transmission of shocks. This research was also continued by Cuando and de Garcia [8], who focused their analyses on data from 1973-2011 and the impact of the oil shocks on the stock returns in 12 oil importing European economies, using VAR and vector error correction model (VECM) models. Bagirov and Mateus [9], in turn, analyzed the impact of oil price changes on the financial results of 137 listed and 531 unlisted oil and gas companies from Western Europe. The study gathered data from 2005-2015 and showed that during the financial crisis stationary and linearity of the analyzed time series [30]. Nonetheless, the complexity of the relations between crude oil and other markets, as well as the macroeconomic variables causes oil prices to be characterized by non-linearity and non-stationarity [31], hence there are attempts to use artificial intelligence techniques, including the above-mentioned artificial neural networks. For example, Azadeh et al. [32] used a flexible algorithm based on ANNs and fuzzy regression (FR) to forecast oil prices in the long term. This algorithm was used for annual oil prices from 1985-2007 and five indicators were used as inputs, i.e., oil supply, crude oil distillation capacity, oil consumption in non-OECD countries, refinery capacity in US and surplus capacity. Chiroma et al. [33] also tested the possibility of using neural networks to predict monthly oil prices. They propose a genetic algorithm (GA) to optimize the neural network weights, bias and topology to build a model for the prediction of the WTI crude oil price to improve WTI prediction accuracy, and to simplify the neural network model structure. Wang and Wang [34], in turn, combined multilayer perceptron (MLP) with an Elman recurrent neural network (ERNN) and stochastic time effective function to develop a prediction model for four oil price indices, one of which concerned WTI oil. WTI oil price forecasting was also discussed by Mostafa and El-Masra [35] who used gene expression programming (GEP) and ANNs, and made reference to the 1986-2012 quotations. Huang and Wang [36] demonstrated the advantage of the wavelet neural network (WNN) models with a random effective function over the back propagation neural network (BPNN) and support vector machine (SVM) models for forecasting WTI and Brent oil prices. These and other hybrid models [37][38][39][40][41][42] have shown that ANNs in combination with the relevant computational algorithms provide an important alternative to the econometric models in predicting the directions of oil price changes. On the other hand, Dbouk and Jamali [43] consider a bagged neural network (BANN), a neural network trained using the genetic algorithm (GAANN) and a neural network with fuzzy logic (FANN) in predicting daily crude oil prices. They have shown that the FANN's predictive accuracy was broadly in line with linear models used in the research. However, the BANN and GAANN have performed significantly worse than the linear models.
Artificial neural networks have also been widely applied in modelling the values of option premiums. It is the price that traders pay for a put or call option contracts, i.e., the right to trade its underlying market at a specified price for a set period. The literature mainly deals with the valuation of stock index options, such as S&P500 [44,45], TAIFEX [46][47][48], Nikkei 225 [49] or WIG20 [50]. Similarly to the models used for oil price forecasting, the ANN was used here in combination with other models, such as the Black-Scholes model [51], the GARCH model [52], the exponential Lévy model [53] and many others [54,55]. Research shows that the integration of ANNs into existing option pricing models provides an effective alternative to the classical parametric models, even in the absence of certain economic assumptions related to the characteristics of the underlying market.
Bearing in mind the consequences of rapid changes in oil prices both in the economy and in oil-price-dependent companies, we focus on examining the possibility of using ANNs in the process of hedging against the risk of oil price changes. This kind of risk is particularly important for production companies (refineries) which do not have enough own oil reserves. Therefore, oil price changes determine their production costs in the world market.
Since one of the most popular approaches used by large manufacturing companies in managing the risk of oil price changes is the use of option contracts, we decided to attempt to increase the effectiveness of their use. For this purpose, we employ artificial neural networks such as multilayer perceptron (MLP) with different activation functions and with a different number of neurons in the hidden layer. These tools classify, based on selected market parameters, long positions in WTI crude oil call option into two categories: profitable or unprofitable. In the literature, we can find studies in which neural networks were used to forecast the direction of price changes. Dbouk and Jamali [43] examined in this context the economic significance of GAANN, FANN, and BANN, which first were used as forecast models, using a trading exercise (short-only, and long-only). However, they used for this purpose crude oil futures, which, unlike options contracts, do not guarantee the buyer that the losses will be limited, in the case of crude oil price changes not as expected. For long options, that are the subject of our research, the maximum loss is limited and equal to the value of the option premium. This fact makes it possible to use long options as tools for full protection against unfavorable changes in oil prices without generating additional risk.
Following that, the paper attempts to combine two aspects that are important from the perspective of oil market participants: a classification based on oil prices and hedging against the risk of an oil price increase. To the best of the authors' knowledge, there are no studies in the literature that would deal with these two issues simultaneously.
The remainder of the article is organized as follows: Section 2 presents the proposed method, Section 3 provides the data and preliminary analysis, Section 4 outlines the most important and relevant results. Section 5 concludes and explores possibilities for future research.

Proposed Methods
This section provides the key information on European call options and the structure of artificial neural networks. Both of these tools are analyzed in the empirical part of the paper. We also present indicators which enable to assess neural networks and their use to read the European call option purchase signals.

Long Call Options
Among derivatives, high potential for their use in hedging against asset price changes is attributed to options. An option is defined as a contract between two parties, a buyer (holder) and a seller (writer), in which the buyer (long position) has a right, but not the obligation, to buy or sell a certain amount of the underlying asset (stock, bond, interest rate, commodity or other assets) at the denoted strike price within a specific time period ( [56], pp. 7-8). Sellers (short position) willing to accept considerable amounts of risk can write options, collecting the premium and taking advantage when options expire worthless. The premium collected by a seller is seen as a liability until the option either is offset (by buying it back) or expires ( [57], p. 2).
Depending on the right that holder can get, there are two basic types of options: • Call options-give the holder the right to buy the underlying asset at the stated strike price within a specific period of time; the seller of a call option is obliged to deliver a long position in the underlying futures contract from the strike price in the case that holder chooses to exercise the option; • Put options-give the holder the right to sell the underlying asset at the stated strike price within a specific period of time; the seller of a put option is obliged to deliver a short position in the underlying futures contract from the strike price should the holder choose to exercise the option.
Options are traded both on a stock exchange and in the over-the-counter (OTC) market. There are also two main types of options with respect to the right of exercise the option before the day of expiration: • European option-a version of an options contract that the holder may only exercise their rights on the day of expiration; • American option-a version of an options contract that allows holders to exercise the option rights at any time before and including the day of expiration.
Further on in the study, the analysis concerned European call options. These kinds of options can be used to hedge against the risk of an oil price increase. The method of determining payoff for buyer European call option (long call) is presented in the following formula: where, F-the future price of the underlying asset; K-strike price of the option; c(K)-option premium (for the strike price K); L-number of call options.
It is therefore evident that an increase in the price of the underlying asset relative to the strike price determined (K) will contribute to the exercise of the option. However, the option itself will be exercised profitably when the difference between the price of the underlying asset on the day of expiration (the future price; F) and the strike price (K) is higher than the option premium c(K).

Artificial Neural Networks
Artificial neural networks (ANN) are computational representations of the human brain structure. Neural networks comprise interconnected neurons, usually minimally organized in three layers, i.e., an input layer, at least one hidden layer and an output layer. The input layer receives data that is processed by the network into one or more output signals. All neural connections have weights assigned to them where the weight represents the power of interaction between one neuron and another. Neuron output value multiplied by the weight of the connection between a given pair of neurons makes the value of the signal carried from one neuron to another. The aggregated value of the input signals for a given neuron is then processed by the activation function, which generates the neuron output value. The weights of the connections between neurons, which determine the value of the signals reaching a given neuron, are modified in the learning process of the network. Network learning (i.e., appropriate selection of weights of connections between neurons) is one of the key problems of effective operation of neural networks. Therefore, the algorithm used to train the network may determine the effectiveness of its operation.
Another important element concerning effective network performance is an appropriate choice of the structure of the network (the number of hidden layers and the number of neurons in each layer) and the occurrence or absence of feedback. In feedforward networks signals flow only in one direction, i.e., from the input layers, through the hidden ones to the output neurons. On the other hand, feedback neural networks have additional connections between neurons present in the later layers with neurons of the earlier layers (e.g., neurons from the output layer send feedback to neurons from the input layer or neurons of the hidden layer). For the purpose of this study it was decided to use a network with a one-way information flow (feedforward neural networks) thus feedback neural networks will not be discussed.
In this paper, multilayer perceptron has been used as a decision-support tool with regard to hedging against an increase in the price of WTI oil by buying a long call option. These are networks with unidirectional information flow (a class of feedforward ANN). The networks used in the study consist of exactly three layers, i.e., the input layer, one hidden layer and the output layer. The Broyden-Fletcher-Goldfarb-Shanno algorithm [58] was used as a training algorithm. The proposed method of determining the time of hedging using an ANN will be referred to as SANN (due to the use of the Statistica software for creating neural networks).
Using artificial neural networks results in obtaining information which enables one to decide whether or not to take a long position in the call option. Therefore, the proposed network should be considered as a tool to support the process of making decisions on hedging against an increase in the price of WTI oil. The task of the network is therefore to solve the classification problem by searching for call option buy signals in the analyzed time series. In the further part of the study, the signals sought are referred to in short as 'buying signals'.

Network Performance Assessment Indicators
In order to be able to assess the performance of the individual networks, the following subsection proposes a number of indicators. Except for the ability to compare the results of various networks, indicators also aim at determining to what extent the outcomes of a given network differ from the maximum possible result. In order to calculate the value of the indicators, it is assumed that on a given day it is possible to purchase (or not) exactly one option contract.
C is a set of profits (losses) from a long call option. The result of the neural network operation on the set C is the value of the EP (expected profit) indicator, obtained from the following formula: where c is an element of the set C, v c denotes the value of the profit from the purchase of the hedging instrument at moment c, where the value o c is described by the formula: 1, i f f or observation c, a call option was bought 0, i f f or observation c, a call option was not bought In order to verify the quality of the performance of the network, three indicators have been identified as the reference points for the results obtained by the network: (a) maximum profit (MP)-means the sum of profits from the long call options for all days for which the final result from taking this position was greater than zero (the option was exercised with profit exceeding the value of the option premium); the value of MP index is calculated based on the following formula: where z c denotes a binary variable described by the following formula: (b) maximum loss (ML)-means the sum of all losses from the long call options in a given period; the following formula is used to calculate the value of the ML indicator: where s c denotes a binary variable described by the following formula: (c) average return (AR)-means the total value of profit from the long call options on each successive day of quotation in a given period; the AR indicator is described by the following formula: There is always the following relation between the above-mentioned indicators: The indicators will be used to assess the quality of the proposed method to support decision making in terms of buying a call option (EP). It was assumed that the EP parameter should be a positive value and greater than the AR, the following condition must be met: The maximum value that can be reached by the EP indicator (which is also the upper limit of profit, assuming that exactly one option can be bought on one day) is equal to the value of the MP indicator. The situation where EP = MP would be possible if exactly all network indications, including buying or not buying a call option were correct.
In order to verify the quality of the result obtained from the network as well as the maximum value (MP), an additional indicator has been designated: The %MP indicator should be understood as the percentage of the best possible result (MP) achieved by this method (EP). In the further study, the %MP indicator was used to compare the results achieved by each neural network.

Data and Preliminary Analysis
The empirical part of this study concerns prices of WTI crude oil as quoted on the NYMEX. The New York Mercantile Exchange is a commodity futures exchange owned and operated by CME Group of Chicago. The considerations include WTI crude oil futures prices for front-month delivery between 16th June 2009 and 14th February 2020 [59]. We focus on using long European call options to hedge against the risk of rising WTI oil prices. The study includes only ATM (at-the-money) options, i.e., those with strike price identical to the WTI future price (in USD per barrel) on a given day. For each option, the result that would have been achieved by the call option buyer between the date of opening the position and the date of expiration of the option was determined (which is directly related to the style of the European options under consideration). This result was calculated as the difference between the WTI future price on the option expiry date (the last day of the option period) and the option strike price, as well as lessen by the cost of the hedging instrument (the unit value of the option premium expressed in USD per one barrel of oil). The number of days remaining to option expiry in each of the given months ranged from 31 days to 1 day.
Additionally, the following values were calculated for the set of observations presented: The main aim of the method used for the purpose of this paper was to determine the moment of buy call option. Following that, it was assumed that this moment can only occur at the session close on a particular day. This is the consequence of using WTI futures prices, which were the closing prices, to determine standard deviations and moving averages.
WTI futures prices and the number of days remaining until expiry, as well as standard deviations and moving averages based on WTI futures prices were used as input data for artificial neural networks. The choice of the above-mentioned variables was motivated by the following assumptions: (1) Standard deviations provide a certain representation of the dynamics of price changes; the option can only be exercised profitably if WTI price is big enough. In addition, past price changes affect the volatility of the option, which is one of the key parameters determining the option premium; (2) Moving average is widely used in the technical analysis as it reflects market trends. Additionally, some researchers have shown that moving averages are indicators that predict the directional movement of oil prices with high accuracy [43]; (3) The number of days remaining until expiration of the option affects the option premium (cost of hedging) and thus indirectly the final result achieved by the call option buyer. This parameter is also related to the internal value of the option and the chance the option will end in the money. (4) The WTI futures price is a reference point to the level of current prices.
For the purpose of network operation, the data was divided into two sets-a training set and a test set. Figure 1 presents WTI futures prices quotations distinguished between a training set and a test set.  Table 1 presents quantitative characteristics of training data and test data. Column All contains the number of observations concerning the training and the test sets, as well as the number of all observations (Sum). Additionally, the Table 1 shows a division of observations of each set into cases that allowed obtaining a positive return from taking a long position in the call option ([>0]) and cases that generated a loss from taking a long position ([<0]). For each of the sets, the percentage share of the number of options generating profit in the number of options generating profit and coming from the whole set was also presented (% [>0]). Corresponding calculations were carried out for options that generated losses (% [<0]). In the test sample, profit-generating observations had a higher percentage than it would appear from the percentage division of all observations into the training and the test sets. The proportion of loss-generating observations is also distorted in relation to the division ratio of the number of observations into the training and the test sets, but this deviation is insignificant. It is worth noting that almost twice as often (65% to 35%) the purchase of ATM options generates a loss rather than a profit. Generally speaking, an ATM call option usually has a delta, interpreted as the probability of exercising the option [56], at approximately 0.5. It should, however, be borne in mind that the option that will be exercised does not necessarily imply a profit to the buyer (cf. Equation (1)).
On the basis of the presented quantitative characteristics, it is possible to conclude that the probability of generating profit from taking a long position in the call option was higher for the test set. Table 2 presents the value characteristics for each set. The first column of the table (All) should be understood as the amount of return on taking a long position in a call option on each subsequent day. The second and third columns are the sum of returns gathered from the observations generated only profit and loss.  The set of observations was divided into a training set and a test set at a ratio of 75% to 25% respectively. A continuous set of observations, starting on 17th September 2009 and ending on 14th July 2017, was chosen as the training set. The observations constituting the test set cover the period from 17th July 2017 to 14th February 2020. Table 1 presents quantitative characteristics of training data and test data. Column All contains the number of observations concerning the training and the test sets, as well as the number of all observations (Sum). Additionally, the Table 1 shows a division of observations of each set into cases that allowed obtaining a positive return from taking a long position in the call option ([>0]) and cases that generated a loss from taking a long position ([<0]). For each of the sets, the percentage share of the number of options generating profit in the number of options generating profit and coming from the whole set was also presented (% [>0]). Corresponding calculations were carried out for options that generated losses (% [<0]). In the test sample, profit-generating observations had a higher percentage than it would appear from the percentage division of all observations into the training and the test sets. The proportion of loss-generating observations is also distorted in relation to the division ratio of the number of observations into the training and the test sets, but this deviation is insignificant. It is worth noting that almost twice as often (65% to 35%) the purchase of ATM options generates a loss rather than a profit. Generally speaking, an ATM call option usually has a delta, interpreted as the probability of exercising the option [56], at approximately 0.5. It should, however, be borne in mind that the option that will be exercised does not necessarily imply a profit to the buyer (cf. Equation (1)).
On the basis of the presented quantitative characteristics, it is possible to conclude that the probability of generating profit from taking a long position in the call option was higher for the test set. Table 2 presents the value characteristics for each set. The first column of the table (All) should be understood as the amount of return on taking a long position in a call option on each subsequent day. The second and third columns are the sum of returns gathered from the observations generated only profit and loss. The amount of the percentage return for each set is equal to the ratio of the division of observations into the training and the test sets (%All). On the basis of the percentage value, the shares of profits and losses from the purchase of options for the particular set in the total profit and loss figures, it can be concluded that the training set offers greater opportunities to achieve higher earnings as well as higher levels of loss. This issue is further detailed in Table 3 which contains both quantitative and value characteristics for each set. In addition, these characteristics were divided into value ranges representing the amount of return for the call option holder. For each of the sets, the percentages of the above-mentioned characteristics were also presented in relation to the value of the number of all observations and the sum of returns from the purchase of an option, with a distinction between ranges of returns greater ([>0]) and smaller ([<0]) than zero. The final part presents quantitative and qualitative summaries for each of the sets and all observations together.
The data presented in Table 3 shows a much higher share of observations with high levels of loss and profit for the training set than for the test set. This means that there were many more observations with price increase in the training set (hence high profits in individual items) and the options were more expensive hedging instruments (which resulted in higher individual losses). In the case of losses, the percentage share of observations generating a loss of more than USD 2 is almost twice as high for the training set as for the test set. The situation is similar in the case of the amount of profit, i.e., more than twice as many observations of the training set generated profit above USD 3 as in the case of the test set. In the case of the test set, the share of observations generating small profits and small losses (up to USD 1) was significantly higher. The relations described are illustrated in Figures 2 and 3.  As can be seen in Figure 3, an extremely strong imbalance occurs between the training and the test sets for profit over USD 3. For both, the training and the test sets, the value of the AR indicator (average return) is less than zero (Table 4). Therefore, based on formula (2), the EP value for the particular network should be greater than zero, and not greater than the AR value.     As can be seen in Figure 3, an extremely strong imbalance occurs between the training and the test sets for profit over USD 3. For both, the training and the test sets, the value of the AR indicator (average return) is less than zero (Table 4). Therefore, based on formula (2), the EP value for the particular network should be greater than zero, and not greater than the AR value.   As can be seen in Figure 3, an extremely strong imbalance occurs between the training and the test sets for profit over USD 3. For both, the training and the test sets, the value of the AR indicator (average return) is less than zero (Table 4). Therefore, based on formula (2), the EP value for the particular network should be greater than zero, and not greater than the AR value.   The abovementioned parameters behave similarly for both sets. Greater deviations of the curves determined by the MP and ML indicators from the straight line '0′ occurring in the training set provide a visual confirmation of the conclusion that it is possible to achieve both greater loss and greater profit for the training set than for the test set. The next part of the study presents the results of SANN performance for the data sets described.

Results
The Statistica software (TIBCO Software Inc, Palo Alto, California, United States) was used to build the networks that were used to search for call option buy signals. The networks analyzed were classification networks and they were created using the automatic network selection tool built into the Statistica software. The networks created were MLP type networks with the number of neurons in the hidden layer between 5 and 30. The following indicators were used to assess the errors made by the network: sum of squares and joint entropy. The following functions were used as activation functions: linear, logistic, exponential, sinus and hyperbolic tangent (for the hidden and output layers) and softmax (for the output layer when joint entropy was used as the error evaluation function). For each type of activation function for the hidden layer neurons, 50,000 networks were trained. The best results (EP) for networks using a specific activation function (for the training set) are presented in Table 5. Additionally, the average results of the best 5 and 10 solutions for the particular activation function used in the hidden layer are attached. This information has been added due to the fact that the results presented are best achieved by the networks for the training set, not the test one. Therefore, AVG5 and AVG10 results may be better than the BEST results but only for the test set. By far the worst results were obtained for the activation functions, linear and sinus (taking into account the training set). The best results, on the other hand, were obtained using the following The abovementioned parameters behave similarly for both sets. Greater deviations of the curves determined by the MP and ML indicators from the straight line '0 occurring in the training set provide a visual confirmation of the conclusion that it is possible to achieve both greater loss and greater profit for the training set than for the test set. The next part of the study presents the results of SANN performance for the data sets described.

Results
The Statistica software (TIBCO Software Inc, Palo Alto, California, United States) was used to build the networks that were used to search for call option buy signals. The networks analyzed were classification networks and they were created using the automatic network selection tool built into the Statistica software. The networks created were MLP type networks with the number of neurons in the hidden layer between 5 and 30. The following indicators were used to assess the errors made by the network: sum of squares and joint entropy. The following functions were used as activation functions: linear, logistic, exponential, sinus and hyperbolic tangent (for the hidden and output layers) and softmax (for the output layer when joint entropy was used as the error evaluation function). For each type of activation function for the hidden layer neurons, 50,000 networks were trained. The best results (EP) for networks using a specific activation function (for the training set) are presented in Table 5. Additionally, the average results of the best 5 and 10 solutions for the particular activation function used in the hidden layer are attached. This information has been added due to the fact that the results presented are best achieved by the networks for the training set, not the test one. Therefore, AVG5 and AVG10 results may be better than the BEST results but only for the test set. By far the worst results were obtained for the activation functions, linear and sinus (taking into account the training set). The best results, on the other hand, were obtained using the following functions: logistic and hyperbolic tangents. The results were also collated in Figure 5 using the %MP parameter which shows the percentage share of the network application result in the maximum profit that could have been obtained in the training set or on the test set (cf. Equation (11)).
Energies 2020, 13, x FOR PEER REVIEW 12 of 21 functions: logistic and hyperbolic tangents. The results were also collated in Figure 5 using the %MP parameter which shows the percentage share of the network application result in the maximum profit that could have been obtained in the training set or on the test set (cf. Equation (11)). The most distinctive result for the test set was obtained with the use of hyperbolic tangent as the activation function for the hidden layer neurons. Also noteworthy are the results obtained for the logistic activation function for which the average values calculated for the test set are higher than those for the BEST solution.
Based on the presented results, it was decided to carry out additional tests for three hidden layer activation functions, allowing to obtain the best solutions. Two output layer activation functions (logistic, softmax) were selected, which enabled to obtain the best results for the selected hidden layer activation functions (detailed results for the best 10 solutions for each particular activation function can be found in Annex A (Table A1) and are marked as T1 set). For each combination of selected activation functions in the hidden layer and the output layer, 100,000 networks were trained. The obtained results (marked as T2 in Table A1) are shown in Table 6. For each of the analyzed activation functions of the hidden layer in the T2 set, an improvement of the best result for the test set was obtained as compared with the T1 set. The values of the %MP parameter obtained for the T2 set are presented in Figure 6. The most distinctive result for the test set was obtained with the use of hyperbolic tangent as the activation function for the hidden layer neurons. Also noteworthy are the results obtained for the logistic activation function for which the average values calculated for the test set are higher than those for the BEST solution.
Based on the presented results, it was decided to carry out additional tests for three hidden layer activation functions, allowing to obtain the best solutions. Two output layer activation functions (logistic, softmax) were selected, which enabled to obtain the best results for the selected hidden layer activation functions (detailed results for the best 10 solutions for each particular activation function can be found in Appendix A (Table A1) and are marked as T1 set). For each combination of selected activation functions in the hidden layer and the output layer, 100,000 networks were trained. The obtained results (marked as T2 in Table A1) are shown in Table 6. For each of the analyzed activation functions of the hidden layer in the T2 set, an improvement of the best result for the test set was obtained as compared with the T1 set. The values of the %MP parameter obtained for the T2 set are presented in Figure 6. Repeated calculations confirmed that the worst results for the training set were obtained using the exponential activation function in the hidden layer. At the same time, the exponential activation function (using the logistic activation function for the output layer) enabled to obtain the best (of the 6 cases considered in the T2 set) BEST result. Also noteworthy are the results of hyperbolic tangents for the softmax function, where an upward trend is visible for the consecutive values considered. This may indicate a low value of the BEST result for the test set as compared with the results of the next networks (with similar parameters). Table 7 presents a summary containing the results (for the training set) obtained by the 10 best networks (from T1 and T2 sets). It is noteworthy that the average of the 5 best results for the logistic activation function is presented with an error assessment based on the entropy coefficient. For the five networks that yielded the best results (Table 7, numbers 1-5), the graphs were made to show the change in time of the values of the MP, AR and EP indicators. Figure 7 presents the values of MP, AR and EP for the training set, while Figure 8 presents the values for the test set. The value in brackets by the EP coefficient refers to the network number in Table 7. Repeated calculations confirmed that the worst results for the training set were obtained using the exponential activation function in the hidden layer. At the same time, the exponential activation function (using the logistic activation function for the output layer) enabled to obtain the best (of the 6 cases considered in the T2 set) BEST result. Also noteworthy are the results of hyperbolic tangents for the softmax function, where an upward trend is visible for the consecutive values considered. This may indicate a low value of the BEST result for the test set as compared with the results of the next networks (with similar parameters). Table 7 presents a summary containing the results (for the training set) obtained by the 10 best networks (from T1 and T2 sets). It is noteworthy that the average of the 5 best results for the logistic activation function is presented with an error assessment based on the entropy coefficient. For the five networks that yielded the best results (Table 7, numbers 1-5), the graphs were made to show the change in time of the values of the MP, AR and EP indicators. Figure 7 presents the values of MP, AR and EP for the training set, while Figure 8 presents the values for the test set. The value in brackets by the EP coefficient refers to the network number in Table 7.  The difference on the last day included in the training set between the highest and the lowest values of the %MP indicator for the five networks under consideration is 5.4%. It is worth noting that this value (Max (%MP)-Min (%MP)) was not less than 20% for nearly 2/3 of the number of training set observations. This difference is particularly visible in the central part of the chart, where the curves clearly diverge to 'get closer' towards the end of the training set. For all the networks, there is a clear tendency in which the value of the EP indicator 'follows' the MP indicator.
For the test set, the results obtained by the networks (EP) are significantly worse than for the training set. Figure 8 also shows that the relation between the MP and EP values for the test set is much weaker (less favorable from the perspective of a call option buyer) than for the training set. It is also worth noting that for the data set corresponding to the first half of 2018, the value of the AR indicator exceeds the values of the EP indicators. Furthermore, only a weak reaction of the EP indicators to the changes in the AR indicator can be observed.
For the test set, the difference between the highest and the lowest values of %MP is almost twice as high as for the training set and amounts to 12.1%. This value also means that the best solution out of the five considered networks (%MP (5) = 24.2%) is twice as good as the worst solution (%MP (2) = 12.1%).  The difference on the last day included in the training set between the highest and the lowest values of the %MP indicator for the five networks under consideration is 5.4%. It is worth noting that this value (Max (%MP)-Min (%MP)) was not less than 20% for nearly 2/3 of the number of training set observations. This difference is particularly visible in the central part of the chart, where the curves clearly diverge to 'get closer' towards the end of the training set. For all the networks, there is a clear tendency in which the value of the EP indicator 'follows' the MP indicator.
For the test set, the results obtained by the networks (EP) are significantly worse than for the training set. Figure 8 also shows that the relation between the MP and EP values for the test set is much weaker (less favorable from the perspective of a call option buyer) than for the training set. It is also worth noting that for the data set corresponding to the first half of 2018, the value of the AR indicator exceeds the values of the EP indicators. Furthermore, only a weak reaction of the EP indicators to the changes in the AR indicator can be observed.
For the test set, the difference between the highest and the lowest values of %MP is almost twice as high as for the training set and amounts to 12.1%. This value also means that the best solution out of the five considered networks (%MP (5) = 24.2%) is twice as good as the worst solution (%MP (2) = 12.1%). The difference on the last day included in the training set between the highest and the lowest values of the %MP indicator for the five networks under consideration is 5.4%. It is worth noting that this value (Max (%MP)-Min (%MP)) was not less than 20% for nearly 2/3 of the number of training set observations. This difference is particularly visible in the central part of the chart, where the curves clearly diverge to 'get closer' towards the end of the training set. For all the networks, there is a clear tendency in which the value of the EP indicator 'follows' the MP indicator.
For the test set, the results obtained by the networks (EP) are significantly worse than for the training set. Figure 8 also shows that the relation between the MP and EP values for the test set is much weaker (less favorable from the perspective of a call option buyer) than for the training set. It is also worth noting that for the data set corresponding to the first half of 2018, the value of the AR indicator exceeds the values of the EP indicators. Furthermore, only a weak reaction of the EP indicators to the changes in the AR indicator can be observed.
For the test set, the difference between the highest and the lowest values of %MP is almost twice as high as for the training set and amounts to 12.1%. This value also means that the best solution out of the five considered networks (%MP (5) = 24.2%) is twice as good as the worst solution (%MP (2) = 12.1%). Table 8 presents detailed quantitative and qualitative information on the five networks that allow to obtain the best result in the training set. Only one of the discussed networks generated fewer than 500 buy signals for the training set, i.e., network number 4. This network was also distinguished by a very low value of incorrectly generated buy signals for the training set, which also resulted in a small loss due to buying options based on incorrect signals. The remaining networks generated a similar number of buy signals for the training set, in the range between 635 and 651. For three networks, the return on buying a hedge based on correctly generated buy signals for the training set exceeded the value of USD 1300. In the case of the test set, the results obtained by the networks based on correctly generated buy signals can be divided into two classes: (1) Networks allowing revenue of approx. USD 120 (2) Networks generating revenue of approx. USD 150 The network that achieved a significantly higher %MP rate as compared with the other ones is the network (5). It is worth noting that this network is not distinguished by either the number of correctly or erroneously generated buy signals for the test set or the profit or loss achieved by these signals.
When analyzing the data included in Table 8, two strategies of generating buy signals can be distinguished. The first can be described as 'many bad, many (more) good' (MBMG). It consists in frequent generation of buy signals, a large portion of which may turn out to be incorrect; however, a much larger proportion of the signals (allowing to obtain a positive value of the EP indicator) is generated correctly. The second strategy (the use of which can only be observed in the case of the network (4) for the training set) can be characterized as: 'few good, fewer bad' (FGFB). It consists in limiting the number of generated buy signals (even at the expense of a smaller number of profit-generating signals), while strongly limiting the number of loss-generating signals.
The undoubted advantage of the MBMG strategy is that it is more likely (based on the number of long positions taken in call options) to hedge against unexpected but significant increases in WTI oil prices. On the other hand, the cost of frozen capital for the FGFB strategy is much lower. Also, the costs associated with the purchase of options are lower (the total of option premiums paid).

Conclusions and Future Research Directions
This paper thoroughly examines the ability of artificial neural networks as a tool to support the decision-making process concerning hedging WTI oil prices with the use of option contracts. We analyze the selection of the activation function both in the hidden layer and in the output layer. Due to the limitations of Statistica, there was only one hidden layer in the given networks. The parameter of the number of neurons in the hidden layer was limited by the range from 5 to 30. Using the Statistica automatic network selection tool, this size was modified (see Appendix A, Table A1, column "SANN's Name") to obtain the highest value of the quality of the network matching. Research outcomes revealed that the networks with the best results used the Logistic activation function in the hidden layer and the Softmax activation function in the output layer for the number of neurons between 5 and 25.
As the research has shown, the situations where an option was not exercised or could have been exercised at a loss (the option premium was greater than the difference between the oil price on the expiry date of the option and the option strike price) were much more common in the analyzed period. As a result, the value of the AR (average return) indicator for both the training and the test sets was less than zero. The given networks (SANNs) made it possible to generate buy signals for which the sum of results obtained from long positions in call options was positive not only in the training set but also in the test set. What is more, the values of the %MP indicator for the best networks in the training set were between 12-24% in the test set, which should be considered a promising result from the perspective of further research. For future work, the following potential research directions were distinguished: • Possible use of neural networks to search for buy or sell signals of other types of options (such as put options and American options); • Possible use of a network to improve the performance of option strategies that require the acquiring and issuing (buying and selling) options that differ in terms of parameters such as strike price and exercise dates; • Possible use of the proposed model to support the process of making decisions whether or not to purchase a hedge in other raw material markets; • An attempt to improve the results obtained by networks for the test set. Funding: This study was conducted under a research project funded by a statutory grant of the AGH University of Science and Technology in Krakow for maintaining research potential.

Conflicts of Interest:
The authors declare no conflict of interest.
Appendix A