Advance Decline Percent

Optuma Forums Optuma Scripting Advance Decline Percent

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #67211
    • Topics: 23
    • Replies: 39
    • Posts: 62


    I am working in the breadth module. I want to create the advance decline percent on a custom index of mine. I want to calculate: (advancers – decliners) / (advancers + decliners).

    I went to script the advance decline percent for SPX to make sure it matched the advance decline percent that is provided with the Optuma EOD breadth data. I unfortunately cannot get them to match. I have tried a lot of ways and am now stuck. I started with the following script:

    When it did not match I started to test each piece, and so I know that in isolation the count advancers and the count decliners part of the script works properly in isolation if I set the bread action setting to count.
    I know that in isolation the numerator and denominator of the Calc AD% work in when the breadth action is set to sum.
    I just don’t know how to combine the entire formula.
    I did try setting the breadth action to advance decline percent and entered the numerator as V1 – V2 and denominator as V1 +v2, but that did not work either.

    I know you guys are busy, and I am sorry I cannot figure this out on my own with several mentions of this in the forum. Please advise on how I can manually script this for SPX so I can then use the formula on my custom index. Thank you for your help.

    1 user thanked author for this post.
    • Topics: 69
    • Replies: 737
    • Posts: 806

    Hi Louis,

    Set the Breadth Action in the custom breadth engine to Advance Decline Percent and use CLOSE() IsUp for the Advance Script and CLOSE() IsDown for the declines.

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

Pin It on Pinterest