Trend following plays an important role in technical analysis for trading financial instruments. In this paper, we propose a model based on Float-encoding Genetic Algorithm (FGA) to determine the best thresholds for trend following in financial time series. Trend following is based on the thresholds called P&Q which is calculated from the amount of an uptrend and downtrend to determine when to buy and sell at a particular time point. In our model, we first smooth the closing price by Exponential Moving Average (EMA) and partition the sample data into two parts respectively for training and testing. During the training session, FGA is used to find the best P&Q values which optimizes the average return based on a chosen EMA. The resulted P&Q is then evaluated against the testing data. Experiments conducted on Hang Sang Index (HSI) from Hong Kong shows promising results.
展开▼