Signal Testing example

Optuma Forums Optuma Scripting Signal Testing example

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #70675
    Darren
    • Topics: 76
    • Replies: 1,059
    • Posts: 1,135

    For clients with access to the quantitative Signal Testing module, you can run tests on technical and calendar events using scripting.

    Here’s an example on 1st quarter performance in the $SPX which we tweeted here: https://twitter.com/Optuma/status/1642534097020162048?s=20

    It’s based on the same concept as this January Barometer article but instead we look at performance after the first quarter rather than the first month.

    To calculate the performance for the rest of the year when the first quarter has been positive, run this on a monthly timeframe with the Periods Before set to 3 (ie January – March) and the Periods After to 9 (April – December):

    Capture

    2023 was the 47th time this occurred in the $SPX, and the results show that out of the previous 46 events the year closed higher 87% of the time, with an average return of +9.5%. On the results chart the period of -3 to 0 is January to March, and 0 to 9 is April to December:

    Fsr9Qx_aUAAS0CM

    To change the test for when the first quarter is negative change Q1[1] to IsDown (and for all years delete the Q1 condition)

    1 user thanked author for this post.
    #71723
    Christopher
    • Topics: 1
    • Replies: 3
    • Posts: 4

    Can you please provide Guidance on Signal Test Script I can use to test what occurs after a negative return from Sept 1st – Sept 20th.  Id like to be able to modify the script for future time frames… I came up with this nonsense that clearly isn’t right after finding a previous forum post

    #71727
    Darren
    • Topics: 76
    • Replies: 1,059
    • Posts: 1,135

    Hi Christopher,

    You could use MONTHNUM()==9 and DAYNUM()==20 but it gets tricky when the 20th falls on a weekend…

    I can’t think of an easy way, but here’s a Seasonality chart of the average September for SPX, showing the dropoff at the end of the month:

    Capture

    #71729
    Christopher
    • Topics: 1
    • Replies: 3
    • Posts: 4

    ok thanks, i have looked into that style that you showed me and that is great for wheat it is … im interested in stats on this type of stuff, probabilities, ROR over period of time after like the signal tester gives… so if im hearing you correctly it is a day ending on the weekend issue… could this be solved if i used say an end of week # like the 3rd (ending) week of september or week 38 of the year.  Is there a script for something like that to plug into the Signal tester?

    #71731
    Darren
    • Topics: 76
    • Replies: 1,059
    • Posts: 1,135

    Here’s a solution: we can use DAYNUM() CrossesAbove 19 so it will take the next trading day if the 20th is a weekend:

    The Signal Test is set to 13 periods (trading days) before the signal (ie Sept 1st – 20th) and 9 days after to the end of the month. Of the 34 years that the SPX was negative Sept 1st – 20th (avg loss -3.32%) the index went on to lose another 0.42% for the rest of the month, with a Probability of Gain of 45%:

    Image

    For the 40 times when the SPX is positive for Sept 1st – 20th (change the last line to >0) the results are very similar, with the avg gain from Sept 1st of 2.5%

    Image

    #71733
    Christopher
    • Topics: 1
    • Replies: 3
    • Posts: 4

    Great thanks!!! I really appreciate the time you took to work this out for me.  I should be able to take this frame work and use it for other time frames.  Thanks again.

    1 user thanked author for this post.
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

Pin It on Pinterest