Optuma Forums › Optuma Scripting › SPX Members Outperforming
- This topic has 4 replies, 2 voices, and was last updated 7 months ago by
Darren.
-
AuthorPosts
-
December 14, 2021 at 11:21 pm #66945
Thomas
- Topics: 129
- Replies: 168
- Posts: 297
Hi,
I want calculate the percentage of the SPX members that outperformed the SPX since the start of a given year on a daily basis.
To be more clearly: What was the percentage of SPX members that outperformed the SPX on each trading day in a given year.
The calculation should always start at the last trading day of the previous year. E.g. for 2021 the calculation should start at 12/31/2020, for 2020 the calculation should start at 12/31/2019, for 2019 the calculation should start at 12/31/2018, and so on.
I used the Breadth Engine with the following script:
123RIC(DATESEL=User Defined, START_DATE=2020-12-31, INDEX=SPX:WI)The results where in no way what I wanted.
Here is a screenshot of my Breadth Engine settings:
Any help is appreciated.
Best wishes,
ThomasDecember 15, 2021 at 12:55 am #66947Darren
- Topics: 70
- Replies: 827
- Posts: 897
Hi Thomas,
Your formula doesn’t have a true/false condition – it’s just calculating the RIC value. For out-performers you would need to add > 100.
Also, you would need a separate breadth measure for each year given the different starting points (use the Date Range option in the breadth setup window to select the yearly start / end dates, along with the RIC date).
1 user thanked author for this post.
December 15, 2021 at 1:45 am #66949Thomas
- Topics: 129
- Replies: 168
- Posts: 297
Thanks Darren,
one final question: Is it necessary to create a script/data file for each year or is it possible to create one data file with the yearly outperformance percentages from 2005 to 2021?
Thanks,
ThomasDecember 15, 2021 at 2:34 am #66951Thomas
- Topics: 129
- Replies: 168
- Posts: 297
Hi,
I hope this is my last question concerning this topic.
Is it possible to calculate the percentages of SPX members outperforming the SPX an a rolling 63 trading day basis. That means I have no fixed stating date. The start date changes every day like a moving average of 63 days.
Thanks,
ThomasDecember 16, 2021 at 2:34 am #66953Darren
- Topics: 70
- Replies: 827
- Posts: 897
Hi Thomas,
I can’t think of a way to do the yearly calculations in one file (when using RIC(DATESEL=Year To Date) > 100 it only works for this year – not the previous years).
However, if you use RIC(DATESEL=Last Quarter) > 100 that will work for the last 3 months (approx 63 days).
1 user thanked author for this post.
-
AuthorPosts
- You must be logged in to reply to this topic.