logo

Welcome to Quantapi!


HKEX Dividends Algo

Date: 2023-02-01
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
2023-02-02 00382.HK Edvantage Group Holdings Limited 0.112 2022-11-25 2023-02-27 2023-02-06 45.136 4.35 2.6 1
2023-02-06 01730.HK LHN Limited 0.0596 2022-11-28 2023-02-21 2023-02-08 7.525 1.84 3.2 5
2023-02-08 01969.HK China Chunlai Education Group Co., Ltd. 0.1154 2022-11-25 2023-02-24 2023-02-10 51.6 4.17 2.8 7
2023-02-10 01114.HK Brilliance China Automotive Holdings Ltd. 0.96 2023-01-13 2023-02-27 2023-02-14 235.11 4.88 19.7 9
2023-02-14 01161.HK Water Oasis Group Ltd. 0.075 2022-12-16 2023-03-06 2023-02-16 10.957 1.62 4.6 13
2023-02-15 00839.HK China Education Group Holdings Limited 0.3875 2022-11-28 2023-03-29 2023-02-17 317.324 13.46 2.9 14
2023-02-16 00855.HK China Water Affairs Group Ltd. 0.16 2022-11-30 2023-04-03 2023-02-20 111.161 7.45 2.1 15
2023-02-27 00225.HK Pokfulam Development Co. Ltd. 0.34 2022-12-15 2023-03-20 2023-03-01 10.379 9.38 3.6 26
2023-02-27 00640.HK Infinity Development Holdings Co. Ltd. 0.043 2022-12-23 2023-03-15 2023-03-01 4.225 0.72 6.0 26
2023-03-01 02001.HK China New Higher Education Group Limited 0.1074 2022-11-28 2023-03-22 2023-03-03 62.494 4.4 2.4 28
2023-03-28 00752.HK Pico Far East Holdings Ltd. 0.06 2023-01-30 2023-04-18 2023-03-30 17.955 1.44 4.2 55