Using backtesting over 25 years of US stock market data, the significance of various 'value' stock metrics as an indicator of a stocks potential return was investigated. This was done using Python scripts which would select a basket of X stocks each year with the 'highest value' as decided through an algorithm. This algorithm can be implemented by the user (within the function 'weighting_function') as some function of PE, ROC, dividend yield (DY), market capitalization, earnings yield and debt-equity (DE) ratio. It was found that when maximizing the function: f = ROC - 2 DE + 2 DY annually, a CAGR of 18.74%/15.04% (less fees) would have been achieved by holding 5/10 stocks annually. A large-cap survivorship bias was also noticed during the study (where a stock was not invested in during a given year if the following years data was not available) which lead to incorrect, high return before this was fixed. Finally, the effect of increasing the number of stocks in a portfolio has on volatility was also analysed. It was found that a portfolio of 30 stocks was sufficient to significantly reduce the volatility of returns (within 10% of the overall market volatility). Within this repository:
'Main_Code.py': The Python script used to backtest algorithm based value investing techniques. The Excel file 'BIG_DATA_SET.xlsx' is read in which was downloaded from Wharton Research Data Services - the most complete free stock database I was aware of - to the script and various extra metrics are calculated. The annual stocks required are then determined by the afformentioned weighting function and plots are produced to compare how the technique performs in comparison to the S&P 500. The volatility of returns was also calculated.
'Summary of Results.pptx': A brief powerpoint presentation highlighting the main findings of the study. Several other metrics/techniques were investigated but the most interesting are displayed here.