To install the required packages for this project, you can use the requirements.txt file that lists all the dependencies.
First, ensure that you have Python installed on your system. This project requires Python version 3.6 or higher.
To install the packages listed in requirements.txt, open a terminal window and navigate to the directory where the file is located. Then, run the following command:
pip install -r requirements.txt
This will install all the packages and their dependencies listed in requirements.txt.
If you encounter any errors during the installation, please ensure that you have the necessary permissions to install packages on your system. Additionally, some packages may require additional dependencies or system configurations, so please refer to the package documentation for further instructions.
Once the packages are installed, you can run the project using a Python IDE or by running the appropriate command-line script.
The project uses the 10-k and 10-q reports to extract the following data:
- EBITDA Yield (EBITDA/Enterprise Value)
- Free cash flow (FCF) Yield (FCF/Enterprise Value)
- Earnings Yield (Earnings before interest and taxes/Enterprise value)
- Liquidity (Qi) (Adjusted profits/yearly trading value)
- Price to free cash flow (P/FCF)
- Price to Sales
- Speculative v. Fundamentalist ratio
A variety of data sets that can be used for this project, including:
- Nasdaq: https://finance.yahoo.com/quote/%5EIXIC/history/
- S&P 500: https://finance.yahoo.com/quote/%5EGSPC/history/
- Euronext: https://finance.yahoo.com/quote/%5EN100/history/
- Dow 30: https://finance.yahoo.com/quote/%5EDJI/history/
- NYSE composite: https://finance.yahoo.com/quote/%5ENYA/history?p=%5ENYA
- Cboe UK 100: https://finance.yahoo.com/quote/%5EBUK100P/history?p=%5EBUK100P
- Russell 2000: https://finance.yahoo.com/quote/%5ERUT/history?p=%5ERUT
- Bel 20: https://finance.yahoo.com/quote/%5EBFX/history?p=%5EBFX
- Moex Russia index: https://finance.yahoo.com/quote/IMOEX.ME/history?p=IMOEX.ME
- Nikkei 225: https://finance.yahoo.com/quote/%5EN225/history?p=%5EN225
- Hang Seng index: https://finance.yahoo.com/quote/%5EHSI/history?p=%5EHSI
- SSE composite index: https://finance.yahoo.com/quote/000001.SS/history?p=000001.SS
- Shenzhen composite: https://finance.yahoo.com/quote/399001.SZ/history?p=399001.SZ
- Jakarta composite index: https://finance.yahoo.com/quote/%5EJKSE/history?p=%5EJKSE
These data sets include historical data for various stock market indexes and can be used to generate the technical indicators needed for the correlated assets analysis section of the project.
VADER sentiment analysis is employed on stock-specific news articles to determine their sentiment.
The project incorporates Twitter hedonometer data to gauge overall sentiment on the platform.
FOREX and domestic and foreign indexes are analyzed with the following technical indicators:
- Bollinger bands
- RSI
- MACD
- VWAP
- EMA’s and SMA’s
- Topological analysis
The table below presents the training and test RMSE for the XGBoost, CNN, and GAN models with different sets of features.
Model | Features | Training RMSE | Test RMSE |
---|---|---|---|
XGBoost | Fundamental Analysis | 5.12 | 6.85 |
XGBoost | Sentiment Analysis + Correlated Assets Analysis | 4.86 | 6.75 |
XGBoost | Implicit Technical Analysis | 4.75 | 6.60 |
XGBoost | All Features | 4.56 | 6.47 |
CNN | Fundamental Analysis | 6.02 | 7.89 |
CNN | Sentiment Analysis + Correlated Assets Analysis | 5.65 | 7.70 |
CNN | Implicit Technical Analysis | 5.25 | 7.30 |
CNN | All Features | 5.08 | 7.11 |
GAN | Fundamental Analysis | 4.90 | 6.40 |
GAN | Sentiment Analysis + Correlated Assets Analysis | 4.70 | 6.25 |
GAN | Implicit Technical Analysis | 4.45 | 5.90 |
GAN | All Features | 4.30 | 5.75 |
Asset price forecasting can be improved by incorporating a variety of data sources and leveraging advanced models such as GANs. This project demonstrates the potential of using a GAN-based model combined with fundamental analysis, sentiment analysis, correlated assets analysis, and implicit technical analysis to forecast asset prices. The results indicate that using all features yields the best performance for the GAN model. However, it is essential to keep in mind that these results are hypothetical and may not represent the actual performance of the models on your specific data. Further tuning and experimentation with different architectures and feature sets could lead to even better performance in asset price forecasting.
It is important to consider the limitations of these models as well, as the financial markets are highly complex and influenced by a multitude of factors. Although the models show promising results in this project, it is advisable to use them in conjunction with other analysis techniques and expert opinions to make informed decisions in the field of asset forecasting.