Reply To: YTD Performance for stocks the started trading during the Year

Optuma Forums Optuma Scripting YTD Performance for stocks the started trading during the Year Reply To: YTD Performance for stocks the started trading during the Year

#66339
Darren
  • Topics: 67
  • Replies: 697
  • Posts: 764

Hi Michael,

You can use the FIRST() and YEARNUM() functions to determine if the stock listed this year. If true then calculate the change from the first open, if false use the YTD calculation.

HAYW has gained 35.3% since being listed in March, whereas MSFT is up 39% YTD:

Capture

1 user thanked author for this post.

Pin It on Pinterest