- This topic has 2 replies, 2 voices, and was last updated 1 month ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Optuma Forums › Optuma Scripting › Drawdown
Hi Optuma team,
You published on Twitter (https://twitter.com/Optuma/status/1529440897477140480?cxt=HHwWgICj8ZKZ1bkqAAAA) a drawdown chart.
I calculate with the Breadth engine the percent of stock that are more than 20% below its 52-week high.
Here is my script:
1 2 3 4 5 |
// S&P 500 Percent of Stocks >= 20% below 52-Week High Line1 = DDP(LOOKBACKBARS=52, BACKTYPE=Weeks) ; Line1 <= -20 |
My Breadth engine settings:
For May 24 I get the value 63.94%, so 63,94% of the 504 stocks in the S&P 500 are below its 52-week high.
Your Twitter chart lists 302 stocks with a drawdown greater than 20%. That’s 59.92% of the 504 stocks in the S&P 500.
Please explain why I get the value 63.94% while you have the value 59.92%. Is my breadth engine script not correct?
Thanks a lot.
Best wishes,
Thomas
Hi Thomas,
It’s probably because the Drawdown tool and DDP() function use the low price in the calculations, and our Breadth Measures data (symbol SPX20OF52WH) used in the tweet uses the close.
Hi Darren,
It’s seems you are right, the Drawdown function DDP() uses the highest and lowest 52-week prices whereas the symbol SPX20OF52WH uses the highest and lowest 52-week closes.
Thanks and best wishes,
Thomas
Cookie | Duration | Description |
---|---|---|
cname | 14 days | This cookie is set by Optuma. The cookies is used to store the users campaign selection for selecting the correct version of Optuma to trial and is "Necessary". |
cookielawinfo-checbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |