YTD Performance for stocks the started trading during the Year

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

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #66337
    Michael
    • Topics: 4
    • Replies: 4
    • Posts: 8

    Hello,
    I have a column for YTD performance. However for HAYW it shows zero. Is this because the first trade date was in March 2021? Is there a YTD formula that would capture the performance of all stocks (even those that debuted in 2021)? Thanks
    Michael

    #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.
    #66341
    Michael
    • Topics: 4
    • Replies: 4
    • Posts: 8

    That’s awesome. Thanks a lot Darren

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Pin It on Pinterest