Corn is a staple food in the Mexican diet, currently more than 30% of the sown area in Mexico is occupied by corn. Despite the foregoing, Mexico is not self-sufficient in its production. In the period 1988-2007, Mexico was the fourth largest producer of corn (FAO, 2009); however, the production only covered the demand for white corn, while the consumption of yellow corn was supplied by importations.
After the North American Free Trade Agreement (NAFTA), corn imports increased to more than seven million tons in 2007  , with Mexico being the third largest importer in the world  . Moreover, the corn world consumption increased by 3.2 percent to total 1008.7 million tons in 2016-2017, of which 61.9 percent corresponds to fodder consumption and the remaining 38.1 percent to human, industrial and seed.
One of the efforts that were made in the past to encourage corn production in Mexico was the PROCAMPO support program, defined as a direct subsidy that the federal government granted through SAGARPA (Secretary of Agriculture Livestock and Rural Development), began its execution at the end of 1993 until 2013.
PROCAMPO was a subsidy of 1000 pesos per hectare of corn sown, however, 20 percent of producers receive 60 percent of the subsidy and 80 percent of producers receive only 40 percent of the resources  . The objectives of PROCAMPO were to provide direct support to more than 3.3 million rural producers, to compensate the subsidies in other countries, especially the developed ones, and at the same time to ensure that national consumers have access to food at lower prices  .
The prices movement or production decrease becomes a problem of national interest and it occupies part of the public policy agenda. Corn price plays a fundamental role; it depends to a large extent on many other factors, such as the international corn prices, and the prices of other related products. Therefore, the objectives of this paper are:
1) Analyze the effectiveness of the PROCAMPO program.
2) Build two neural network models in order to simulate the price behavior of corn based on prices of related products and the international price of corn.
3) Perform a sensitivity analysis in the neural network model to determine which price has a greatest effect on the corn price and thus be able to generate a policy of joint support products.
2. Literature Review
Artificial Neural Neworks (ANN) are defined as a computer systems composed of a large number of interconnected elements. It is a new form of computing, inspired by the functioning of the human brain  . The ANN models minimize the number of assumptions that are preconceived, and only focus on the data with which the network is fed. Theoretically, a correct ANN design will converge in a number of iterations  .
Some authors  mention that many methods have been used to attempt share prices predictions like fundamental analysis, technical analysis, and machine learning method, but none of these methods could consistently be applicable as a prediction tool. On the other hand, the authors mention that ANN approach is suitable for chaotic systems such as share prices. Although ANN are not perfect in their predictions, they radically outperform all other existing prediction methods, They appear to be the best modeling method currently available for prediction as they capture nonlinearities in the system without human intervention    .
Another result comes from a Ph D thesis  in where a comparison between some prediction methods is done and the author conclude that the artificial neural network models were more accurate in predicting the coffee price compared with the integrated autoregressive model of moving average with explanatory variables (ARIMAX).
Also,  compared Artificial Neural Networks (ANN) and multivariate statistics in a problem about identification of countries that are likely to seek a rescheduling of their international debt-service obligations, the author conclude that ANN largely outperformed more conventional multivariate statistical procedures usually employed for this problem.
The aspects to be defined in ANN models are the following:
2.1. The Topology or Architecture
The topology or architecture to be use for the analysis in a given problem, it refers to the structure of synaptic connections between neurons, which are grouped into layers: input layer (composed of neurons that receive the information); hidden layer with no connection to the environment and the output layer with a connection to the environment and it is responsible for producing and presenting the final network outputs.
The connections of the neural network can be forward, lateral or backward  . In a feedforward multilayer perceptron, information flows in one direction along connecting pathways, from the input layer via the hidden layers to the output layer (Figure 1)  .
The neurons in one layer are connected to those in the next layer by connections and weights (synapses), whose values are different for each of the connections  .
In Figure 1, x1 … xx represent the inputs, while y1, …, yn are the outputs of the neural network model; 1, …, n1 denotes the number of nodes in the first hidden neural layer; 1, …, n2 is the number of nodes in the second neural layer.
In this sense, the fundamental parameters of the network are: the number of layers, the number of neurons per layer, the degree of connectivity and the type of connections between neurons  .
2.2. Transfer or Activation Functions
Each neuron applies a function f known as the activation function or transfer
Figure 1. A feedforward multilayer perceptron architecture  .
function, which is a mathematical expression used to approximate the influence of the neurons in the output. The transfer function provides the current activation status of a neuron, based on its weights, inputs and its current postsynaptic potential.
The Activation Functions can be basically divided into 2 types: Linear Activation Functions (Identity and Symmetrical Hard Limit) and Non-linear Activation Functions (log Sigmoid and Hyperbolic Tangent Sigmoid) described in Table 1.
The purpose of an activation or transfer functions is to convert an input signal of a node into an output signal. They introduce non-linear properties in the Artificial Neural Network model. According to  the linear transfer function is used between hidden layer and output layer due to the fact that, if sigmoidal neurons are used in the output layer, the output of the network is limited to a very small range; on the contrary, when using a linear neuron, the output can take any value.
Symmetrical Hard Limit function is used mainly for classification problems because it divides the output into two groups. The log Sigmoid function have a range between cero and one and it is especially used for models where we have to predict the probability as an output. Finally the Hyperbolic Tangent Sigmoid is better than logistic sigmoid because its range is from (−1 to 1), so its output is zero centered hence optimization is easier. Both hyperbolic tangent sigmoid and logistic sigmoid activation functions are used in multilayer feed-forward nets  .
2.3. Building the Network
The process of building the network consists of three steps: training, testing and validation.
Table 1. Transfer functions.
In the training process the neural network must learn to calculate the correct output for each array or input vector in the set of samples  .
The training algorithm may vary depending on the network architecture, but the most common training algorithm used when designing financial neural networks is the backpropagation algorithm, which is the process of backpropagating errors through the system from the output layer towards the input layer, minimizing the sum of the errors on all the examples of the training set. As the errors are backpropagated through the nodes, the connection weights are changed  .
The next step is validation to verify if the neural network can solve new problems of the general type, for which it has been trained. Another set of data is presented, called the validation set, using the same weights obtained in the training process, the MSE is calculated between measured and simulated output to check if the network gives good results  .
Finally, testing consists of re-training the network with a new data set, but the weights are recalculated. At the end of the process, testing, validation and training must converge to a minimum mean square error  .
After building the NN model a sensitivity analysis can be performed to analyze the effect on the output, when a change in the input is observed the Garson algorithm can be applied for this purpose  . It consists in distributing the connection weights of the neural network in order to determine the relative importance of each input variable in the network. The Garson Algorithm uses the absolute values of the connection weights when calculating the contribution of each variable and gives us a clear picture of which input variables have a greater effect on the output variable when everything else remains constant  .
The information used in this work was obtained using the Agrifood Information System and Consultation (SIACON) of the SAGARPA and the World Bank Commodity Price Data, for the period of 1980-2014, the prices were deflated using the National Consumer Price Index (INPC) based on the year 2010.
Two ANN models were developed to simulate the domestic price of corn based on the prices of related products such as the real prices of Rice (PRAR), Wheat (PRTR), Safflower (PRCA), Soybeans (PRSY), Sorghum (PRSG), and Barley (PRCE). A second network includes besides the inputs in the first model the Real International Price of Corn (PRIMA).
A Feedforward Multilayer Perceptron architecture was used as shown in Figure 2.
Figure 2. Neural network architecture.
PRAR: Real Rice Price; PRTR: Real Wheat Price; PRCA: Real Safflower Price; PRSY: Real Soybean Price; PRSG: Real Sorghum Price; PRCE: Real Barley Price; PRNMA: Real Maize Price; PRIMA Real Maize International Price; Wnm: Weights from input to hidden layer; Vm: Weights from hidden layer to output layer.
To determine the number of nodes in the hidden layer, 3 criteria were used:
1)  ,
2)  ,
3) (intermediate criteria).
Where h is the maximum number of neurons in the hidden layer; n is the number of input variables and m is the number of outputs. In this work, the three criteria were used, but the first gave the best results.
A hyperbolic tangent function was used between the input layer and the hidden layer, and a linear function between the hidden layer and the output layer because of their advantages mentioned in Section 2.2. In Figure 2 the product prices represents the inputs. A data pattern is presented to the feedforward multilayer perceptron, per example year 1980, this vector of prices goes through the activation function Hyperbolic Tangent Function which maps the inputs to an output between (−1 1) and this output is the input for the next layer. As can be seen in Figure 2 each layer is connected to the next one by weights which are the parameters we want to change with the backpropagation algorithm described before, in such a way that the output in the ANN can be as close as possible to the real data.
A total of 35 data patterns were available, 85% for training, validation and testing. The remaining 15% of the data was used for simulation purposes, data samples are shown in appendix A. To evaluate the model goodness-of fit some statistical measures are suggested by  .
The mean squared error (MSE) defined in (1)
where is the simulated output value, is the real output value, n is the number of measurements.
Sometimes is more convenient to work with the Root of the Mean Square Error (RMSE) defined in Equation (2).
When the objective is to examine the overall model error, it is more convenient to calculate the absolute mean error (MAE) displayed in (3).
The last statistical measure used was the Efficiency (EF) defined in (4).
where is the simulated output value, is the real value and is the average, if the model is perfect EF = 1, a bad model have a EF = 0  .
Figure 3 shows the production and the real prices of corn for the period 1993-2014 within which PROCAMPO program was applied.
During the period in which the PROCAMPO program was carried out, production increased remarkably and real prices remained low. The prices variability during the period of PROCAMPO program was measured through Standart Deviation (S) and Variation Coeficient (CV) defined in Equation (6) and Equation (7).
Results are displayed in Table 2. Soybean prices have the greatest variability in this period, and the lowest variability was for wheat.
where s is the standard deviation; is the real price; is the mean of the real price; n is the number of measurements; VC is the variation coefficient.
Figure 3. Production and real price of corn.
Table 2. Basic statistics.
PIM: International corn price.
Using the prices information for the crops from 1980-2014 two NN models were implemented using the Neural Network toobox from Matlab, the first one without taking into account the international maize price, and the second including the international maize price, in both cases the number of nodes were varying according to the three criterion described in methodology, and statistical measurements  were obtained, results are shown in Table 3 and Table 4.
For the first model the highest efficiency was obtained with 11 nodes in the hidden layer, while in the second model with 9 nodes in the hidden layer, both models were implemented. After training, validation and testing the results obtained are shown in Figure 4 and Figure 5.
The inclusion of the international corn price increased the efficiency from 0.79 to 0.9, the real and simulated corn price are closer.
There is a small difference between real and predicted corn price in both ANN models.
Table 3. Adjustment measurements without including PRIMA.
Table 4. Adjustment measurements including PRIMA.
Figure 4. Comparison of the real corn price observed and simulated by the ANN model without including the international price of corn.
Figure 5. Comparison of the real price of corn observed and simulated by the network, including the variable of the international price of corn.
Figure 6. Real and predicted corn prices for the ANN model without including the corn international price.
Figure 7. Real and predicted corn prices for the ANN model including the international corn price.
Figure 8. Relative importance of each input variable on the real national price of corn excluding the international price of corn, evaluated with the Garson algorithm.
Figure 9. Effect of the prices of 6 related products and the international price of corn on the real price of corn evaluated with the Garson algorithm.
In Figure 8 predictor contributions ranged from −17% to 31%, with Rice price and Safflower price being the strongest relationships with predicted corn price, and Sorghum price with the weakness relationship with corn price.
If the international price of corn is included (Figure 9) the results only change in the proportion of the effect of each variable, since the price of substitute products such as wheat, soybean and barley maintained a positive effect on the domestic price of corn, while the price of complementary products such as rice, safflower and sorghum continued to have a negative effect on corn price. Again, price of rice have the highest positive sensitivity over the national price of corn. Price of wheat was the variable with the highest negative sensitivity.
The international price of corn (IPM), have a negative effect on the national price of corn, the justification is that the PROCAMPO program was giving to corn producers to prevent the real national price of corn from increasing even though the PRIMA was increasing.
The main objective of PROCAMPO program was to increase production while keeping the prices stable, as can be noticed for the period 1993-2013. Two ANN models were implemented for the purpose of simulating the national corn price, one including only the prices of national related products, and the second model including the international price of maize, besides the other prices. Both models have good results, however the inclusion of the international price of maize increased the capability of simulation with an efficiency of 0.9. Years 2010-2014 were used to test the models for prediction purposes, the first model have good results for the 3 years ahead while the second give good results 5 years ahead with very good precision.
The previous result shows that the international price of corn is one of the most relevant variables in explaining the behavior of the national price of corn. The highest positive sensitivity was in the case of the price of rice, which is consistent since rice is another product of the basic basket and is complementary to corn. On the other hand, the price with the highest negative sensitivity was for soybean, barley and wheat, which are complementary products.
This study demonstrates the usefulness of neural network models for simulation purposes, and it can be inferred that incentive programs for agricultural producers should be implemented considering complementary products and substitutes.
Appendix A: Prices of Agricultural Products in Mexican Pesos/Ton
 FAO (Food Agriculture Organization) (2009) Statistical Databases.
 Chauvet S.M. and González, A.R.L. (2009) Alimentos, biocombustibles y desigualdad social en México. http://www.observatorylatinamerica.org/pdf/articulos/Chauvet_esp.pdf
 Schwentesius Rindermann, R., Gómez Cruz, M.á., Trujillo, J.D.D. and Durán Ferman, P. (2007) Metaevaluación de tres evaluaciones oficiales de la SAGARPA del programa de pagos directos (PROCAMPO) a la agricultura mexicana. Estudios sociales (Hermosillo, Son.), 15, 104-134.
 Gryc, W. (2010) Neural Network Predictions of Stock Price Fluctuations.
 Haider, K., Sharmin, A.T. and Hussain, A. (2011) Price Prediction of Share Market using Artificial Neural Network (ANN). International Journal of Computer Applications, 22, 42-47.
 Benedetti, F., Baigún, A., Yanguas, M., Heymann, D., Perazzo, R. and Zimmermann, M. (2008) Predicciones de Series de Tiempo con Redes Neuronales: Trading usando el índice Merval. http://www.elautomataeconomico.com.ar/download/TP-2011/Benedetti-Baigun-Yanguas.pdf
 Bedoya, C.M. (2016) Estimación de la Producción Mundial del Café y el Precio Diario del Café suave colombiano utilizando Redes Neuronales Artificiales y Modelos Autoregresivos Integrados de Promedios Móviles con Variables Exógenas. Tesis doctoral 2016. Universidad Autónoma Chapingo, Mexico.
 Duarte, J.V.C. (2003) Predicción con redes neuronales: comparación con las metodologías de Box y Jenkins. Master Thesis, Universidad de los Andes, Mérida. http://docplayer.es/4998343-Prediccion-con-redes-neuronales-comparacion-con-las-metodologias-de-box-y-jenkins-autora-joanna-veronica-collantes-duarte.html
 Villada, F., Munoz, N. and García-Quintero, E. (2016) Redes Neuronales Artificiales aplicadas a la Predicción del Precio del Oro. Información tecnológica, 27, 143-150.
 da Silva, N.I., Hernane, S.D., Andrade, F.R., Bartocci, L. L.H., dos Reis, A.S.F., et al. (2017) Artificial Neural Networks a Practical Course. Springer International Publishing, Switzerland. https://doi.org/10.1007/978-3-319-43162-8
 Olden, J.D. and Jackson, D.A. (2002) Illuminating the “Black Box”: A Randomization Approach for Understanding Variable Contributions in Artificial Neural Networks. Ecological Modelling, 154, 135-150. https://doi.org/10.1016/S0304-3800(02)00064-9