I need help with a problem that I believe likely has something to do with the SetContext method.
I am trying to get correlations between (in this example) 3 symbols over the last 10 years
AAL, AAPL, and ADBE
AAL has 327 bars while AAPL and ADBE both have 2517 bars
In the following code, I am trying to print out ALL the correlations available for the full 10 years
I expected that for the first 2517 - 327 bars I would get the correlations between AAPL and ADBE and the other two would result in NaN's as there is no early data available for AAL
When I fiddle with the SetContext function, I find I need it set to false the first time to get all the history (else I get just 327 correlations for all 3 pairs)
In the second instance, I still only get 327 dates but depending on true or false, I get early or later dates but I am unable to get ALL dates.
Is there a fix you can suggest?
Thanks
CODE:
Please log in to see this code.