- This topic has 1 reply, 2 voices, and was last updated 2 years ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Optuma Forums › Optuma Scripting › Correlation to 10YY
I have been trying to make a script to determine correlation of S&P 500 sectors to the yield on 10 YR Treasury. I would like to be able to change the look back period.
Here is what I have…Can anyone tell me if this is accurate, or help me fix it?
S1 = GETDATA(CODE=TNX:CBOEI);
C1 = CLOSE();
CRL(C1, S1, BARS=252, CALCSTYLE=% Change)
Hi Matthew,
If you are using this in a watchlist or column chart then you will need to increase the amount of data that is loaded (for speed, we limit the data loaded to 1 year). Change the Date Range property to Last 10 Years, and change to a Weekly timeframe. Then change the formula to 52 weeks x 5 years = 260:
CRL(C1, S1, BARS=260, CALCSTYLE=% Change)
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. |