Stocks screeners are effective filters when you have a specific idea of the kinds of companies in which you are looking to invest. There are tens of thousands of stocks listed on world exchanges so it's time-consuming to browse them manually. Most available on the Internet screeners offers a decent set of rules and filters. They have a database of equity prices updated on regular basis. However, the rules and filters are usually predefined and there is a limited possibility to extend them with more elaborate ideas. Secondly, the equity database focus usually on the most popular markets, like e.g. US and West Europe stocks, and don't cover more exotic and emerging markets like e.g. Eastern Europe. Using the same rules and applying them to the same markets as everybody else do, will give only average results. Focusing in turn on markets that are less screened by bots and algorithms (Polish, Hungarian or Ukrainian) can give a head-to-head advantage in the pursuit for good returns. So let's create a custom tool screening the Polish market.
To create a screener we need two things: an algorithm and data. The algorithm will be implemented in Python with the support of the pandas-ta library which leverages the Pandas library with more dozens of technical indicators and other utility functions. The data can be freely obtained from stooq where you can download a whole database of equity prices in CSV format. The database has complete coverage of all Polish equities and some Hungarian. You can also download equities from popular markets like the US, Germany, Japan or Hong Kong.
Assuming that the data files are stored offline, using the os.walk function we build a list of files. Note that we don't filter the files according to their type so it is important to have only valid CSV files in the chosen directory which can be read by the pd.read function. Furthermore, we should investigate the headline of the files and write down the names of the columns. They will be needed to correctly process the data. Firstly, we must identify the column with a date that is needed to filter, index and plot the data. Secondly, we must choose a column with quote data which is usually the columns with closing quotes. To speed up our computation, we copy the last several rows from the data to compute the single RSI value by which the quotes are filtered. If the given equity passes the filter, we can compute the RSI for the whole period which is useful for plotting. The plots of the filtered equities are saved as png files for later investigation.
#Short desc Stocks screeners are effective filters useful for the selection of promising investments. The article presents a simple RSI screener written in Python.
#revision