19th Ave New York, NY 95822, USA

Testing Some Ideas In Amibroker – Overnight Returns In Stocks


All system developers and traders should keep a notepad on their desk so that they can write down their ideas and keep a record of any back-testing that they do. I don’t know what it is, but there is something about writing down on pad and paper that engages the mind far more so than inputting into a spreadsheet.

Last weekend I took this to another level and purchased a new whiteboard so that I can write on the wall any important reminders or ideas.

The past few hours I have been using the whiteboard to full effect to test out new trading ideas in Amibroker.

whiteboard trading ideas

Specifically, I have been looking at the concept of overnight returns and how they look across individual stocks.

The overnight anomaly

It’s well known that in the past there has been a significant overnight anomaly in the US stock market where a substantial portion of positive returns have been generated overnight. And in Europe there has been the opposite effect.

But the problem with this anomaly is that we do not know how long it will persist. I wanted to find out whether there are any patterns in overnight returns in individual stocks and whether a trading strategy could be devised.

One of the things I wanted to find out was whether stocks that previously saw positive overnight returns continued to provide positive overnight returns in the future. If you find a stock that always seems to gap up overnight, it could be due to some fundamental reason and it seems plausible that this effect might persist into the future.

Thus, I have just spent the last few hours running back-tests on Amibroker and keeping track of my findings on the new whiteboard.

Looking for the best overnight performers

One idea I had was to run a test on all S&P 100 tickers to find the best overnight stock in a two month period, then step forward one month and see if that stock produced any significant performance against it’s peers.

Unfortunately, the process has been largely fruitless and I have not found any real patterns in the data. I also realized about half way through that there was a much quicker and easier way for this experiment using some simple math and with Amibroker Positionscore.

Looking at microcaps

Although I have in the past found a good strategy for overnight reversals, I am yet to find a worthwhile strategy based on the optimisation of overnight returns and it seems that there is significant variability in overnight performance. In other words, sometimes the best overnight stocks continue to be good overnight stocks and sometimes it is the complete opposite.

The following equity curve illustrates this statement. The system used in this example holds the best overnight stocks from the Russell Microcap universe based on average overnight returns across the previous 10 days. As you can see, this strategy did incredibly well until 2014 and then completely reversed.

overnight returns in microcaps strategy
overnight returns in microcaps strategy

Overall, my research into overnight returns has not yielded much in the way of profitable ideas. This is so often the way with system development where it can take weeks, even months, before you come across a great strategy.

This emphasises the importance of record keeping and why you should have some kind of time limit for your testing. If you don’t find anything of use within a few hours of testing it’s often better to forget it and move on.

Charts in this article from Amibroker using data from Norgate Premium.

Comments (2)

Thanks for another great article JB. It’s great to learn about your research methods. I also agree that writing down ideas on pen and paper really does engage the brain in a unique way. Your whiteboard looks great!

Yeah, pretty neat isn’t it. Thanks Jay.

Leave a comment