Half function idea

Optuma Forums Optuma Feature Requests Half function idea

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #67979
    Jeffrey A.
    • Topics: 51
    • Replies: 75
    • Posts: 126

    Had an idea for a function that would retrieve % return data from definable 6 month periods (H1 or H2 and year). See attached for an example on how a watch list could utilize the function.

    Screenshot_20220419-032140_Drive

    #67989
    Darren
    • Topics: 70
    • Replies: 788
    • Posts: 858

    Thanks Jeff. You could adapt the formulas used to calculate the Quarterly performance seen here. For example, H1 2021 would be as follows:

    For H2 2021 change  M1 to MONTHNUM() == 12 and YEARNUM() == 2021; and M2 to MONTHNUM() == 6 and YEARNUM() == 2021;

    The Current Half would be M1=CLOSE(); and M2 = MONTHNUM() == 12 and YEARNUM() == 2021; before the end of June, and then M2 = MONTHNUM() == 6 and YEARNUM() == 2022; afterwards.

    Here’s the SPDR ETFs (workbook attached):

    Capture

    #68007
    Jeffrey A.
    • Topics: 51
    • Replies: 75
    • Posts: 126

    Hi Darren,

    Thank you for the code, workbook, and reference to the quarterly article; all are useful. It would be neat if all of this could be wrapped into a function to make it even simpler. A function that would look something like “TimePeriod(select Quarter/Half/Etc, Q1/H1/etc)”. That would be quick and easy for watchlist construction and also useful in signal tester research when using these.  I’m certainly ok using the code and readjusting it as needed, just my two cents for a new idea. It also could incorporate years – I would really like to have something that can isolate particular years for signal testing, such as using only mid-term election years or a custom list of years via a check-box selection or some other way to import and even save and title a list of years (ex: u.s. mid term year list) maybe via csv or cut and paste (currently I know how to manually add in or exclude certain years but having an easier way that saves time would be great).

    Jeff

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

Pin It on Pinterest