Using Optuma to Test Historical Events

Using Optuma to Test Historical Events

Use the Signal Tester to quickly test how often certain events occur, and what happens after.

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:

Major Market Indices Major Market Indices

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:

CHANGE(INT_TYPE=Day)<-3 and CHANGE(INT_TYPE=Day)[1]<-3

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:

S&P 500 Index S&P 500 Index

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:

Signal Analysis Signal Analysis

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.

Rate Of Change Signal Analysis Rate Of Change Signal Analysis

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.

Rate Of Change Signal Analysis Rate Of Change Signal Analysis

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:

S&P/ASX 200 S&P/ASX 200

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.