Determine max_price and num_bins based on data rather than setting them as global constants.