Browsing by Author "Moodley, Deshendran"
Now showing 1 - 8 of 8
Results Per Page
Sort Options
- ItemOpen AccessA comparison of a factor-based investment strategy and machine learning for predicting excess returns on the JSE(2018) Drue, Stefan; Moodley, DeshendranThis study investigated the application of Machine Learning to portfolio selection by comparing the application of a Factor Based Investment strategy to one using a Support Vector Machine performing a classification task. The Factor Based Strategy uses regression in order to identify factors correlated to returns, by regressing excess returns against the factor values using historical data from the JSE. A portfolio-sort method is used to construct portfolios. The machine learning model was trained on historical share data from the Johannesburg Stock Exchange. The model was tasked with classifying whether a share over or under performed relative to the market. Shares were ranked according to probability of over-performance and divided into equally weighted quartiles. The excess return of the top and bottom quartiles was used to calculate portfolio payoff, which is the basis for comparison. The experiments were divided into time periods to assess the consistency of the factors over different market conditions. The time periods were defined as pre-financial crisis, during the financial crisis, post financial crisis and over the full period. The study was conducted in the context of the Johannesburg Stock Exchange. Historical data was collected for a 15-year period - from May 2003 to May 2018 - on the constituents of the All Share Index (ALSI). A rolling window methodology was used where the training and testing window was shifted with each iteration over the data. This allowed for a larger number of predictions to be made and for a greater period of comparison with the factorbased strategy. Fourteen factors were used individually as the basis for portfolio construction. While combinations of factors into Quality, Value and Liquidity and Leverage categories was used to investigate the effect of additional inputs into the model. Furthermore, experiments using all factors together were performed. It was found that a single factor FBI can consistently outperform the market, a multi factor FBI also provided consistent excess returns, but the SVM provided consistently larger excess returns with a wide range of factor inputs and beat the FBI in 12 of the 14 different experiments over different time periods.
- ItemOpen AccessA semantic Bayesian network for automated share evaluation on the JSE(2021) Drake, Rachel; Moodley, DeshendranAdvances in information technology have presented the potential to automate investment decision making processes. This will alleviate the need for manual analysis and reduce the subjective nature of investment decision making. However, there are different investment approaches and perspectives for investing which makes acquiring and representing expert knowledge for share evaluation challenging. Current decision models often do not reflect the real investment decision making process used by the broader investment community or may not be well-grounded in established investment theory. This research investigates the efficacy of using ontologies and Bayesian networks for automating share evaluation on the JSE. The knowledge acquired from an analysis of the investment domain and the decision-making process for a value investing approach was represented in an ontology. A Bayesian network was constructed based on the concepts outlined in the ontology for automatic share evaluation. The Bayesian network allows decision makers to predict future share performance and provides an investment recommendation for a specific share. The decision model was designed, refined and evaluated through an analysis of the literature on value investing theory and consultation with expert investment professionals. The performance of the decision model was validated through back testing and measured using return and risk-adjusted return measures. The model was found to provide superior returns and risk-adjusted returns for the evaluation period from 2012 to 2018 when compared to selected benchmark indices of the JSE. The result is a concrete share evaluation model grounded in investing theory and validated by investment experts that may be employed, with small modifications, in the field of value investing to identify shares with a higher probability of positive risk-adjusted returns.
- ItemOpen AccessAn analysis of the performance and interpretability of machine learning classification algorithms to predict long-term share returns on the JSE(2024) Boakes, Jamie; Moodley, DeshendranThe prediction of long-term share returns is an essential yet complex task in financial analysis and formulating investment strategy. Machine learning is a promising approach for improving the accuracy of these predictions. However, the outputs of machine learning models are not transparent or interpretable, which limits their usability for real-world decision making. There is a lack of research on the use of machine learning algorithms to predict long-term share returns on the Johannesburg Stock Exchange (JSE), with no studies that specifically examine the interpretability of machine learning algorithms. This study investigates the use of machine learning algorithms to predict long-term share returns on the JSE based on fundamental data and analyses the interpretability of the top performing algorithms. Based on a review of the literature, eight machine learning classification algorithms were selected and compared to predict tercile class 12-month share returns using fundamental data, spanning a period of two decades. The XGBoost, Random Forest, and GradBoost algorithms were found to outperform the Support Vector Classifier, Logistic Regression, Decision Tree, Artificial Neural Network, and AdaBoost algorithms. XGBoost and Random Forest were further investigated using SHAP (SHapley Additive exPlanations) global summary plots to identify the most influential input features and to analyse the interpretability of these algorithms. The study found that ensemble-based classification algorithms, i.e. XGBoost, Random Forest and GradBoost, outperformed the other algorithms. Further analysis of the results varied, with some sectors outperforming the overall market. An analysis of the input features identified the most important valuation and profitability ratios that contributed to prediction performance, and thus improves the transparency and interpretability of the models. This research is the first to comprehensively compare and analyse the interpretability of machine learning algorithms to predict long-term share returns on the JSE.
- ItemOpen AccessAnalysis of Machine Learning Algorithms for Time Series Prediction(2021) Naidoo, Kimendree; Moodley, DeshendranDue to the rapidly increasing prominence of Artificial Intelligence in the last decade and the advancements in technology such as processing power and data storage, there has been increased interest in applying machine learning algorithms to time series prediction problems. There are many machine learning algorithms that can be used for time series prediction problems but selecting an algorithm can be challenging due to algorithms not being suitable to all types of datasets. This research investigates and evaluates machine learning algorithms that can be used for time series prediction. Experiments were carried out using the Artificial Neural Network (ANN), Support Vector Regressor (SVR) and Long Short-Term Memory (LSTM) algorithms on eight datasets. An empirical analysis was carried out by applying each machine learning algorithm to the selected datasets. A critical comparison of the algorithm performance was carried out using the Mean Absolute Error (MAE), the Mean Squared Error (MSE), the Root Mean Squared Error (RMSE) and the Mean Absolute Scaled Error (MASE). The second experiment focused on evaluating the stability and robustness of the optimal models identified in the first experiment. The key dataset characteristics identified; were the dataset size, stationarity, trend and seasonality. It was found that the LSTM performed the best for majority of the datasets, due to the algorithm's ability to deal with sequential dependency. The performance of the ANN and SVR were similar for datasets with trend and seasonality, while the LSTM overall proved superior to the aforementioned algorithms. The LSTM outperformed the ANN and SVR due to its ability to handle temporal dependency. However, due to its stochastic nature, the LSTM and ANN algorithms can have poor stability and robustness. In this regard, the LSTM was found to be a more robust algorithm than the ANN and SVR.
- ItemOpen AccessArtificial neural networks to predict share prices on the Johannesburg stock exchange(2021) Pyon, Freddie; Moodley, DeshendranThe use of historical data to build models for stock market prediction has been extensively researched. Artificial Neural Networks (ANNs) bring new opportunities for predicting stock markets, and is now one of the leading techniques used for time series and specifically stock market prediction. This study explored the application of ANNs to predict share prices in the banking sector of the South African Johannesburg Stock Exchange (JSE). This study used three companies, i.e. Standard Bank, Nedbank and First National Bank, listed on the JSE as case studies for the use of ANNs for predicting the closing share price for the next day, week and month. Historical share price data from the JSE was integrated with datasets of external factors that influence market. The external factors considered in this study include index data from NASDAQ, the JSE top 40 and all share indexes, the exchange rate and the business cycle indicator (BCI) values from the South African Reserve Bank. Comparative analysis were conducted between traditional regression models and ANN models using the lagged share price as input variable. The effect on prediction performance of using external factors as additional input variables was also explored. The ANN models using only the share price was found in general to perform better than both traditional models and ANNs that used the external factors as additional input variables. The average next month prediction model produced a noticeably smaller prediction error compared to the next week, and next day prediction models for all three banks. The results showed that the introduction of external factors as additional input variables did not lead to an improved prediction performance, over models that used only the share price. This study also highlights the importance of using an appropriate validation method and evaluating model stability for evaluating and developing ANN models for share price prediction in time series data. The results contribute to existing research that indicate that an ANN is more effective than a regression method for predicting banking share prices, and that these predictive models have potential for supporting investment decision making.
- ItemOpen AccessGenerative adversarial networks for fine art generation(University of Cape Town, 2020) Berman, Alan; Moodley, DeshendranGenerative Adversarial Networks (GANs), a generative modelling technique most commonly used for image generation, have recently been applied to the task of fine art generation. Wasserstein GANs and GANHack techniques have not been applied in GANs that generate fine art, despite their showing improved GAN results in other applications. This thesis investigates whether Wasserstein GANs and GANHack extensions to DCGANs can improve the quality of DCGAN-based fine art generation. There is also no accepted method of evaluating or comparing GANs for fine art generation. DCGAN's, Wasserstein GANs' and GANHack techniques' outputs on a modest computational budget were quantitatively and qualitatively compared to see which techniques showed improvement over DCGAN. A method for evaluating computer-generated fine art, HEART, is proposed to cover both the qualities of good human-created fine art and the shortcomings of computer-created fine art, and to include the cognitive and emotional impact as well as the visual appearance. Prominent GAN quantitative evaluation techniques were used to compare sample images these GANs produced on the MNIST, CIFAR-10 and Imagenet-1K image data sets. These results were compared with sample images these GANs produced on the above data sets, as well as on art data sets. A pilot study of HEART was performed with 20 users. Wasserstein GANs achieved higher visual quality outputs than the baseline DCGAN, as did the use of GANHacks, on all the fine art data sets and are thus recommended for use in future work on GAN-based fine art generation. The study also demonstrated that HEART can be used for the evaluation and comparison of art GANs, providing comprehensive, objective quality assessments which can be substantiated in terms of emotional and cognitive impact as well as visual appearance.
- ItemOpen AccessInvestigation of brain ageing in HIV-positive individuals using convolutional neural networks(2024) Catzel, Rachel; Shock, Jonathan; Moodley, DeshendranDevelopments in the field of Deep Learning (DL) have provided new means of tracking healthy ageing, and have established DL-predicted brain age as an accurate and reliable biomarker for brain health. Deviations from a healthy brain ageing trajectory, indicated by an increased predicted brain age relative to chronological age, and thus positive brain age delta, have been associated with cognitive impairments. This thesis focuses on de veloping a robust brain age prediction model to investigate brain ageing in HIV-positive individuals. We utilise the UK Biobank, CamCAN, and ENIGMA-HIV datasets for this task and train a convolutional neural network in two stages. First, we pre-train the model on the large UK Biobank dataset (N=21366) which contains individuals in the age range of 45-82 years. To this end, we achieve a mean absolute error (MAE) of 2.57±1.94 years. Next, we fine-tune the pre-trained model on a smaller dataset, with a wider age range, aligned with that of our testing dataset from ENIGMA-HIV. We select the CamCAN dataset (N=484) for this, with individuals spanning the age range of 18-88 years. We obtain an MAE of 3.54 ± 2.59 years on the holdout CamCAN test set, substantially im proving upon the 6.38 ± 5.30 years MAE achieved without pre-training. We then apply the trained model to the multi-site ENIGMA-HIV testing dataset which we have har monised to remove inter-site variation. Following testing, we apply a fixed-effects model to analyse whether the brain age deltas are significantly higher in HIV-positive individu als compared to HIV-negative controls. Although no statistically significant difference is found in the brain age deltas due to HIV status, further analysis reveals significant cor relations between the brain age deltas and specific HIV clinical measures, in particular, nadir CD4 count and current CD4 count. This thesis's findings contribute to under standing the impact of HIV on brain ageing and associated factors of significance, and highlights the value of DL techniques in medical research.
- ItemOpen AccessSaliency Mapping in Convolutional Neural Networks to Determine Brain Age Trajectories(2022) Taylor, Daniel; Shock, Jonathan; Moodley, DeshendranBrain Age (BA) estimation via Deep Learning has become a strong and reliable bio-marker for brain health, but the black-box nature of Neural Networks does not easily allow insight into the causal features of brain ageing. In this work, a ResNet model was trained as a BA regressor on T1 structural brain MRI volumes from a small cross-sectional cohort of 524 individuals. Using Layer-wise Relevance Propagation (LRP) and DeepLIFT saliency mapping techniques, analyses were performed on the trained model to determine the most revealing structures over the course of brain ageing for the network, and compare these between the saliency mapping techniques. This work shows the change in attribution of relevance to di erent brain regions through the course of ageing. A tripartite pattern of relevance attribution to brain regions emerges. Some regions increase in relevance with age (e.g. the right Transverse Temporal Gyrus, known to be a ected by healthy ageing); some decrease in relevance with age (e.g. the right Fourth Ventricle, known to dilate with age); and others remained consistently relevant across ages. This work also examines the e ect of Brain Age Delta (DBA) on the distribution of relevance within the brain volume, for both older and younger individuals. It is hoped that these ndings will provide clinically relevant region-wise trajectories for normal brain ageing, and a baseline against which to compare brain ageing trajectories.