function getData to get returns and interest data and create weights, adjustment of scriptCompareRandomEqual