Reply To: Script Help

Optuma Forums Optuma Scripting Script Help Reply To: Script Help

  • Topics: 67
  • Replies: 697
  • Posts: 764

Hi Matthew,

I think may work better when creating a time series based on YTD performance over multiple years.

The signal is when the YEARNUM() changes at the beginning of the year, and using the CHANGESINCESIGNAL() function from that point to calculate the YTD% for each day. However, we need to take the close of the day before the signal (ie the close of the previous year) so need to use the [-1] offset.

Currently there are 6.5% of SPX stocks (33) down more than 10% this year (confirmed in the watchlist). Because the calculations are from the beginning of the year it resets each January:


1 user thanked author for this post.

Pin It on Pinterest