【发布时间】:2020-07-13 07:30:11
【问题描述】:
如何生成 1000 个集合,每个集合包含 5 个随机数(买入和卖出价格),满足以下要求:
价格在集合之间没有依赖性仅在一个集合内。 价格应为带 2 位小数的正数。 例如。取自均值为 40 和 sd 4 的正态分布
例子
set_id 1
buy_prices: 23, 22, 21, 20, 19 -> buy prices should be sorted in desc order
sell_prices: 24, 25, 26, 27, 28 -> sell prices should be sorted in ascending order
Conditions:
buy prices: 1st > 2nd > 3rd > 4th > 5th
sell prices: 1st < 2nd < 3rd < 4th < 5th
In each set the first buy price should be < first sell_price
【问题讨论】: