I want to calculate the pairwise correlations of stock returns based on the volume-weighted average prices (vwap).
My starting point is :
pivot(wavg, [