FinAnalizer – Tool for financial analysis of stocks


Download Article as PDF


For a while I was playing with financial data and financial data mining. I have already written about it in a separate post. Now, I decided to try to make my research so far accessible a bit more, so people can use it. Basically, what I previously did is that I used a bunch of technical financial parameters, such as price, P/E ratio, Price to Sales, Price to Book and many other ratios to try to create a model that will be able to predict a stock price movement over the long term (1 year period). It seems that it is working for about 75% of times using machine learning, namely Random Forests algorithm. For more details you can read my paper about it. But this is research and it was made as Weka model, that I did not publish so far. That needs to change.

I decided to make a Java desktop application using Spring framework that will perform the analysis, show available indicators, news and recommendation. However, I am not to be liable for any damage or loss made by the recommendation engine. It can be wrong and it should not be the only thing you will make your investment decision since it is more tool that I made in spare time than any serious financial investment recommender system.

I used data available from Yahoo! Finance, its “hidden” API (for financial indicators and ratios) and RSS feed (for news). The user basically needs to enter the symbol of the stock and the application will show him available indicators and ratios as well as the most current news. By clicking on news, they will be fully open in a browser. Machine analyst will use indicators and ratios to predict whether the stock will grow at least 10% or not over the period of next year. This prediction will be shown at the bottom of the window as Buy for the stocks that will grow and Sell for the ones that won’t. Here is how it all looks:

FinAnalyzer Screen

I have to state that over the Yahoo Finance API, I could not retrieve all the indicators I used in my paper. Since some were not available, I needed to create a new model using the same data. I used only 8 ratios and indicators to make my model and according to Weka, a Random Forest model that is used by FinAnalyzer is performing slightly worse than the model from my paper. This model tested only on the past data using 10-fold cross validation performed with F-score, precision and recall around 71%. Which I believe is still quite good.

Software is available on GitHub and also 3 functions for collecting data, news and predicting can be used as a library. Further documentation about technical details can be found there. If you have any questions, don’t hesitate to contact me. GitHub page is https://github.com/nikolamilosevic86/FinAnalyzer

Also, I might grow the tool to the full scale open source project for financial analysis. If you are interested in contributing, let me know.

 

Born in Bratislava, Slovakia, lived in Belgrade, Serbia, now living in Manchester, UK, and visitng the world. Nikola is a great enthusiast of AI, natural language processing, machine learning, web application security, open source, mobile and web technologies. Looking forward to create future. Nikola has done PhD in natural language processing and machine learning at the University of Manchester where he worked for 2 years. In 2020, Nikola moved to Berlin and works in Bayer Pharma R&D as a computational scientist.

Leave a Reply

Your email address will not be published. Required fields are marked *