Forecasting stock returns is an exacting prospect in the context of financial time series. This study proposes a unique decision-making model for day trading investments on the stock market. In this regard, the model was developed using a fusion approach of a classifier based on machine learning, with the support vector machine (SVM) method, and the mean-variance (MV) method for portfolio selection. The model's experimental evaluation was based on assets from the São Paulo Stock Exchange Index (Ibovespa). Monthly rolling windows were used to choose the best-performing parameter sets (the in-sample phase) and testing (the out-of-sample phase). The monthly windows were composed of daily rolling windows, with new training of the classifying algorithm and portfolio optimization. A total of 81 parameter arrangements were formulated. To compare the proposed model's performance, two other models were suggested: (i) SVM + 1/N, which maintained the process of classifying the trends of the assets that reached a certain target of gain and which invested equally in all assets that had positive signals in their classifications, and (ii) Random + MV, which also maintained the selection of those assets with a tendency to reach a certain target of gain, but where the selection was randomly defined. Then, the portfolio's composition was determined using the MV method. Together, the alternative models registered 36 parameter variations. In addition to these two models, the results were also compared with the Ibovespa's performance. The experiments were formulated using historical data for 3716 trading days for the out-of-sample analysis. Simulations were conducted without including transaction costs and also with the inclusion of a proportion of such costs. We specifically analyzed the effect of brokerage costs on buying and selling stocks on the Brazilian market. This study also evaluated the classifier's performance, portfolios’ cardinality, and models’ returns and risks. The proposed main model showed significant results, although demand for trading value can be a limiting factor for its implementation. Nonetheless, this study extends the theoretical application of machine learning and offers a potentially practical approach to anticipating stock prices.
Predicting stock returns is considered to be one of the most challenging tasks when dealing with financial time series because the stock market is dynamic, complex, evolutionary, nonlinear, nebulous, nonparametric, and chaotic by nature. Additionally, the stock market is extremely sensitive to political factors, microeconomic and macroeconomic conditions, and investors’ expectations and insecurities (Ballings, Van den Poel, Hespeels, & Gryp, 2015; Kara, Boyacioglu, & Baykan, 2011; Tan, Quek, & Ng, 2007). According to mainstream financial theory, predicting financial asset prices is impossible. The efficient market hypothesis (EMH), which is the literature’s main theoretical pillar, suggests that the task of predicting future prices based on financial assets’ past behavior cannot achieve abnormal returns. The reason is that the distribution function of a financial time series denotes a Brownian motion, which has random, independent, and Gaussian distribution characteristics. However, some studies reject the EMH, arguing that the stock market is not actually established at random and that financial time series have long-term memory. For example, recent studies dispute the EMH in the context of different markets and periods. Cervelló-Royo, Guijarro, and Michniuk (2015) showed empirical evidence that compromises the premise of the EMH. The authors researched the intraday markets of the American Dow Jones Industrial Average (DJIA) index, the German Deutscher Aktien 30 Index (DAX), and the British Financial Times Stock Exchange (FTSE) index from 2000 to 2013. By using a methodology based on flag patterns, they tested 96 different configurations. The results were very profitable for all the markets. Chourmouziadis and Chatzoglou (2016) researched daily data from the Athens Stock Exchange from 1996 to 2012. They combined technical analysis and fuzzy logic. The profitability results of the proposed methodology were surprisingly higher than the baselines. Kim and Enke (2016) studied the intraday data of the Korea Composite Stock Price Index (KOSPI) 200 from 2007 to 2014. They formulated a set of rules based on technical analysis combined with genetic algorithms and reported abnormal profits. Chen and Chen (2016) proposed a model based on flag patterns for recognizing bullish reversal patterns. They tested the strategy with the National Association of Securities Dealers Automated Quotation System (NASDAQ) from 1989 to 2004 and with the Taiwan Capitalization Weighted Stock Index (TAIEX) from 1990 to 2004. The results showed high levels of profitability. Kampouridis and Otero (2017) studied the intraday foreign exchange market, analyzing a 10-month period between 2013 and 2014. They proposed a model that combined technical indicators, physical time scales, and genetic algorithms. The results guaranteed higher returns than those of the baselines.