Oct 1, 2013
Recently busy in developing a new TA system, named Ztrader, which targets high performance, fast new indicator development, fast real-time scanning, portfolio management and etc. Later I will share more about this new system’s capability and new features.
Ztrader is the 3rd system I developed for stock trading. The reason to develop my own system was backed to few years ago. I’ve attended Mr Sky Cheung’s training course, at that time, my TA knowledge was zero and I was a “simple FA” guy. The course did only teach very basic TA skills which likely you can learn by yourself from reading several TA books in library.
in 除淨因素, the dividend effect was not count in most free service providers.
The first good thing I learn in the course was : TA system depends on good data. The software using at the course was Metastock, which is a simple to use software for beginner. So I subscribed Metastock data from a local vendor. Unfortunately, the data provider regularly gave wrong data in a delayed manner. It was frustrating. Also, I was trying to build cross market data functions, like sectors and market indicators, which seems not easy to do so at that version of Metastock. Metastock’s capability also imposed quite a lot of limitations and it was difficult to program complicated indicators in the environment. (I am not sure if the latest version of Metastock has any improvement.)
Although my system seems fixed the data issue, which I do ex-dividend, split and merge, and stock code migration, ex-right, board switching, etc., properly. The data issue is still not completely solved. Re-quote the example here:
Day 1: 股價 $95
Day 2: 股價 $100 股價上升 5%，+$5 (5.26%)
Day 3: 股價 $10 ，因為派息 $90
Day 4: 股價 $5 股價下跌 50%， -$5 (-50%)
How to handle this dividend payout is complicated. Now consider again another example:
Close $101 +1%
Pay $50 Dividend, Price close at $51
Close $51 0%
Close $53 +3.92%
Price from Day 5 to Day 100 +$53
Close $103 +100% relative to Day 4
Pay $100 dividend, Price close at $6
Close $6 +100%
This stock totally paid $150 dividend. If the dividend is not excluded from the historical stock price, all TA indicators will be useless. If dividend is excluded from the historical stock price, you will see the historical price goes below zero. This makes quite a few indicators failed or information changed. For example, the ROC indicator. Failing means back-testing of the effectiveness of the indicators or any trading system failed.
To deal with the situation properly, a new delta adjusted method will be used, which worked like the current “price comparing” function. This delta adjusted method assuming the dividend of a stock can be re-invest on the stock immediately. Not 100% correct, but makes the system more practical and almost any indicators will be functioned as expected.
To illustrate with a practical case, consider 2088 this year, it paid 0.75 sp dividend on July 4:
Definitely the chart is not helpful, it only tags a special dividend there.
the chart data seems correctly ex-dividend. However, the ROC indicator got confused. Also, aastock system does not showing negative prices.
From my existing stockmaster system:
same problem as in aastock, ROC indicator is confused.
In the new Ztrader system, the data is delta adjusted accordingly, instead of one-off ex-dividend:
ROC is correctly displayed. The rate of return on this stock can be much better calculated in this system.
In fact the Stockmaster or aastock ex-dividend method changes also the historical volatility. The candle height relative to the closing price are amplified by the ex-dividend effects.