From f620aaae5bbd0d8deace934b50f3b8e244dd7061 Mon Sep 17 00:00:00 2001 From: Eli Pandolfo Date: Mon, 11 Nov 2019 13:28:44 -0800 Subject: [PATCH] fix bug with random orders not from array --- draw.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/draw.py b/draw.py index 7d11944..57d30da 100644 --- a/draw.py +++ b/draw.py @@ -78,8 +78,8 @@ def _elo_asset_value_arr(initial_price, period_length, loc_delta, scale_delta, f_prices = np.random.normal( size=num_f_price_changes, loc=loc_delta, scale=scale_delta).cumsum() + initial_price - return np.vstack((f_price_change_times, f_prices)).round(3) - + ret = np.vstack((f_price_change_times, f_prices)).round(3) + return np.swapaxes(ret, 0, 1) def elo_random_order_sequence( asset_value_arr, period_length, loc_noise, scale_noise, bid_ask_offset, @@ -163,4 +163,4 @@ def elo_draw(period_length, conf: dict, seed=np.random.randint(0, high=2 ** 8), print(r) - \ No newline at end of file +