HI,
Trying to calculate correlation coefficient(based on closed price) from a basket of security created from set_universe. dollarvolumeuniverse, ie: appl & google,google & ibm, ibm&appl, etc...
Using numpy corrcoef to do so.
context.cl_price_history =( history (bar_count=2, frequency='1d',field='close_price'))
cor=np.corrcoef(context.cl_price_history )
However, i don't get the correlation matrix, only a correlation between two appl & google for say.
Pls input on what should i do to have the matrix.
Thanks