passing block to create stock_data