logo

Welcome to Quantapi!


HKEX Dividends Algo

Date: 2018-10-11
Author: Nick Wong

This algo helps me to pick stocks to trade before their dividends ex-date. I want to make it automatically update and put it online for self reference.

Here are my algorithms to choose stocks to buy from this algo:
1. Grab the dividends news from aastocks.
2. Grab the last day close price of the stocks in list 1.
3. Grab the market cap. of the stocsk in list 1.
4. Calculate the dividends rates of the stocks with this formulae = dividends / close price.
5. Calculate the remaining days to ex-date from current day.
6. Filter out stocks which is:
  • a. market cap smaller than 5 billions (50億) to reduce risks.
  • b. dividends rates greater or equal to 3%.
  • c. remaining days to ex-date is greater or equal to 14 days.
7. Normally I will pick 3 or 4 stocks to buy and hold before ex-date to sell. DO NOT hold till ex-date as the stock price will drop on ex-date to reflect the dividends deductions.

ex-date code name dividends announced date pay date book close date market cap close price dividends rate days to ex
2018-12-14 02689.HK Nine Dragons Paper (Holdings) Ltd. 0.4522 2018-09-18 2019-01-11 2018-12-18 354.31 7.69 5.9 54
2019-01-03 00960.HK Longfor Group Holdings Limited 0.6784 2018-08-21 2019-01-18 2019-01-07 984.48 17.1 4.0 74
2018-11-09 00017.HK New World Development Co. Ltd. 0.34 2018-09-20 2018-12-20 2018-11-13 1020.09 9.99 3.4 19
2018-11-12 00016.HK Sun Hung Kai Properties Ltd. 3.45 2018-09-13 2018-11-22 2018-11-14 2978.28 102.8 3.4 22
2018-11-21 00659.HK NWS Holdings Ltd. 0.46 2018-09-19 2018-12-11 2018-11-23 604.06 15.16 3.0 31