Analysis of Multi-Layer Perceptron and Long Short-Term Memory on Predicting Cocoa Futures Price
DOI:
https://doi.org/10.30865/mib.v6i4.4498Keywords:
Prediction, Cocoa Futures Price, Comparison, Multi-Layer Perceptron, Long Short-Term MemoryAbstract
Predicting the price of Cocoa Futures is needed by farmers and also the government in determining policies. The uncertainty of price movements can affect farmers’ income and also foreign exchange savings because Indonesia is the largest cocoa-producing country in the world. In this study, we use the cocoa futures dataset to train using Multi-Layer Perceptron (MLP) and Long Short-Term Memory (LSTM) to make a prediction of the cocoa futures price. In that way, this study resolves the uncertainties using the MLP method and also the LSTM, where these two methods produce a model using the input of data train and data test to predict the price of cocoa futures contracts and then be compared to see which one is the right one for the cocoa dataset. The dataset used is quoted from the Investing.com page taken from 2003 to 2021. The result of this study is the best model between MLP and LSTM model, where the LSTM can produce the best model using 50-50 Train to test data ratio, 128 batch size, and 64 Neurons on the hidden layer with evaluation metrics value in RMSE is 2.27, MAE is 32.11, and MAPE is 1.29 or 98.71% accuracy. This is because the LSTM model has logic gates in the layers that have an advantage on time series data using memory, where the LSTM model could memorize the output and use the output again as an input to achieve the best output.References
G. Arburn and L. Harper, “Derivatives Markets And Managed Money: Implications For Price Discovery,†Int. J. Bus. Financ. Res., vol. 13, no. 1, pp. 53–61, 2019.
M. Mustafa and D. Andriyani, “PENGARUH EKSPOR IMPOR KAKAO DAN KARET TERHADAP CADANGAN DEVISA DI INDONESIA,†J. Ekon. Pertan. Unimal, vol. 3, no. 2, p. 34, Dec. 2020, doi: 10.29103/jepu.v3i2.3189.
Akhsan, M. Arsyad, A. Amiruddin, M. Salam, Nurlaela, and M. Ridwan, “In-Depth Study of Multiple Cropping Farming Systems: The Impact on Cocoa Farmers’ Income,†AGRIVITA J. Agric. Sci., vol. 44, no. 2, pp. 355–365, Jun. 2022, doi: 10.17503/agrivita.v44i2.3761.
M. Trisanti Saragih, H. Harianto, and H. Kuswanti, “Pengaruh Penerapan Bea Keluar Biji Kakao Terhadap Daya Saing Serta Ekspor Produk Kakao Indonesia,†Forum Agribisnis, vol. 11, no. 2, pp. 133–152, Sep. 2021, doi: 10.29244/fagb.11.2.133-152.
P. Nareswari, S. S. Wibowo, P. Nareswari, and S. Wibowo, “Global and Local Commodity Prices: A Further Look at the Indonesian Agricultural Commodities,†Cap. Mark. Rev., vol. 28, no. 1, pp. 65–76, 2020.
K. Sukiyono et al., “Selecting an Accurate Cacao Price Forecasting Model,†in Journal of Physics: Conference Series, Dec. 2018, vol. 1114, no. 1, p. 012116. doi: 10.1088/1742-6596/1114/1/012116.
H. Ouyang, X. Wei, and Q. Wu, “Agricultural commodity futures prices prediction via long- and short-term time series network,†J. Appl. Econ., vol. 22, no. 1, pp. 468–483, Jan. 2019, doi: 10.1080/15140326.2019.1668664.
A. B. Aribowo, D. Sugiarto, I. A. Marie, and J. F. A. Siahaan, “Peramalan harga beras IR64 kualitas III menggunakan metode Multi Layer Perceptron, Holt-Winters dan Auto Regressive Integrated Moving Average,†Ultim. J. Tek. Inform., vol. 11, no. 2, pp. 60–64, Jan. 2020, doi: 10.31937/ti.v11i2.1246.
R. Murugesan, E. Mishra, and A. H. Krishnan, “Deep Learning Based Models: Basic LSTM, Bi LSTM, Stacked LSTM, CNN LSTM and Conv LSTM to Forecast Agricultural Commodities Prices.†Research Square, 2021. doi: 10.21203/rs.3.rs-740568/v1.
R. Hyndman and G. Athanasopoulos, Forecasting: Principles and Practice, 2nd ed. Australia: OTexts, 2018.
R. Casado-Vara, A. Martin del Rey, D. Pérez-Palau, L. De-la-Fuente-ValentÃn, and J. M. Corchado, “Web Traffic Time Series Forecasting Using LSTM Neural Networks with Distributed Asynchronous Training,†Mathematics, vol. 9, no. 4, p. 421, Feb. 2021, doi: 10.3390/math9040421.
H. Park, “MLP modeling for search advertising price prediction,†J. Ambient Intell. Humaniz. Comput., vol. 11, no. 1, pp. 411–417, 2020, doi: 10.1007/s12652-019-01298-y.
M. Moocarme, M. Abdolahnejad, and R. Bhagwat, The Deep Learning with Keras Workshop. Birmingham: Packt, 2020. [Online]. Available: https://www.packtpub.com/product/the-deep-learning-with-keras-workshop/9781800562967?_ga=2.203383377.1142999647.1658296011-424466472.1657951905
G. Zhou, H. Moayedi, M. Bahiraei, and Z. Lyu, “Employing artificial bee colony and particle swarm techniques for optimizing a neural network in prediction of heating and cooling loads of residential buildings,†J. Clean. Prod., vol. 254, p. 120082, May 2020, doi: 10.1016/j.jclepro.2020.120082.
N. Golenvaux, P. G. Alvarez, H. S. Kiossou, and P. Schaus, “An LSTM approach to Forecast Migration using Google Trends,†May 2020, doi: 10.48550/arxiv.2005.09902.
X. Song et al., “Time-series well performance prediction based on Long Short-Term Memory (LSTM) neural network model,†J. Pet. Sci. Eng., vol. 186, p. 106682, Mar. 2020, doi: 10.1016/j.petrol.2019.106682.
Q. Chen, W. Zhang, and Y. Lou, “Forecasting Stock Prices Using a Hybrid Deep Learning Model Integrating Attention Mechanism, Multi-Layer Perceptron, and Bidirectional Long-Short Term Memory Neural Network,†IEEE Access, vol. 8, pp. 117365–117376, 2020, doi: 10.1109/ACCESS.2020.3004284.
A. Botalb, M. Moinuddin, U. M. Al-Saggaf, and S. S. A. Ali, “Contrasting Convolutional Neural Network (CNN) with Multi-Layer Perceptron (MLP) for Big Data Analysis,†Nov. 2018. doi: 10.1109/ICIAS.2018.8540626.
R. N. Ihsan, S. Saadah, and G. S. Wulandari, “Prediction of Basic Material Prices on Major Holidays Using Multi-Layer Perceptron,†J. MEDIA Inform. BUDIDARMA, vol. 6, no. 1, p. 443, Jan. 2022, doi: 10.30865/mib.v6i1.3508.
M. A. Ghorbani, R. C. Deo, V. Karimi, M. H. Kashani, and S. Ghorbani, “Design and implementation of a hybrid MLP-GSA model with multi-layer perceptron-gravitational search algorithm for monthly lake water level forecasting,†Stoch. Environ. Res. Risk Assess., vol. 33, no. 1, pp. 125–147, Jan. 2019, doi: 10.1007/s00477-018-1630-1.
A. Sherstinsky, “Fundamentals of Recurrent Neural Network (RNN) and Long Short-Term Memory (LSTM) network,†Phys. D Nonlinear Phenom., vol. 404, p. 132306, Mar. 2020, doi: 10.1016/j.physd.2019.132306.
D. Wei, “Prediction of Stock Price Based on LSTM Neural Network,†in Proceedings - 2019 International Conference on Artificial Intelligence and Advanced Manufacturing, AIAM 2019, Oct. 2019, pp. 544–547. doi: 10.1109/AIAM48774.2019.00113.
H. Chung and K. Shin, “Genetic Algorithm-Optimized Long Short-Term Memory Network for Stock Market Prediction,†Sustainability, vol. 10, no. 10, p. 3765, Oct. 2018, doi: 10.3390/su10103765.
S. Siami-Namini, N. Tavakoli, and A. S. Namin, “The Performance of LSTM and BiLSTM in Forecasting Time Series,†in Proceedings - 2019 IEEE International Conference on Big Data, Big Data 2019, Dec. 2019, pp. 3285–3292. doi: 10.1109/BigData47090.2019.9005997.
Downloads
Published
Issue
Section
License

This work is licensed under a Creative Commons Attribution 4.0 International License
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under Creative Commons Attribution 4.0 International License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (Refer to The Effect of Open Access).