Understanding HSI — III

Chris Wong
2 min readAug 27, 2017

--

Inspired by Brian, my colleague who is specialised in corporate finance, I would like to test the optimal EWMA pair that generates the best short signal. In general, It is said that momentum is a good type of signals to capture upward movement, while EWMA crossing is the one for downward movement.

Here I would like to test which two EWMA crossings would generate the best performance for Hang Seng Index.

Just to describe the method briefly, when the more sensitive (EWMA of 10 days relative to EWMA of 20 days) EWMA plunges the level of the less sensitive EWMA, we open a short contract, and hold the contract until the more sensitive EWMA breaks through the less sensitive one. The difference in index during this period is our profit and loss.

The test data is from August of 2009–2017. I skipped financial crisis because the big downward movement would create bias for the more sensitive pairs. I want to test out the best pair of EWMA under most of the circumstance, but not assuming we have to undergo another financial crisis. Some of you may disagree with this since including data from 2007 to 2008 seems to make the test more robust. However, robustness comes with tradeoff in performance. I aim to discover an optimised strategy that can be run most of the time, but not a general one that can be run and left alone. This is in fact, more efficient and practical since we would apply some judging or other out-of-model analysis on whether or not we should adopt this strategy in the first place, making the model more niche and fit for the current case. In this particular case, since we are talking about short sell, skipping financial crisis would make our signal more profitable under general situations.

I brute-forced the profit of two set of EWMA signal, 2–60 days for the faster average and 100 to 250 days for the slower average. The code (Python) is up on this page so you can test any custom range of signals.

Basically the results comes in line with our general understanding. For the most profitable(in terms of total profit), the use of 20/103 pair tops the list. Pairs around this range have similar performance so it is pretty stable.

The Most Profitable Pairs

In terms of the most efficient trade, amazingly, the performance of 59/237 and pairs around this range have super positive results, smaller loss and even SD.

The Most Efficient Pairs

--

--

No responses yet