Strojniški vestnik - Journal of Mechanical Engineering 59(2013)9, 511-516 © 2013 Journal of Mechanical Engineering. All rights reserved. D0l:10.5545/sv-jme.2013.947 Original Scientific Paper Received for review: 2013-01-02 Received revised form: 2013-06-06 Accepted for publication: 2013-06-12 Freight-Forward Agreement Time series Modelling Based on Artificial Neural Network Models Dimitrios Lyridis1, - Panayotis Zacharioudakis1 - Stylianos Iordanis1 - Sophia Daleziou2 1 National Technical University Athens, Greece 2 National Technical University of Athens, School of Applied Mathematical and Physical Sciences, Greece Over the last thirty years, there has been an extraordinary growth in the financial derivatives market, in the field of shipping. This can be attributed to the fact that financial derivatives are contracts that allow all players participating in the shipping market to reduce their exposure to fluctuations in freight rates, bunker prices, interest rates, foreign exchange rates and vessel values. This paper employs an artificial neural network (ANN) in order to forecast the future price of freight derivatives. More specifically, drawing on historical data for the period between January 2005 and March 2009, an ANN is built and trained, and its estimates lead to two individual results. The resulting model indicates to the investor which position to take in the derivatives market (short for sale of agreements and long for the purchase of agreements). Keywords: freight rates, trading strategy, artificial neural networks, shipping market modelling, freight rate forecasting 0 INTRODUCTION Artificial neural networks are a technology that has been adopted in many disciplines, including neuroscience, mathematics, statistics, physics, computer science and engineering. Their ability to learn from data has endowed them with powerful properties and has made them invaluable tools in financial forecasting. This is a challenge for researchers worldwide: much effort has been made using ANNs to design a trading system for profitable movements in the market. However, few people would dare invest their money according to the forecasts of a neural network that has been trained using historical data, as it is widely believed that is impossible to predict the dynamics of an economy [1]. Here, it should be noted that any attempt to create a neural network about financial variables will necessarily draw on historical time series data. The main purpose of this process is to draw conclusions about the future evolution of the variable being studied, and the most ambitious goal is to detect predictable patterns for future values. An important advantage offered by ANNs is that they can constantly enrich their knowledge with new information resulting from new market conditions. The decisive factor is the volatility of the market being studied, as the bigger the market, the shorter the period during which the new data will be valid. In other words, the success rates of an ANN forecasting market trends for a specific time period are inversely analogous to the market's growth rates. However, training an ANN with the use of time series data has been proven to be successful in such applications; therefore, it may be possible to build a system to successfully forecast the evolution of economic indicators. Extensive literature in the shipping market and shipping derivatives [2] to [4] describe in detail the statistical and stochastic background of shipping derivatives, along with their uses regarding their pricing, and time series properties of the underlying dynamics governing the fluctuations of freight rates. Risk management, i.e. hedging, may be the primary theoretical use of freight derivatives, and this topic is the main focus of the related bibliography. However, speculation, i.e. directional trading, is the most popular application of shipping and other derivatives; the related academic research and literature is, however, not as rich. Li and Parsons [5] were the first to attempt applying neural network modelling within the context of crude oil freight rate prediction for the Mediterranean line (Med-Med) using data from 1980 to 1995 and three variables: the actual rate time series, demand index for tankers and Drewry's total active tanker capacity. To compare the results, the researchers also developed two parallel auto regressive moving average (ARMA) models. The study showed that the prediction with neural networks proved much more capable of dealing with the excessive discontinuities of the time series. The ANN performance was better than the ARMA models in all cases, and this was even clearer for longer-term forecasts. Alizadeh and Nomikos [3] also present a technical analysis framework for freight trading strategies based on technical trading rules using moving average (MA) crossover divergence / stochastic oscillators, moving average envelopes, Bollinger bands, momentum *Corr. Author's Address: National Technical University Athens, Laboratory for Maritime Transport, dsvlr@mail.ntua,gr 511 trading model, or spread trading in freight forward agreement markets. However, if we compare the two approaches, neural networks are a vastly more powerful methodology than technical heuristics, as they incorporate artificial intelligence potential and universal function approximator properties. The following study focuses on freight futures, in terms of the type of the derivative product. It is based on three-month agreements for a specific dry freight transportation route issued by IMAREX, according to the Baltic Exchange indexes. Hence, the system to be designed should forecast fluctuations in the prices of freight futures, in relation to changes in freight rates at the spot market, and thus create forecasts that lead to profitable investment actions. Lastly, it will be possible to acquire new forecast results generated on a daily basis, after the necessary data, similar to those used to train the network, have been entered. The rest of the paper is organized as follows: The role of derivatives in the shipping market is presented in Section 1. Section 2 provides the criteria for selecting the data, the implementation of the methodology and the results. In the last section, the conclusions of the paper are discussed. 1 DERIVATIVES AND SHIPPING Freight derivatives or freight forward agreements (FFAs) were developed. aiming at managing (in a more efficient, cost-effective and flexible manner) risks resulting from fluctuations in freight rates, the cost of storage, ship prices, scrap prices, interest rates, and foreign exchange rates [2]. FFAs can be defined as future agreements whereby the two parties undertake to buy or sell the transportation of bulk cargo from one location to another at a price established at the time of closing the agreement. The settlement is in cash, so there is no physical delivery. Payment is made on a specific date agreed upon by the two parties. For the settlement of FFAs, the London Baltic Exchange Baltic Dry Index (BDI) and Baltic International Tanker Routes (BITR) are taken into account. The first FFAs appeared in 1985, when the Baltic International Freight Futures Exchange (BIFFEX) agreement was created. It was an agreement with underlying average index the Baltic Freight Index (BFI) of the Baltic Exchange. Following that, and due to market segmentation, many individual BFIs made their appearance. They made their first appearance as private agreements between two parties traded over the counter in 1992. The increased capital liquidity prevailing in the shipping market, the ease of creating standardized agreements offered by sea transportation (regarding bulk cargos, routes and ship sizes), the fact that the shipping market is subject to a common valuation structure / methodology, and generally increased transparency are all factors that have contributed to the success of derivatives in shipping. Such products are already traded over the counter (OTC) at the clearing houses of London and Oslo. Shipping companies, as well as energy companies, use freight derivatives in order to cope with changes in freight rates and these contracts are now considered to be the most rapidly growing area of the shipping industry. FFAs, which should be mentioned for the understanding of this paper, fall under the following categories: Freight Forward Agreements: Private agreements entered into mainly by and between ship owners and shippers, and aim at hedging against the volatility of the freight market. In this case, the ship owner takes a short position and sells FFAs, whereas the shipper is the buyer (long position). Freight Futures: The principle behind this instrument is the same as above; however, they are traded in organized markets, such as IMAREX and NYMEX. Hence, like all derivatives, FFAs are also used for hedging, speculative and arbitrage purposes. 2 METHODOLOGY AND RESULTS The artificial neural network to be built will be based on Dry Bulk Routes. Table 1 shows the routes of IMAREX for the issue of dry bulk routes, and the route basket selected for use in the research part of this paper (Routes are grouped in baskets based on the type of the ship to which each route refers. Hence, the names of the BCI, BPI, BHI and BSI indexes come from Capesize, Panamax, Handymax and Supramax, respectively). Data about quarterly freight futures prices and the daily spot prices for the specific route basket have been collected. Such figures are given in time charter (T/C) in $/day. The data range is the period between 4 January 2005 and 13 March 2009. For each day, we have: • The asset spot price (freight), • The asset future price for the next quarter. Table 1. IMAREX Dry Bulk Routes IMAREX listed single route and basket of T/C dry bulk futures Routes Sector Route Description Cargo Size (tons) C4 Capesize Richards Bay - Rotterdam 150000 C7 Capesize Bolivar - Rotterdam 150000 P2A Panamax T/C Skaw Gibraltar - Far East 74000 P3A Panamax T/C South Korea - Japan Pacific R/V 74000 Panel B: listed basket of T/C dry-bulk futures CS4TC Capesize T/C Average n/a PM4TC Panamax T/C Average n/a HM6TC Handymax T/C Average n/a For each of the days in the database, the investor's profit or loss is calculated as follows: • If X denotes the trading day and trade price (TP) the price of the three-month future agreement on day X; • If Avgi, Avg2, Avg3 denote the average of the spot prices for the 1st, 2nd, and 3rd month respectively; • If the investor takes a short position (by selling FFAs). Then, the trading signal function is defined as: Profit = (TP - Avg1)x31 + (TP - Avg2)x30 + + (TP - Avg3)x31. If Profit > 0, taking a short position is a correct trading signal. If Profit < 0, taking a long position is a correct trading signal. For the ANN to be trained, the largest possible number of time series is needed, which will be directly or indirectly correlated to freight rate fluctuations being the input variables, whereas profit is the output (desired) variable. These time series as well as all data used in this paper were taken from Clarkson Research Services [6]. Initially, the time series data were monthly, weekly or daily, depending on their fluctuation rate. The first processing of such time series involved the reduction to daily time series as a whole by linear interpolation of new data. Such conversion is necessary, as the desired results are given for each day of operation of the stock market, and in order to train the ANN with the same input data. Forty-seven time series were taken from Clarkson Research Services. Out of these, only six were selected to train the ANN, otherwise the problem would have been exceedingly complex. Hence, a decisive factor in the selection of the suitable time series to be used to train the system is the correlation coefficient, or more simply their correlation with the desired variable (profit). The correlation coefficient is used to measure the strength of the relationship between two variables x, y. Given n pairs of observations (xi,yi) we can compute the correlation coefficient r as: where sxy = Cov (x,y), the covariance between the variables x, y, sx, sy is the standard deviation. As a result, Z (xi- x) ■ (y-- y) Z xiy-- n ■x ■ y n -1 n-1 where -y ( x - -i tr1 x)2 and n-1 Z(* -*)2. Finally, Z( xi- x) ■( y - y) Z (X - x)2 (y - y )2 Z xiyi - n ■ x ■ y yZ x2 - n •x ^Z y2 - n • y The correlation coefficient lies between -1 and +1. r > 0 indicates a positive linear relationship between the two variables and r < 0 a negative linear relationship between x, y. r = 0 indicates no linear relationship between x, y. Lastly, the prerequisites that need to be met by the final time series to be used in training the network are summarized as: • Coefficient of correlation of the TS time series with the output time series > 0.20. • Coefficient of correlation among TSi time series < 0.80. The rationale behind these two heuristics is that we keep mathematically irrelevant candidate s xy r = s = xy 1 S = 1 sy = s xy r = explanatory variables out of the model, i.e. when the coefficient of correlation with the target variable is too low, but we also exclude any highly correlated explanatory variables in order to eliminate colinearity issues in the modelling process. The time series considered to be the most important are: capesize bulker orderbook number, capesize bulk carrier fleet development, capesize scrap value, one-year time charter rate 170,000 dwt bulk carrier, capesize bulker contracting number, capesize sales, capesize bulk carrier deliveries number, capesize bulk carrier new building prices. Hence, after a first filtering of the data using calculations for their correlation with desired output, these are next tested in various combinations as to their contribution in the performance of a neural network. The first step is then to create the network. The network was created using the software package NeuroSolutions v. 5, which allows entering data directly from Excel worksheets without particular processing, and, of course, aids in the design of an ANN [7]. Fig. 1. The four alternative ANN possible feed-forward modular connection topologies in the case of 2 hidden layers This paper employs modular neural networks. These networks are a special class of multi-layer perceptron (MLP) feed-forward artificial neural network model corresponding to input data maps. These networks process their input using several parallel MLPs, and then recombine the results. Such networks are more suitable for time series prediction of non-linear economic fundamentals. A more technical discussion on ANNs can be found in [8] and Fig. 2. The success rates of the four modular topologies Fig. 3. The MSE values of the four modular topologies Fig. 4. Network's Topology Testl_2_l Testl_2_2 Testl_2_3 Testl_2_4 Fig. 5. The success rates using 1,2,3 and 4 hidden layers Testl_2_l Testl_: Fig. 6. The MSE values using 1,2,3 and 4 hidden layers [9]. More recent application of ANN can also be found in [10] and [11] with applications in many disciplines. There are four modular topologies concerning the interaction between the layers, as shown in Fig. 1. Experimentations were carried out with all potential combinations of the above time series and modular topologies. The correlation coefficient between the employed time series and the output data is shown in Table 2. The initial step for designing any neural network is to collect the training data; the selection of testing and cross validation data follows. The testing set is used to test the performance of the network, and cross validation is used as a highly recommended method for stopping the network training. This method monitors the error of the independent set of data and stops training when this error begins to increase. This is considered to be the optimal point for generalization. The appreciation of a network is not based only on its success rates but also on the mean square error 1 N (MSE) of the results. The MSE (MSE = e2 ) of a prediction is one of the ways of quantifying the difference between the predicted and the true value of the variable being estimated [12]. Based on the above, four modular topologies were initially used with a default number of layers (two), in order to find which of these topologies have the highest success rates and the minimum error. The results are illustrated in Figs. 2 and 3. It is obvious that the second network provides the best results with the minimum error. The topology of this network is given in Fig. 4. The results of this specific topology were tested using different number of hidden layers (1, 2, 3, 4) as set out in Figs. 5 and 6. It is the network with the four hidden layers that seems to be the most successful. The graphic representation of the final network results is given in Figs. 7 and 8. The 85% success rate of the testing set refers to the percentage at which the two lines are above or below the x-axis at the same time. 3 CONCLUSION It is a fact that neural networks employed for forecasting the evolution of freight derivatives can become an invaluable tool, capable of leading to successful investments, as also explained in the literature (for additional cases and discussion, please also see [13] and [14]). However, the forecast must always play an auxiliary part and be used carefully. It should not be forgotten that such models are actually self-learned, based on the past in order to forecast the future, which could hide unexpected events. Ideally, their use is recommended in conjunction with empirical knowledge and human judgment, especially during periods when fundamental structural breaks take place. The quantitative findings of the models developed above have shown that the applied Connectionist models fit well to the underlying dynamics of the time Table 2. Correlation between the input and output variables TS FUTURE SPOT TS1 TS2 TS3 TS4 TS5 TS6 r -0.380 -0.406 -0.215 -0.264 0.430 0.318 -0.168 -0.550 Exemplar Fig. 7. The network output (in $) of the training set; desired output and actual network output Exemplar Fig. 8. The network outputs of the test set series, yielding satisfactory accuracy capable of a high success rate when implementing the models within a trading strategy context. The methodology can easily be expanded to multivariate models forecasting vector time series, i.e. it can be generalized to model multiple system variables of the shipping market and also be adapted to forecast the price and time of the market for other financial instruments. MLP architecture is definitely qualified to handle any such task if applied with the appropriate level of complexity regarding the number of layers and given sufficient computational power, and if we attempt to enhance the model with more exogenous explanatory variables and dependent variables. The whole model architecture will be tested in future research for modelling composite indices consisting of equally weighted equity price time series of returns of various shipping companies. Possible practical applications can be found within the context of commodity trading advisor (CTA) funds, commodity trading and shipping companies; companies seeking to outperform classic heuristic technical methods as practised by the majority of market participants, given that there is currently an "arms race" in sophistication of quantitative tools of traders. 4 REFERENCES [1] Haykin, S. (1999). Neural Networks: A Comprehensive Foundation. 2nd ed. Prentice Hall, Upper Saddle River. [2] Hunt, P. J., Kennedy, J.E. (2004). Financial Derivatives in Theory and Practice. Revised ed. John Wiley & Sons, Chichester, D01:10.1002/0470863617.fmatter. [3] Alizadeh, A.H., Nomikos, N.K. (2009). Shipping derivatives and risk management. Palgrave Macmillan, New York, D0I:10.1057/9780230235809. [4] Helyette, G. (ed.) (2008). Risk Management in Commodity Markets: From Shipping to Agriculturals and Energy. John Wiley & Sons Inc., Hoboken Clarkson Research Services, from: http://www.crsl. com, accessed on 2012-12-1. [5] Li, J., Parsons, M.J. (1997). Forecasting tanker freight rates using neural networks. Maritime Policy & Management, vol. 24, no. 1, p. 9-30, D01:10.1080/03088839700000053. [6] Principe, C.J., Euliano, R.N., Lefebvre, W.C. (2000). Neural and Adaptive Systems: Fundamentals through Simulations. Wiley & Sons Inc., Chichester. [7] Uran, S., Safaric, R. (2012). Neural-network estimation of the variable plant for adaptive sliding-mode controller. Strojniški vestnik - Journal of Mechanical Engineering, vol. 58, no. 2, p. 93-101, DOI: 10.5545/ sv-jme.2011.098. [8] Florjanic, B., Govekar, E., Kuzman, K. (2012). Neural network-based model for supporting the expert driven project estimation process in mold manufacturing. Strojniški vestnik - Journal of Mechanical Engineering, vol. 59, no. 1, p. 3-13, D0I:10.5545/sv-jme.2012.747. [9] Li, J., Burke, E.K., Qu, R. (2011). Integrating neural networks and logistic regression to underpin hyper-heuristic search. Knowledge-Based Systems, vol. 24, no. 2, p. 322-330, D0I:10.1016/j.knosys.2010.10.004. [10] Casta-o, A., Fernández-Navarro, F., Gutiérrez, P.A., Hervás-Martínez, C. (2012). Permanent disability classification by combining evolutionary Generalized Radial Basis Function and logistic regression methods. Expert Systems with Applications, vol. 39, no. 9, p. 8350-8355, D0I:10.1016/j.eswa.2012.01.186. [11] Kleinbaum, D.G., Kupper, L.L., Nizam, A., Muller, K.E. (2007). Applied Regression Analysis and Other Multivariate Methods. 4th ed. Thomson Learning, Inc., Belmont. [12] Marose, R.A. (1990). A financial neural network application. AI Expert, vol. 5, p. 50-53. [13] White, H. (1988). Economic prediction using neural networks: The case of IBM daily stock returns. IEEE International Conference on Neural Networks, vol. 2, p. 451-458, D0I:10.1109/ICNN.1988.23959