Using Optuma to Test Historical Events

by Feb 27, 2020All Articles, Technical Analysis, Education

It was quite a week in the markets around the world as fears of the Covid-19 virus rattled markets around the world. Here’s a list of the major markets this week, as of the close on Thursday 27th:

In the US the S&P500 index closed down 3% on both Monday and Tuesday of this past week so the question was how many times has this happened in the past, and – perhaps more importantly – what happened next?

Using the Signal Tester (available for Enterprise Services clients, or as an optional add-on module) it was easy to quickly answer this type of question using the daily Change function:


where the [1] signifies the previous day. Before running the test it’s always a good idea to apply the formula to a Show Bar tool, allowing you to visually confirm that the signals are accurate. When we do that, you can see all the back-to-back -3% days on the chart:

Once verified that the signal is correct, the same formula can be used in a signal test.

Before this week, this particular event has only occurred 9 times since 1950 – with half of those occurring at the end of 2008 (as seen with the darker red vertical line above). This isn’t enough data for a meaningful test, but you can show how each of the 9 events played out over the subsequent year by switching the Main Plot of the signal test display to Components:

All signals ended the year in positive territory, ranging from 10% to 46%, but with three signals occurring in October 2008 I’m not sure we can read much in to it.

Let’s look at a similar example, but with one giving perhaps more meaningful results. Instead of back-to-back -3% days, here’s looking at 2 day changes of at least -6% using the 2 day Rate of Change formula ROC(BARS=2)<-6. The results show this has happened only 34 previous times in the last 70 years of the S&P500. The Mean Returns show that the next 100 days after each signal stay fairly flat, and after 116 days the 6% fall has been recovered, and going on to return on average 19% one year after each event.

How does that compare to other markets? This last example is for the ASX200 Index, which also fell 6% this week but over the first three days, not two. The test is the same, but the formula has been tweaked for a 3 day rate of change rather than two (ROC(BARS=3)<-6). Of the 18 previous occasions the index continued to fall, not finding a bottom until 80 days later, and not beginning to really recover until 160 days (about 7 months) later.

However, if you look closely at the blue history slider bar you will see white marks highlighting where each of the signals occurred, and the red arrow is showing a cluster of signals at the end of 2008. If you use the the Show Bar on the XJO chart with the same formula you can see straight away that 10 of the 18 were clustered between September and November 2008:

[For more testing examples see our Twitter feed .]

Of course, these tests do not guarantee what’s going to happen, but by creating signal tests combined with Show Bars it helps to quickly visualise what has happened in the past to help in your decision-making process.

Don’t forget our scripting forum if you need help with writing formulas, or if your needs are a bit more complex we would be happy to arrange a consultation.

Share Link
Darren Hawkins, MSTA

Darren Hawkins, MSTA

Senior Software Specialist at Optuma

Darren is the senior Software Specialist at Optuma. He joined the company in 2009 after attending an introductory technical analysis course. Darren now instructs users all over the world, from experienced Wall Street traders and professional money managers to individual traders drawing their first trendlines.

Darren grew up in the UK and attended college in the USA where he earned a BA in Economics from St Mary's College of Maryland. He went on to spend a few years working at the Nasdaq Stock Market in Washington DC. Going on to live and work in Australia, the US and currently the UK, Darren has a broad understanding of the individual needs of traders, portfolio managers and investors utilising a wide range of methodologies.

In 2014 Darren passed the UK-based Society of Technical Analysts diploma course, and when not looking at charts he keeps a keen eye on England's cricket team - especially if they are playing against Australia. He lives in the Essex countryside in England, with wife Wendy and their labrador, Gabba.


  1. TS

    Hi Darren,

    really many thanks for your fantastic analysis. I have recreated it immediately.

    Unfortunately I was not able to recreate the performance table you used in the chart of the S&P 500 (Back-to-Back -3% days on SPX).

    How did you created the performance table on the top left corner of the chart?

    Many thanks

    • Darren Hawkins, MSTA

      Thanks Thomas. I created that in Excel by clicking on the Signal Results tab and scrolling down the Settings column and then Copy Results to Clipboard. Paste in Excel to calculate the % change between Close at Signal and Close at End. I’ll see if we can get that included in the results tab automatically in a future update.


Submit a Comment

Your email address will not be published. Required fields are marked *

Blog Signup

Pin It on Pinterest

Share This