In [1]:
import pandas as pd
In [2]:
import shl_pm
+-----------------------------------------------+
| Loaded SHL Prediction Module |
| Version 0.0.0.1 |
+-----------------------------------------------+
+-----------------------------------------------+
| SHL Prediction Module User Guide |
+-----------------------------------------------+
+-----------------------------------------------+
| Key Function I:
| shl_initialize(in_ccyy_mm='2017-07')
+-----------------------------------------------+
This function takes one input. Run this funciton once, before calling shl_predict_price_k_step()
Inputs:
(1) in_ccyy_mm: the (current) year month for predicting bidding price
string, i.e. '2017-07'
Outputs: N.A.
+-----------------------------------------------+
| Key Function II:
| shl_predict_price_k_step(in_current_time, in_current_price, in_k_seconds=1, return_value='f_1_step_pred_set_price_rounded')
+-----------------------------------------------+
This function takes four inputs then returns prediciton values in a python list.
Ensure this function is called 'once and only once' for EVERY second with price, starting from '11:29:00'!
This is to ensure prediction module could capture all actual prices for internal prediction calculation.
Inputs:
(1) in_current_time: current time/second of bidding price
string, i.e. '11:29:50'
(2) in_current_price : current bidding price
number/integer/float, i.e. 89400
(3) in_k_seconds : forecast price in the next k seconds
integer, default value = 1, i.e. 7
(4) return_value : return result of predicted price, or predicted set price = predicted price + dynamic increment
string, i.e. 89600 predicted price (return_value = 'f_1_step_pred_price_rounded')
string, i.e. 89800 predicted set price (return_value = 'f_1_step_pred_set_price_rounded')
Outputs:
(1) Returned restuls in python list
list of integer , i.e. [89800] (in_k_seconds = 1)
list of integers, i.e. [89800, 89900, 89900, 90000, 90100, 90100, 90200] (in_k_seconds = 7)
In [ ]:
In [7]:
## which month to predictsimulate?
# shl_sm_parm_ccyy_mm = '2017-04'
# shl_sm_parm_ccyy_mm_offset = 1647
# shl_sm_parm_ccyy_mm = '2017-05'
# shl_sm_parm_ccyy_mm_offset = 1708
# shl_sm_parm_ccyy_mm = '2017-06'
# shl_sm_parm_ccyy_mm_offset = 1769
# shl_sm_parm_ccyy_mm = '2017-07'
# shl_sm_parm_ccyy_mm_offset = 1830
# shl_sm_parm_ccyy_mm = '2017-08'
# shl_sm_parm_ccyy_mm_offset = 1830+61
shl_sm_parm_ccyy_mm = '2017-09'
shl_sm_parm_ccyy_mm_offset = 1830+61*2
# shl_sm_parm_ccyy_mm = '2017-10'
# shl_sm_parm_ccyy_mm_offset = 1830+61*3
# shl_sm_parm_ccyy_mm = '2017-11'
# shl_sm_parm_ccyy_mm_offset = 1830+61*4
# shl_sm_parm_ccyy_mm = '2017-12'
# shl_sm_parm_ccyy_mm_offset = 1830+61*5
#----------------------------------
shl_sm_data = pd.read_csv('shl_sm_data/shl_sm_data.csv')
shl_sm_data[shl_sm_data['ccyy-mm'] == shl_sm_parm_ccyy_mm ]
Out[7]:
ccyy-mm
time
bid-price
1952
2017-09
11:29:00
90100
1953
2017-09
11:29:01
90100
1954
2017-09
11:29:02
90100
1955
2017-09
11:29:03
90100
1956
2017-09
11:29:04
90100
1957
2017-09
11:29:05
90100
1958
2017-09
11:29:06
90100
1959
2017-09
11:29:07
90100
1960
2017-09
11:29:08
90100
1961
2017-09
11:29:09
90100
1962
2017-09
11:29:10
90100
1963
2017-09
11:29:11
90100
1964
2017-09
11:29:12
90100
1965
2017-09
11:29:13
90100
1966
2017-09
11:29:14
90100
1967
2017-09
11:29:15
90200
1968
2017-09
11:29:16
90200
1969
2017-09
11:29:17
90200
1970
2017-09
11:29:18
90300
1971
2017-09
11:29:19
90300
1972
2017-09
11:29:20
90300
1973
2017-09
11:29:21
90300
1974
2017-09
11:29:22
90300
1975
2017-09
11:29:23
90400
1976
2017-09
11:29:24
90400
1977
2017-09
11:29:25
90400
1978
2017-09
11:29:26
90400
1979
2017-09
11:29:27
90400
1980
2017-09
11:29:28
90400
1981
2017-09
11:29:29
90400
...
...
...
...
1983
2017-09
11:29:31
90400
1984
2017-09
11:29:32
90400
1985
2017-09
11:29:33
90400
1986
2017-09
11:29:34
90400
1987
2017-09
11:29:35
90400
1988
2017-09
11:29:36
90400
1989
2017-09
11:29:37
90400
1990
2017-09
11:29:38
90400
1991
2017-09
11:29:39
90400
1992
2017-09
11:29:40
90400
1993
2017-09
11:29:41
90400
1994
2017-09
11:29:42
90400
1995
2017-09
11:29:43
90400
1996
2017-09
11:29:44
90400
1997
2017-09
11:29:45
90400
1998
2017-09
11:29:46
90500
1999
2017-09
11:29:47
90500
2000
2017-09
11:29:48
90700
2001
2017-09
11:29:49
90700
2002
2017-09
11:29:50
90700
2003
2017-09
11:29:51
90700
2004
2017-09
11:29:52
90700
2005
2017-09
11:29:53
90800
2006
2017-09
11:29:54
90800
2007
2017-09
11:29:55
90800
2008
2017-09
11:29:56
90900
2009
2017-09
11:29:57
91000
2010
2017-09
11:29:58
91000
2011
2017-09
11:29:59
91200
2012
2017-09
11:30:00
91300
61 rows × 3 columns
In [8]:
shl_pm.shl_initialize(shl_sm_parm_ccyy_mm)
+-----------------------------------------------+
| shl_initialize() |
+-----------------------------------------------+
shl_global_parm_ccyy_mm : 2017-09
-------------------------------------------------
shl_global_parm_alpha : 0.848823804527792
shl_global_parm_beta : 0.001000000000000
shl_global_parm_gamma : 0.149949473217226
shl_global_parm_short_weight : 0.1250000000
shl_global_parm_short_weight_ratio: 0.0000000000
shl_global_parm_sec57_weight : 0.5000000000
shl_global_parm_month_weight : 0.9000000000
shl_global_parm_dynamic_increment : 300
-------------------------------------------------
prediction results dataframe: shl_data_pm_1_step
Empty DataFrame
Columns: []
Index: []
prediction results dataframe: shl_data_pm_k_step
Empty DataFrame
Columns: []
Index: []
In [9]:
# Upon receiving 11:29:00 second price, to predict till 11:29:49 <- one-step forward price forecasting
for i in range(shl_sm_parm_ccyy_mm_offset, shl_sm_parm_ccyy_mm_offset+50): # use csv data as simulatino
# for i in range(shl_sm_parm_ccyy_mm_offset, shl_sm_parm_ccyy_mm_offset+55): # use csv data as simulatino
print('\n<<<< Record No.: %5d >>>>' % i)
print(shl_sm_data['ccyy-mm'][i]) # format: ccyy-mm
print(shl_sm_data['time'][i]) # format: hh:mm:ss
print(shl_sm_data['bid-price'][i]) # format: integer
######################################################################################################################
# call prediction function, returned result is in 'list' format, i.e. [89400]
shl_sm_prediction_list_local_1 = shl_pm.shl_predict_price_k_step(shl_sm_data['time'][i], shl_sm_data['bid-price'][i],1) # <- one-step forward price forecasting
print(shl_sm_prediction_list_local_1)
######################################################################################################################
<<<< Record No.: 1952 >>>>
2017-09
11:29:00
90100
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:00
in_current_price : 90100.000000
*INFO* At time [ 11:29:00 ] Set shl_global_parm_base_price : 90099
*INFO* f_current_datetime : 2017-09 11:29:00
*INFO* f_current_si : 0.0023528925
*INFO* f_current_price4pm : 1
*INFO* f_current_price4pmsi : 425.0087897114
*INFO* f_1_step_time : 11:29:01
*INFO* f_1_step_si : 0.0208894325
-------------------------------------------------
==>> Prediction Restuls in Python List : [90400]
[90400]
<<<< Record No.: 1953 >>>>
2017-09
11:29:01
90100
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:01
in_current_price : 90100.000000
*INFO* f_current_datetime : 2017-09 11:29:01
*INFO* f_current_si : 0.0208894325
*INFO* f_current_price4pm : 1
*INFO* f_current_price4pmsi : 47.8710946610
*INFO* f_1_step_time : 11:29:02
*INFO* f_1_step_si : 0.0355407527
previous_pred_les_level : 425.0087897114
previous_pred_les_trend : 0.0000000000
f_1_step_pred_les_level : 104.8853365679
f_1_step_pred_les_trend : -0.3201234531
f_1_step_pred_les : 104.5652131148
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 104.5652131148
f_1_step_pred_price_inc : 3.7163263759
f_1_step_pred_price : 90102.7163263759
f_1_step_pred_price_rounded : 90100
f_1_step_pred_set_price_rounded : 90400
-------------------------------------------------
==>> Prediction Restuls in Python List : [90400]
[90400]
<<<< Record No.: 1954 >>>>
2017-09
11:29:02
90100
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:02
in_current_price : 90100.000000
*INFO* f_current_datetime : 2017-09 11:29:02
*INFO* f_current_si : 0.0355407527
*INFO* f_current_price4pm : 1
*INFO* f_current_price4pmsi : 28.1367142004
*INFO* f_1_step_time : 11:29:03
*INFO* f_1_step_si : 0.0418911956
previous_pred_les_level : 104.8853365679
previous_pred_les_trend : -0.3201234531
f_1_step_pred_les_level : 39.6908838919
f_1_step_pred_les_trend : -0.3849977824
f_1_step_pred_les : 39.3058861095
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 39.3058861095
f_1_step_pred_price_inc : 1.6465705629
f_1_step_pred_price : 90100.6465705629
f_1_step_pred_price_rounded : 90100
f_1_step_pred_set_price_rounded : 90400
-------------------------------------------------
==>> Prediction Restuls in Python List : [90400]
[90400]
<<<< Record No.: 1955 >>>>
2017-09
11:29:03
90100
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:03
in_current_price : 90100.000000
*INFO* f_current_datetime : 2017-09 11:29:03
*INFO* f_current_si : 0.0418911956
*INFO* f_current_price4pm : 1
*INFO* f_current_price4pmsi : 23.8713645170
*INFO* f_1_step_time : 11:29:04
*INFO* f_1_step_si : 0.0492385622
previous_pred_les_level : 39.6908838919
previous_pred_les_trend : -0.3849977824
f_1_step_pred_les_level : 26.2046967703
f_1_step_pred_les_trend : -0.3980989717
f_1_step_pred_les : 25.8065977986
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 25.8065977986
f_1_step_pred_price_inc : 1.2706797701
f_1_step_pred_price : 90100.2706797701
f_1_step_pred_price_rounded : 90100
f_1_step_pred_set_price_rounded : 90400
-------------------------------------------------
==>> Prediction Restuls in Python List : [90400]
[90400]
<<<< Record No.: 1956 >>>>
2017-09
11:29:04
90100
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:04
in_current_price : 90100.000000
*INFO* f_current_datetime : 2017-09 11:29:04
*INFO* f_current_si : 0.0492385622
*INFO* f_current_price4pm : 1
*INFO* f_current_price4pmsi : 20.3092851604
*INFO* f_1_step_time : 11:29:05
*INFO* f_1_step_si : 0.0488651959
previous_pred_les_level : 26.2046967703
previous_pred_les_trend : -0.3980989717
f_1_step_pred_les_level : 21.1403479703
f_1_step_pred_les_trend : -0.4027652215
f_1_step_pred_les : 20.7375827488
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 20.7375827488
f_1_step_pred_price_inc : 1.0133460440
f_1_step_pred_price : 90100.0133460440
f_1_step_pred_price_rounded : 90100
f_1_step_pred_set_price_rounded : 90400
-------------------------------------------------
==>> Prediction Restuls in Python List : [90400]
[90400]
<<<< Record No.: 1957 >>>>
2017-09
11:29:05
90100
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:05
in_current_price : 90100.000000
*INFO* f_current_datetime : 2017-09 11:29:05
*INFO* f_current_si : 0.0488651959
*INFO* f_current_price4pm : 1
*INFO* f_current_price4pmsi : 20.4644631225
*INFO* f_1_step_time : 11:29:06
*INFO* f_1_step_si : 0.0817093781
previous_pred_les_level : 21.1403479703
previous_pred_les_trend : -0.4027652215
f_1_step_pred_les_level : 20.5057523085
f_1_step_pred_les_trend : -0.4029970520
f_1_step_pred_les : 20.1027552566
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 20.1027552566
f_1_step_pred_price_inc : 1.6425836295
f_1_step_pred_price : 90100.6425836295
f_1_step_pred_price_rounded : 90100
f_1_step_pred_set_price_rounded : 90400
-------------------------------------------------
==>> Prediction Restuls in Python List : [90400]
[90400]
<<<< Record No.: 1958 >>>>
2017-09
11:29:06
90100
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:06
in_current_price : 90100.000000
*INFO* f_current_datetime : 2017-09 11:29:06
*INFO* f_current_si : 0.0817093781
*INFO* f_current_price4pm : 1
*INFO* f_current_price4pmsi : 12.2384972645
*INFO* f_1_step_time : 11:29:07
*INFO* f_1_step_si : 0.0981591570
previous_pred_les_level : 20.5057523085
previous_pred_les_trend : -0.4029970520
f_1_step_pred_les_level : 13.4273858680
f_1_step_pred_les_trend : -0.4096724214
f_1_step_pred_les : 13.0177134466
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 13.0177134466
f_1_step_pred_price_inc : 1.2778077782
f_1_step_pred_price : 90100.2778077782
f_1_step_pred_price_rounded : 90100
f_1_step_pred_set_price_rounded : 90400
-------------------------------------------------
==>> Prediction Restuls in Python List : [90400]
[90400]
<<<< Record No.: 1959 >>>>
2017-09
11:29:07
90100
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:07
in_current_price : 90100.000000
*INFO* f_current_datetime : 2017-09 11:29:07
*INFO* f_current_si : 0.0981591570
*INFO* f_current_price4pm : 1
*INFO* f_current_price4pmsi : 10.1875365517
*INFO* f_1_step_time : 11:29:08
*INFO* f_1_step_si : 0.1399015190
previous_pred_les_level : 13.4273858680
previous_pred_les_trend : -0.4096724214
f_1_step_pred_les_level : 10.6153919272
f_1_step_pred_les_trend : -0.4120747429
f_1_step_pred_les : 10.2033171843
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 10.2033171843
f_1_step_pred_price_inc : 1.4274595730
f_1_step_pred_price : 90100.4274595730
f_1_step_pred_price_rounded : 90100
f_1_step_pred_set_price_rounded : 90400
-------------------------------------------------
==>> Prediction Restuls in Python List : [90400]
[90400]
<<<< Record No.: 1960 >>>>
2017-09
11:29:08
90100
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:08
in_current_price : 90100.000000
*INFO* f_current_datetime : 2017-09 11:29:08
*INFO* f_current_si : 0.1399015190
*INFO* f_current_price4pm : 1
*INFO* f_current_price4pmsi : 7.1478852204
*INFO* f_1_step_time : 11:29:09
*INFO* f_1_step_si : 0.2029073163
previous_pred_les_level : 10.6153919272
previous_pred_les_trend : -0.4120747429
f_1_step_pred_les_level : 7.6097938002
f_1_step_pred_les_trend : -0.4146682663
f_1_step_pred_les : 7.1951255339
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 7.1951255339
f_1_step_pred_price_inc : 1.4599436125
f_1_step_pred_price : 90100.4599436125
f_1_step_pred_price_rounded : 90100
f_1_step_pred_set_price_rounded : 90400
-------------------------------------------------
==>> Prediction Restuls in Python List : [90400]
[90400]
<<<< Record No.: 1961 >>>>
2017-09
11:29:09
90100
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:09
in_current_price : 90100.000000
*INFO* f_current_datetime : 2017-09 11:29:09
*INFO* f_current_si : 0.2029073163
*INFO* f_current_price4pm : 1
*INFO* f_current_price4pmsi : 4.9283585149
*INFO* f_1_step_time : 11:29:10
*INFO* f_1_step_si : 0.2371406695
previous_pred_les_level : 7.6097938002
previous_pred_les_trend : -0.4146682663
f_1_step_pred_les_level : 5.2710397289
f_1_step_pred_les_trend : -0.4165923521
f_1_step_pred_les : 4.8544473768
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 4.8544473768
f_1_step_pred_price_inc : 1.1511869008
f_1_step_pred_price : 90100.1511869008
f_1_step_pred_price_rounded : 90100
f_1_step_pred_set_price_rounded : 90400
-------------------------------------------------
==>> Prediction Restuls in Python List : [90400]
[90400]
<<<< Record No.: 1962 >>>>
2017-09
11:29:10
90100
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:10
in_current_price : 90100.000000
*INFO* f_current_datetime : 2017-09 11:29:10
*INFO* f_current_si : 0.2371406695
*INFO* f_current_price4pm : 1
*INFO* f_current_price4pmsi : 4.2169063716
*INFO* f_1_step_time : 11:29:11
*INFO* f_1_step_si : 0.2926460055
previous_pred_les_level : 5.2710397289
previous_pred_les_trend : -0.4165923521
f_1_step_pred_les_level : 4.3132873952
f_1_step_pred_les_trend : -0.4171335121
f_1_step_pred_les : 3.8961538831
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 3.8961538831
f_1_step_pred_price_inc : 1.1401938708
f_1_step_pred_price : 90100.1401938708
f_1_step_pred_price_rounded : 90100
f_1_step_pred_set_price_rounded : 90400
-------------------------------------------------
==>> Prediction Restuls in Python List : [90400]
[90400]
<<<< Record No.: 1963 >>>>
2017-09
11:29:11
90100
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:11
in_current_price : 90100.000000
*INFO* f_current_datetime : 2017-09 11:29:11
*INFO* f_current_si : 0.2926460055
*INFO* f_current_price4pm : 1
*INFO* f_current_price4pmsi : 3.4170977260
*INFO* f_1_step_time : 11:29:12
*INFO* f_1_step_si : 0.3408875008
previous_pred_les_level : 4.3132873952
previous_pred_les_trend : -0.4171335121
f_1_step_pred_les_level : 3.4895196133
f_1_step_pred_les_trend : -0.4175401463
f_1_step_pred_les : 3.0719794670
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 3.0719794670
f_1_step_pred_price_inc : 1.0471994029
f_1_step_pred_price : 90100.0471994029
f_1_step_pred_price_rounded : 90100
f_1_step_pred_set_price_rounded : 90400
-------------------------------------------------
==>> Prediction Restuls in Python List : [90400]
[90400]
<<<< Record No.: 1964 >>>>
2017-09
11:29:12
90100
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:12
in_current_price : 90100.000000
*INFO* f_current_datetime : 2017-09 11:29:12
*INFO* f_current_si : 0.3408875008
*INFO* f_current_price4pm : 1
*INFO* f_current_price4pmsi : 2.9335191163
*INFO* f_1_step_time : 11:29:13
*INFO* f_1_step_si : 0.3574878850
previous_pred_les_level : 3.4895196133
previous_pred_les_trend : -0.4175401463
f_1_step_pred_les_level : 2.9544510254
f_1_step_pred_les_trend : -0.4176576748
f_1_step_pred_les : 2.5367933506
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 2.5367933506
f_1_step_pred_price_inc : 0.9068728897
f_1_step_pred_price : 90099.9068728897
f_1_step_pred_price_rounded : 90100
f_1_step_pred_set_price_rounded : 90400
-------------------------------------------------
==>> Prediction Restuls in Python List : [90400]
[90400]
<<<< Record No.: 1965 >>>>
2017-09
11:29:13
90100
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:13
in_current_price : 90100.000000
*INFO* f_current_datetime : 2017-09 11:29:13
*INFO* f_current_si : 0.3574878850
*INFO* f_current_price4pm : 1
*INFO* f_current_price4pmsi : 2.7972975921
*INFO* f_1_step_time : 11:29:14
*INFO* f_1_step_si : 0.3755849903
previous_pred_les_level : 2.9544510254
previous_pred_les_trend : -0.4176576748
f_1_step_pred_les_level : 2.7579155520
f_1_step_pred_les_trend : -0.4174365526
f_1_step_pred_les : 2.3404789994
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 2.3404789994
f_1_step_pred_price_inc : 0.8790487824
f_1_step_pred_price : 90099.8790487824
f_1_step_pred_price_rounded : 90100
f_1_step_pred_set_price_rounded : 90400
-------------------------------------------------
==>> Prediction Restuls in Python List : [90400]
[90400]
<<<< Record No.: 1966 >>>>
2017-09
11:29:14
90100
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:14
in_current_price : 90100.000000
*INFO* f_current_datetime : 2017-09 11:29:14
*INFO* f_current_si : 0.3755849903
*INFO* f_current_price4pm : 1
*INFO* f_current_price4pmsi : 2.6625132147
*INFO* f_1_step_time : 11:29:15
*INFO* f_1_step_si : 0.4038575154
previous_pred_les_level : 2.7579155520
previous_pred_les_trend : -0.4174365526
f_1_step_pred_les_level : 2.6138293072
f_1_step_pred_les_trend : -0.4171632023
f_1_step_pred_les : 2.1966661050
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 2.1966661050
f_1_step_pred_price_inc : 0.8871401154
f_1_step_pred_price : 90099.8871401154
f_1_step_pred_price_rounded : 90100
f_1_step_pred_set_price_rounded : 90400
-------------------------------------------------
==>> Prediction Restuls in Python List : [90400]
[90400]
<<<< Record No.: 1967 >>>>
2017-09
11:29:15
90200
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:15
in_current_price : 90200.000000
*INFO* f_current_datetime : 2017-09 11:29:15
*INFO* f_current_si : 0.4038575154
*INFO* f_current_price4pm : 101
*INFO* f_current_price4pmsi : 250.0882022419
*INFO* f_1_step_time : 11:29:16
*INFO* f_1_step_si : 0.4231287374
previous_pred_les_level : 2.6138293072
previous_pred_les_trend : -0.4171632023
f_1_step_pred_les_level : 212.6129029189
f_1_step_pred_les_trend : -0.2067469654
f_1_step_pred_les : 212.4061559535
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 212.4061559535
f_1_step_pred_price_inc : 89.8751485897
f_1_step_pred_price : 90188.8751485897
f_1_step_pred_price_rounded : 90200
f_1_step_pred_set_price_rounded : 90500
-------------------------------------------------
==>> Prediction Restuls in Python List : [90500]
[90500]
<<<< Record No.: 1968 >>>>
2017-09
11:29:16
90200
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:16
in_current_price : 90200.000000
*INFO* f_current_datetime : 2017-09 11:29:16
*INFO* f_current_si : 0.4231287374
*INFO* f_current_price4pm : 101
*INFO* f_current_price4pmsi : 238.6980393128
*INFO* f_1_step_time : 11:29:17
*INFO* f_1_step_si : 0.4613990996
previous_pred_les_level : 212.6129029189
previous_pred_les_trend : -0.2067469654
f_1_step_pred_les_level : 234.7233324147
f_1_step_pred_les_trend : -0.1844297890
f_1_step_pred_les : 234.5389026257
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 234.5389026257
f_1_step_pred_price_inc : 108.2160384941
f_1_step_pred_price : 90207.2160384941
f_1_step_pred_price_rounded : 90200
f_1_step_pred_set_price_rounded : 90500
-------------------------------------------------
==>> Prediction Restuls in Python List : [90500]
[90500]
<<<< Record No.: 1969 >>>>
2017-09
11:29:17
90200
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:17
in_current_price : 90200.000000
*INFO* f_current_datetime : 2017-09 11:29:17
*INFO* f_current_si : 0.4613990996
*INFO* f_current_price4pm : 101
*INFO* f_current_price4pmsi : 218.8994302032
*INFO* f_1_step_time : 11:29:18
*INFO* f_1_step_si : 0.4890396813
previous_pred_les_level : 234.7233324147
previous_pred_les_trend : -0.1844297890
f_1_step_pred_les_level : 221.2637461432
f_1_step_pred_les_trend : -0.1977049455
f_1_step_pred_les : 221.0660411977
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 221.0660411977
f_1_step_pred_price_inc : 108.1100663347
f_1_step_pred_price : 90207.1100663347
f_1_step_pred_price_rounded : 90200
f_1_step_pred_set_price_rounded : 90500
-------------------------------------------------
==>> Prediction Restuls in Python List : [90500]
[90500]
<<<< Record No.: 1970 >>>>
2017-09
11:29:18
90300
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:18
in_current_price : 90300.000000
*INFO* f_current_datetime : 2017-09 11:29:18
*INFO* f_current_si : 0.4890396813
*INFO* f_current_price4pm : 201
*INFO* f_current_price4pmsi : 411.0095922351
*INFO* f_1_step_time : 11:29:19
*INFO* f_1_step_si : 0.5080889033
previous_pred_les_level : 221.2637461432
previous_pred_les_trend : -0.1977049455
f_1_step_pred_les_level : 382.2946488348
f_1_step_pred_les_trend : -0.0364763378
f_1_step_pred_les : 382.2581724969
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 382.2581724969
f_1_step_pred_price_inc : 194.2211356228
f_1_step_pred_price : 90293.2211356228
f_1_step_pred_price_rounded : 90300
f_1_step_pred_set_price_rounded : 90600
-------------------------------------------------
==>> Prediction Restuls in Python List : [90600]
[90600]
<<<< Record No.: 1971 >>>>
2017-09
11:29:19
90300
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:19
in_current_price : 90300.000000
*INFO* f_current_datetime : 2017-09 11:29:19
*INFO* f_current_si : 0.5080889033
*INFO* f_current_price4pm : 201
*INFO* f_current_price4pmsi : 395.6000587964
*INFO* f_1_step_time : 11:29:20
*INFO* f_1_step_si : 0.5288548106
previous_pred_les_level : 382.2946488348
previous_pred_les_trend : -0.0364763378
f_1_step_pred_les_level : 393.5830831852
f_1_step_pred_les_trend : -0.0251514271
f_1_step_pred_les : 393.5579317581
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 393.5579317581
f_1_step_pred_price_inc : 208.1350054453
f_1_step_pred_price : 90307.1350054453
f_1_step_pred_price_rounded : 90300
f_1_step_pred_set_price_rounded : 90600
-------------------------------------------------
==>> Prediction Restuls in Python List : [90600]
[90600]
<<<< Record No.: 1972 >>>>
2017-09
11:29:20
90300
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:20
in_current_price : 90300.000000
*INFO* f_current_datetime : 2017-09 11:29:20
*INFO* f_current_si : 0.5288548106
*INFO* f_current_price4pm : 201
*INFO* f_current_price4pmsi : 380.0665059398
*INFO* f_1_step_time : 11:29:21
*INFO* f_1_step_si : 0.5649603971
previous_pred_les_level : 393.5830831852
previous_pred_les_trend : -0.0251514271
f_1_step_pred_les_level : 382.1060883665
f_1_step_pred_les_trend : -0.0366032705
f_1_step_pred_les : 382.0694850960
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 382.0694850960
f_1_step_pred_price_inc : 215.8541280182
f_1_step_pred_price : 90314.8541280182
f_1_step_pred_price_rounded : 90300
f_1_step_pred_set_price_rounded : 90600
-------------------------------------------------
==>> Prediction Restuls in Python List : [90600]
[90600]
<<<< Record No.: 1973 >>>>
2017-09
11:29:21
90300
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:21
in_current_price : 90300.000000
*INFO* f_current_datetime : 2017-09 11:29:21
*INFO* f_current_si : 0.5649603971
*INFO* f_current_price4pm : 201
*INFO* f_current_price4pmsi : 355.7771501030
*INFO* f_1_step_time : 11:29:22
*INFO* f_1_step_si : 0.5754012825
previous_pred_les_level : 382.1060883665
previous_pred_les_trend : -0.0366032705
f_1_step_pred_les_level : 359.7519252773
f_1_step_pred_les_trend : -0.0589208303
f_1_step_pred_les : 359.6930044470
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 359.6930044470
f_1_step_pred_price_inc : 206.9678160688
f_1_step_pred_price : 90305.9678160688
f_1_step_pred_price_rounded : 90300
f_1_step_pred_set_price_rounded : 90600
-------------------------------------------------
==>> Prediction Restuls in Python List : [90600]
[90600]
<<<< Record No.: 1974 >>>>
2017-09
11:29:22
90300
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:22
in_current_price : 90300.000000
*INFO* f_current_datetime : 2017-09 11:29:22
*INFO* f_current_si : 0.5754012825
*INFO* f_current_price4pm : 201
*INFO* f_current_price4pmsi : 349.3214320327
*INFO* f_1_step_time : 11:29:23
*INFO* f_1_step_si : 0.5861877846
previous_pred_les_level : 359.7519252773
previous_pred_les_trend : -0.0589208303
f_1_step_pred_les_level : 350.8893668914
f_1_step_pred_les_trend : -0.0677244679
f_1_step_pred_les : 350.8216424235
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 350.8216424235
f_1_step_pred_price_inc : 205.6473613678
f_1_step_pred_price : 90304.6473613678
f_1_step_pred_price_rounded : 90300
f_1_step_pred_set_price_rounded : 90600
-------------------------------------------------
==>> Prediction Restuls in Python List : [90600]
[90600]
<<<< Record No.: 1975 >>>>
2017-09
11:29:23
90400
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:23
in_current_price : 90400.000000
*INFO* f_current_datetime : 2017-09 11:29:23
*INFO* f_current_si : 0.5861877846
*INFO* f_current_price4pm : 301
*INFO* f_current_price4pmsi : 513.4873293152
*INFO* f_1_step_time : 11:29:24
*INFO* f_1_step_si : 0.6135904893
previous_pred_les_level : 350.8893668914
previous_pred_les_trend : -0.0677244679
f_1_step_pred_les_level : 488.8961496371
f_1_step_pred_les_trend : 0.0703500393
f_1_step_pred_les : 488.9664996764
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 488.9664996764
f_1_step_pred_price_inc : 300.0251937668
f_1_step_pred_price : 90399.0251937668
f_1_step_pred_price_rounded : 90400
f_1_step_pred_set_price_rounded : 90700
-------------------------------------------------
==>> Prediction Restuls in Python List : [90700]
[90700]
<<<< Record No.: 1976 >>>>
2017-09
11:29:24
90400
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:24
in_current_price : 90400.000000
*INFO* f_current_datetime : 2017-09 11:29:24
*INFO* f_current_si : 0.6135904893
*INFO* f_current_price4pm : 301
*INFO* f_current_price4pmsi : 490.5551915650
*INFO* f_1_step_time : 11:29:25
*INFO* f_1_step_si : 0.6521912336
previous_pred_les_level : 488.8961496371
previous_pred_les_trend : 0.0703500393
f_1_step_pred_les_level : 490.3150191695
f_1_step_pred_les_trend : 0.0716985588
f_1_step_pred_les : 490.3867177283
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 490.3867177283
f_1_step_pred_price_inc : 319.8259183644
f_1_step_pred_price : 90418.8259183644
f_1_step_pred_price_rounded : 90400
f_1_step_pred_set_price_rounded : 90700
-------------------------------------------------
==>> Prediction Restuls in Python List : [90700]
[90700]
<<<< Record No.: 1977 >>>>
2017-09
11:29:25
90400
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:25
in_current_price : 90400.000000
*INFO* f_current_datetime : 2017-09 11:29:25
*INFO* f_current_si : 0.6521912336
*INFO* f_current_price4pm : 301
*INFO* f_current_price4pmsi : 461.5210761876
*INFO* f_1_step_time : 11:29:26
*INFO* f_1_step_si : 0.6684637421
previous_pred_les_level : 490.3150191695
previous_pred_les_trend : 0.0716985588
f_1_step_pred_les_level : 465.8848740556
f_1_step_pred_les_trend : 0.0471967151
f_1_step_pred_les : 465.9320707707
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 465.9320707707
f_1_step_pred_price_inc : 311.4586956111
f_1_step_pred_price : 90410.4586956111
f_1_step_pred_price_rounded : 90400
f_1_step_pred_set_price_rounded : 90700
-------------------------------------------------
==>> Prediction Restuls in Python List : [90700]
[90700]
<<<< Record No.: 1978 >>>>
2017-09
11:29:26
90400
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:26
in_current_price : 90400.000000
*INFO* f_current_datetime : 2017-09 11:29:26
*INFO* f_current_si : 0.6684637421
*INFO* f_current_price4pm : 301
*INFO* f_current_price4pmsi : 450.2862025631
*INFO* f_1_step_time : 11:29:27
*INFO* f_1_step_si : 0.6877341370
previous_pred_les_level : 465.8848740556
previous_pred_les_trend : 0.0471967151
f_1_step_pred_les_level : 452.6514853936
f_1_step_pred_les_trend : 0.0339161298
f_1_step_pred_les : 452.6854015234
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 452.6854015234
f_1_step_pred_price_inc : 311.3272039491
f_1_step_pred_price : 90410.3272039491
f_1_step_pred_price_rounded : 90400
f_1_step_pred_set_price_rounded : 90700
-------------------------------------------------
==>> Prediction Restuls in Python List : [90700]
[90700]
<<<< Record No.: 1979 >>>>
2017-09
11:29:27
90400
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:27
in_current_price : 90400.000000
*INFO* f_current_datetime : 2017-09 11:29:27
*INFO* f_current_si : 0.6877341370
*INFO* f_current_price4pm : 301
*INFO* f_current_price4pmsi : 437.6691279469
*INFO* f_1_step_time : 11:29:28
*INFO* f_1_step_si : 0.7187130127
previous_pred_les_level : 452.6514853936
previous_pred_les_trend : 0.0339161298
f_1_step_pred_les_level : 439.9392310563
f_1_step_pred_les_trend : 0.0211699593
f_1_step_pred_les : 439.9604010156
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 439.9604010156
f_1_step_pred_price_inc : 316.2052652726
f_1_step_pred_price : 90415.2052652726
f_1_step_pred_price_rounded : 90400
f_1_step_pred_set_price_rounded : 90700
-------------------------------------------------
==>> Prediction Restuls in Python List : [90700]
[90700]
<<<< Record No.: 1980 >>>>
2017-09
11:29:28
90400
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:28
in_current_price : 90400.000000
*INFO* f_current_datetime : 2017-09 11:29:28
*INFO* f_current_si : 0.7187130127
*INFO* f_current_price4pm : 301
*INFO* f_current_price4pmsi : 418.8041606187
*INFO* f_1_step_time : 11:29:29
*INFO* f_1_step_si : 0.7326749715
previous_pred_les_level : 439.9392310563
previous_pred_les_trend : 0.0211699593
f_1_step_pred_les_level : 422.0024805524
f_1_step_pred_les_trend : 0.0032120388
f_1_step_pred_les : 422.0056925912
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 422.0056925912
f_1_step_pred_price_inc : 309.1930087911
f_1_step_pred_price : 90408.1930087911
f_1_step_pred_price_rounded : 90400
f_1_step_pred_set_price_rounded : 90700
-------------------------------------------------
==>> Prediction Restuls in Python List : [90700]
[90700]
<<<< Record No.: 1981 >>>>
2017-09
11:29:29
90400
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:29
in_current_price : 90400.000000
*INFO* f_current_datetime : 2017-09 11:29:29
*INFO* f_current_si : 0.7326749715
*INFO* f_current_price4pm : 301
*INFO* f_current_price4pmsi : 410.8233687644
*INFO* f_1_step_time : 11:29:30
*INFO* f_1_step_si : 0.7733932183
previous_pred_les_level : 422.0024805524
previous_pred_les_trend : 0.0032120388
f_1_step_pred_les_level : 412.5138699371
f_1_step_pred_les_trend : -0.0062797838
f_1_step_pred_les : 412.5075901532
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 412.5075901532
f_1_step_pred_price_inc : 319.0305727232
f_1_step_pred_price : 90418.0305727232
f_1_step_pred_price_rounded : 90400
f_1_step_pred_set_price_rounded : 90700
-------------------------------------------------
==>> Prediction Restuls in Python List : [90700]
[90700]
<<<< Record No.: 1982 >>>>
2017-09
11:29:30
90400
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:30
in_current_price : 90400.000000
*INFO* f_current_datetime : 2017-09 11:29:30
*INFO* f_current_si : 0.7733932183
*INFO* f_current_price4pm : 301
*INFO* f_current_price4pmsi : 389.1939997357
*INFO* f_1_step_time : 11:29:31
*INFO* f_1_step_si : 0.7887254294
previous_pred_les_level : 412.5138699371
previous_pred_les_trend : -0.0062797838
f_1_step_pred_les_level : 392.7184596378
f_1_step_pred_les_trend : -0.0260689143
f_1_step_pred_les : 392.6923907235
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 392.6923907235
f_1_step_pred_price_inc : 309.7264745108
f_1_step_pred_price : 90408.7264745108
f_1_step_pred_price_rounded : 90400
f_1_step_pred_set_price_rounded : 90700
-------------------------------------------------
==>> Prediction Restuls in Python List : [90700]
[90700]
<<<< Record No.: 1983 >>>>
2017-09
11:29:31
90400
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:31
in_current_price : 90400.000000
*INFO* f_current_datetime : 2017-09 11:29:31
*INFO* f_current_si : 0.7887254294
*INFO* f_current_price4pm : 301
*INFO* f_current_price4pmsi : 381.6283699818
*INFO* f_1_step_time : 11:29:32
*INFO* f_1_step_si : 0.8130073876
previous_pred_les_level : 392.7184596378
previous_pred_les_trend : -0.0260689143
f_1_step_pred_les_level : 383.3009865442
f_1_step_pred_les_trend : -0.0354603185
f_1_step_pred_les : 383.2655262256
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 383.2655262256
f_1_step_pred_price_inc : 311.5977042215
f_1_step_pred_price : 90410.5977042215
f_1_step_pred_price_rounded : 90400
f_1_step_pred_set_price_rounded : 90700
-------------------------------------------------
==>> Prediction Restuls in Python List : [90700]
[90700]
<<<< Record No.: 1984 >>>>
2017-09
11:29:32
90400
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:32
in_current_price : 90400.000000
*INFO* f_current_datetime : 2017-09 11:29:32
*INFO* f_current_si : 0.8130073876
*INFO* f_current_price4pm : 301
*INFO* f_current_price4pmsi : 370.2303381283
*INFO* f_1_step_time : 11:29:33
*INFO* f_1_step_si : 0.8322837182
previous_pred_les_level : 383.3009865442
previous_pred_les_trend : -0.0354603185
f_1_step_pred_les_level : 372.2009482721
f_1_step_pred_les_trend : -0.0465248965
f_1_step_pred_les : 372.1544233756
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 372.1544233756
f_1_step_pred_price_inc : 309.7380672196
f_1_step_pred_price : 90408.7380672196
f_1_step_pred_price_rounded : 90400
f_1_step_pred_set_price_rounded : 90700
-------------------------------------------------
==>> Prediction Restuls in Python List : [90700]
[90700]
<<<< Record No.: 1985 >>>>
2017-09
11:29:33
90400
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:33
in_current_price : 90400.000000
*INFO* f_current_datetime : 2017-09 11:29:33
*INFO* f_current_si : 0.8322837182
*INFO* f_current_price4pm : 301
*INFO* f_current_price4pmsi : 361.6555189409
*INFO* f_1_step_time : 11:29:34
*INFO* f_1_step_si : 0.8619636567
previous_pred_les_level : 372.2009482721
previous_pred_les_trend : -0.0465248965
f_1_step_pred_les_level : 363.2427033700
f_1_step_pred_les_trend : -0.0554366165
f_1_step_pred_les : 363.1872667535
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 363.1872667535
f_1_step_pred_price_inc : 313.0542245286
f_1_step_pred_price : 90412.0542245286
f_1_step_pred_price_rounded : 90400
f_1_step_pred_set_price_rounded : 90700
-------------------------------------------------
==>> Prediction Restuls in Python List : [90700]
[90700]
<<<< Record No.: 1986 >>>>
2017-09
11:29:34
90400
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:34
in_current_price : 90400.000000
*INFO* f_current_datetime : 2017-09 11:29:34
*INFO* f_current_si : 0.8619636567
*INFO* f_current_price4pm : 301
*INFO* f_current_price4pmsi : 349.2026579658
*INFO* f_1_step_time : 11:29:35
*INFO* f_1_step_si : 0.9193121258
previous_pred_les_level : 363.2427033700
previous_pred_les_trend : -0.0554366165
f_1_step_pred_les_level : 351.3167979175
f_1_step_pred_les_trend : -0.0673070853
f_1_step_pred_les : 351.2494908322
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 351.2494908322
f_1_step_pred_price_inc : 322.9079160898
f_1_step_pred_price : 90421.9079160898
f_1_step_pred_price_rounded : 90400
f_1_step_pred_set_price_rounded : 90700
-------------------------------------------------
==>> Prediction Restuls in Python List : [90700]
[90700]
<<<< Record No.: 1987 >>>>
2017-09
11:29:35
90400
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:35
in_current_price : 90400.000000
*INFO* f_current_datetime : 2017-09 11:29:35
*INFO* f_current_si : 0.9193121258
*INFO* f_current_price4pm : 301
*INFO* f_current_price4pmsi : 327.4187205466
*INFO* f_1_step_time : 11:29:36
*INFO* f_1_step_si : 0.9493202485
previous_pred_les_level : 351.3167979175
previous_pred_les_trend : -0.0673070853
f_1_step_pred_les_level : 331.0213657336
f_1_step_pred_les_trend : -0.0875352104
f_1_step_pred_les : 330.9338305231
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 330.9338305231
f_1_step_pred_price_inc : 314.1621862429
f_1_step_pred_price : 90413.1621862429
f_1_step_pred_price_rounded : 90400
f_1_step_pred_set_price_rounded : 90700
-------------------------------------------------
==>> Prediction Restuls in Python List : [90700]
[90700]
<<<< Record No.: 1988 >>>>
2017-09
11:29:36
90400
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:36
in_current_price : 90400.000000
*INFO* f_current_datetime : 2017-09 11:29:36
*INFO* f_current_si : 0.9493202485
*INFO* f_current_price4pm : 301
*INFO* f_current_price4pmsi : 317.0689769470
*INFO* f_1_step_time : 11:29:37
*INFO* f_1_step_si : 0.9783465150
previous_pred_les_level : 331.0213657336
previous_pred_les_trend : -0.0875352104
f_1_step_pred_les_level : 319.1650127614
f_1_step_pred_les_trend : -0.0993040282
f_1_step_pred_les : 319.0657087333
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 319.0657087333
f_1_step_pred_price_inc : 312.1568242099
f_1_step_pred_price : 90411.1568242099
f_1_step_pred_price_rounded : 90400
f_1_step_pred_set_price_rounded : 90700
-------------------------------------------------
==>> Prediction Restuls in Python List : [90700]
[90700]
<<<< Record No.: 1989 >>>>
2017-09
11:29:37
90400
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:37
in_current_price : 90400.000000
*INFO* f_current_datetime : 2017-09 11:29:37
*INFO* f_current_si : 0.9783465150
*INFO* f_current_price4pm : 301
*INFO* f_current_price4pmsi : 307.6619534806
*INFO* f_1_step_time : 11:29:38
*INFO* f_1_step_si : 0.9994757142
previous_pred_les_level : 319.1650127614
previous_pred_les_trend : -0.0993040282
f_1_step_pred_les_level : 309.3859298138
f_1_step_pred_les_trend : -0.1089838071
f_1_step_pred_les : 309.2769460067
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 309.2769460067
f_1_step_pred_price_inc : 309.1147964988
f_1_step_pred_price : 90408.1147964988
f_1_step_pred_price_rounded : 90400
f_1_step_pred_set_price_rounded : 90700
-------------------------------------------------
==>> Prediction Restuls in Python List : [90700]
[90700]
<<<< Record No.: 1990 >>>>
2017-09
11:29:38
90400
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:38
in_current_price : 90400.000000
*INFO* f_current_datetime : 2017-09 11:29:38
*INFO* f_current_si : 0.9994757142
*INFO* f_current_price4pm : 301
*INFO* f_current_price4pmsi : 301.1578928036
*INFO* f_1_step_time : 11:29:39
*INFO* f_1_step_si : 1.0355575847
previous_pred_les_level : 309.3859298138
previous_pred_les_trend : -0.1089838071
f_1_step_pred_les_level : 302.3853003777
f_1_step_pred_les_trend : -0.1158754527
f_1_step_pred_les : 302.2694249250
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 302.2694249250
f_1_step_pred_price_inc : 313.0173956139
f_1_step_pred_price : 90412.0173956139
f_1_step_pred_price_rounded : 90400
f_1_step_pred_set_price_rounded : 90700
-------------------------------------------------
==>> Prediction Restuls in Python List : [90700]
[90700]
<<<< Record No.: 1991 >>>>
2017-09
11:29:39
90400
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:39
in_current_price : 90400.000000
*INFO* f_current_datetime : 2017-09 11:29:39
*INFO* f_current_si : 1.0355575847
*INFO* f_current_price4pm : 301
*INFO* f_current_price4pmsi : 290.6646664924
*INFO* f_1_step_time : 11:29:40
*INFO* f_1_step_si : 1.0759763027
previous_pred_les_level : 302.3853003777
previous_pred_les_trend : -0.1158754527
f_1_step_pred_les_level : 292.4190297216
f_1_step_pred_les_trend : -0.1257258479
f_1_step_pred_les : 292.2933038737
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 292.2933038737
f_1_step_pred_price_inc : 314.5006684193
f_1_step_pred_price : 90413.5006684194
f_1_step_pred_price_rounded : 90400
f_1_step_pred_set_price_rounded : 90700
-------------------------------------------------
==>> Prediction Restuls in Python List : [90700]
[90700]
<<<< Record No.: 1992 >>>>
2017-09
11:29:40
90400
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:40
in_current_price : 90400.000000
*INFO* f_current_datetime : 2017-09 11:29:40
*INFO* f_current_si : 1.0759763027
*INFO* f_current_price4pm : 301
*INFO* f_current_price4pmsi : 279.7459379280
*INFO* f_1_step_time : 11:29:41
*INFO* f_1_step_si : 1.1108416381
previous_pred_les_level : 292.4190297216
previous_pred_les_trend : -0.1257258479
f_1_step_pred_les_level : 281.6428009749
f_1_step_pred_les_trend : -0.1363763508
f_1_step_pred_les : 281.5064246241
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 281.5064246241
f_1_step_pred_price_inc : 312.7090578667
f_1_step_pred_price : 90411.7090578667
f_1_step_pred_price_rounded : 90400
f_1_step_pred_set_price_rounded : 90700
-------------------------------------------------
==>> Prediction Restuls in Python List : [90700]
[90700]
<<<< Record No.: 1993 >>>>
2017-09
11:29:41
90400
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:41
in_current_price : 90400.000000
*INFO* f_current_datetime : 2017-09 11:29:41
*INFO* f_current_si : 1.1108416381
*INFO* f_current_price4pm : 301
*INFO* f_current_price4pmsi : 270.9657161513
*INFO* f_1_step_time : 11:29:42
*INFO* f_1_step_si : 1.1660037147
previous_pred_les_level : 281.6428009749
previous_pred_les_trend : -0.1363763508
f_1_step_pred_les_level : 272.5592203558
f_1_step_pred_les_trend : -0.1453235551
f_1_step_pred_les : 272.4138968007
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 272.4138968007
f_1_step_pred_price_inc : 317.6356156148
f_1_step_pred_price : 90416.6356156148
f_1_step_pred_price_rounded : 90400
f_1_step_pred_set_price_rounded : 90700
-------------------------------------------------
==>> Prediction Restuls in Python List : [90700]
[90700]
<<<< Record No.: 1994 >>>>
2017-09
11:29:42
90400
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:42
in_current_price : 90400.000000
*INFO* f_current_datetime : 2017-09 11:29:42
*INFO* f_current_si : 1.1660037147
*INFO* f_current_price4pm : 301
*INFO* f_current_price4pmsi : 258.1466904406
*INFO* f_1_step_time : 11:29:43
*INFO* f_1_step_si : 1.2765898950
previous_pred_les_level : 272.5592203558
previous_pred_les_trend : -0.1453235551
f_1_step_pred_les_level : 260.3035524181
f_1_step_pred_les_trend : -0.1574338995
f_1_step_pred_les : 260.1461185186
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 260.1461185186
f_1_step_pred_price_inc : 332.0999061146
f_1_step_pred_price : 90431.0999061146
f_1_step_pred_price_rounded : 90400
f_1_step_pred_set_price_rounded : 90700
-------------------------------------------------
==>> Prediction Restuls in Python List : [90700]
[90700]
<<<< Record No.: 1995 >>>>
2017-09
11:29:43
90400
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:43
in_current_price : 90400.000000
*INFO* f_current_datetime : 2017-09 11:29:43
*INFO* f_current_si : 1.2765898950
*INFO* f_current_price4pm : 301
*INFO* f_current_price4pmsi : 235.7844137634
*INFO* f_1_step_time : 11:29:44
*INFO* f_1_step_si : 1.3892040979
previous_pred_les_level : 260.3035524181
previous_pred_les_trend : -0.1574338995
f_1_step_pred_les_level : 239.4673236035
f_1_step_pred_les_trend : -0.1781126944
f_1_step_pred_les : 239.2892109091
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 239.2892109091
f_1_step_pred_price_inc : 332.4215523794
f_1_step_pred_price : 90431.4215523794
f_1_step_pred_price_rounded : 90400
f_1_step_pred_set_price_rounded : 90700
-------------------------------------------------
==>> Prediction Restuls in Python List : [90700]
[90700]
<<<< Record No.: 1996 >>>>
2017-09
11:29:44
90400
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:44
in_current_price : 90400.000000
*INFO* f_current_datetime : 2017-09 11:29:44
*INFO* f_current_si : 1.3892040979
*INFO* f_current_price4pm : 301
*INFO* f_current_price4pmsi : 216.6708264494
*INFO* f_1_step_time : 11:29:45
*INFO* f_1_step_si : 1.4455133373
previous_pred_les_level : 239.4673236035
previous_pred_les_trend : -0.1781126944
f_1_step_pred_les_level : 220.0901877598
f_1_step_pred_les_trend : -0.1973117175
f_1_step_pred_les : 219.8928760422
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 219.8928760422
f_1_step_pred_price_inc : 317.8580850998
f_1_step_pred_price : 90416.8580850998
f_1_step_pred_price_rounded : 90400
f_1_step_pred_set_price_rounded : 90700
-------------------------------------------------
==>> Prediction Restuls in Python List : [90700]
[90700]
<<<< Record No.: 1997 >>>>
2017-09
11:29:45
90400
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:45
in_current_price : 90400.000000
*INFO* f_current_datetime : 2017-09 11:29:45
*INFO* f_current_si : 1.4455133373
*INFO* f_current_price4pm : 301
*INFO* f_current_price4pmsi : 208.2305242225
*INFO* f_1_step_time : 11:29:46
*INFO* f_1_step_si : 1.5735144860
previous_pred_les_level : 220.0901877598
previous_pred_les_trend : -0.1973117175
f_1_step_pred_les_level : 209.9935942009
f_1_step_pred_les_trend : -0.2072109994
f_1_step_pred_les : 209.7863832015
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 209.7863832015
f_1_step_pred_price_inc : 330.1019129355
f_1_step_pred_price : 90429.1019129355
f_1_step_pred_price_rounded : 90400
f_1_step_pred_set_price_rounded : 90700
-------------------------------------------------
==>> Prediction Restuls in Python List : [90700]
[90700]
<<<< Record No.: 1998 >>>>
2017-09
11:29:46
90500
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:46
in_current_price : 90500.000000
*INFO* f_current_datetime : 2017-09 11:29:46
*INFO* f_current_si : 1.5735144860
*INFO* f_current_price4pm : 401
*INFO* f_current_price4pmsi : 254.8435388202
*INFO* f_1_step_time : 11:29:47
*INFO* f_1_step_si : 1.6469907093
previous_pred_les_level : 209.9935942009
previous_pred_les_trend : -0.2072109994
f_1_step_pred_les_level : 248.0319694549
f_1_step_pred_les_trend : -0.1689654131
f_1_step_pred_les : 247.8630040418
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 247.8630040418
f_1_step_pred_price_inc : 408.2280648447
f_1_step_pred_price : 90507.2280648447
f_1_step_pred_price_rounded : 90500
f_1_step_pred_set_price_rounded : 90800
-------------------------------------------------
==>> Prediction Restuls in Python List : [90800]
[90800]
<<<< Record No.: 1999 >>>>
2017-09
11:29:47
90500
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:47
in_current_price : 90500.000000
*INFO* f_current_datetime : 2017-09 11:29:47
*INFO* f_current_si : 1.6469907093
*INFO* f_current_price4pm : 401
*INFO* f_current_price4pmsi : 243.4743546076
*INFO* f_1_step_time : 11:29:48
*INFO* f_1_step_si : 1.7528360537
previous_pred_les_level : 248.0319694549
previous_pred_les_trend : -0.1689654131
f_1_step_pred_les_level : 244.1378139323
f_1_step_pred_les_trend : -0.1726906032
f_1_step_pred_les : 243.9651233291
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 243.9651233291
f_1_step_pred_price_inc : 427.6308640186
f_1_step_pred_price : 90526.6308640186
f_1_step_pred_price_rounded : 90500
f_1_step_pred_set_price_rounded : 90800
-------------------------------------------------
==>> Prediction Restuls in Python List : [90800]
[90800]
<<<< Record No.: 2000 >>>>
2017-09
11:29:48
90700
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:48
in_current_price : 90700.000000
*INFO* f_current_datetime : 2017-09 11:29:48
*INFO* f_current_si : 1.7528360537
*INFO* f_current_price4pm : 601
*INFO* f_current_price4pmsi : 342.8729108627
*INFO* f_1_step_time : 11:29:49
*INFO* f_1_step_si : 1.7901007887
previous_pred_les_level : 244.1378139323
previous_pred_les_trend : -0.1726906032
f_1_step_pred_les_level : 327.9204078408
f_1_step_pred_les_trend : -0.0887353187
f_1_step_pred_les : 327.8316725221
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 327.8316725221
f_1_step_pred_price_inc : 586.8517355400
f_1_step_pred_price : 90685.8517355400
f_1_step_pred_price_rounded : 90700
f_1_step_pred_set_price_rounded : 91000
-------------------------------------------------
==>> Prediction Restuls in Python List : [91000]
[91000]
<<<< Record No.: 2001 >>>>
2017-09
11:29:49
90700
==>> Forecasting 1 out of next 1 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:49
in_current_price : 90700.000000
*INFO* f_current_datetime : 2017-09 11:29:49
*INFO* f_current_si : 1.7901007887
*INFO* f_current_price4pm : 601
*INFO* f_current_price4pmsi : 335.7352858546
*INFO* f_1_step_time : 11:29:50
*INFO* f_1_step_si : 1.9291876914
previous_pred_les_level : 327.9204078408
previous_pred_les_trend : -0.0887353187
f_1_step_pred_les_level : 334.5404476605
f_1_step_pred_les_trend : -0.0820265436
f_1_step_pred_les : 334.4584211169
f_1_step_pred_adj_misc : 0.0000000000
pred_les + pred_adj_misc : 334.4584211169
f_1_step_pred_price_inc : 645.2330692874
f_1_step_pred_price : 90744.2330692874
f_1_step_pred_price_rounded : 90700
f_1_step_pred_set_price_rounded : 91000
-------------------------------------------------
==>> Prediction Restuls in Python List : [91000]
[91000]
In [10]:
# Upon receiving 11:29:50 second price, to predict till 11:30:00 <- ten-step forward price forecasting
for i in range(shl_sm_parm_ccyy_mm_offset+50, shl_sm_parm_ccyy_mm_offset+51): # use csv data as simulation
print('\n<<<< Record No.: %5d >>>>' % i)
print(shl_sm_data['ccyy-mm'][i]) # format: ccyy-mm
print(shl_sm_data['time'][i]) # format: hh:mm:ss
print(shl_sm_data['bid-price'][i]) # format: integer/boost-trap-float
######################################################################################################################
# call prediction function, returned result is in 'list' format, i.e. [89400, 89400, 89400, 89500, 89500, 89500, 89500, 89600, 89600, 89600]
shl_sm_prediction_list_local_k = shl_pm.shl_predict_price_k_step(shl_sm_data['time'][i], shl_sm_data['bid-price'][i],10) # <- ten-step forward price forecasting
print(shl_sm_prediction_list_local_k)
######################################################################################################################
<<<< Record No.: 2002 >>>>
2017-09
11:29:50
90700
==>> Forecasting 1 out of next 10 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:50
in_current_price : 90700.000000
*INFO* f_current_datetime : 2017-09 11:29:50
*INFO* f_current_si : 1.9291876914
*INFO* f_current_price4pm : 601
*INFO* f_current_price4pmsi : 311.5300821659
*INFO* f_1_step_time : 11:29:51
*INFO* f_1_step_si : 1.9989322682
*INFO* sec50_error : 44.2330692874
*INFO* sec46_49_error : -251.1874226613
*INFO* shl_global_parm_short_weight_misc : -41.3908706748
*INFO* shl_global_parm_short_weight_ratio : 1
previous_pred_les_level : 334.5404476605
previous_pred_les_trend : -0.0820265436
f_1_step_pred_les_level : 314.9963012170
f_1_step_pred_les_trend : -0.1014886635
f_1_step_pred_les : 314.8948125535
f_1_step_pred_adj_misc : -0.7758174067
pred_les + pred_adj_misc : 314.1189951468
f_1_step_pred_price_inc : 627.9025954669
f_1_step_pred_price : 90726.9025954669
f_1_step_pred_price_rounded : 90700
f_1_step_pred_set_price_rounded : 91000
-------------------------------------------------
==>> Forecasting 2 out of next 10 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:51
in_current_price : 90726.902595
*INFO* f_current_datetime : 2017-09 11:29:51
*INFO* f_current_si : 1.9989322682
*INFO* f_current_price4pm : 627
*INFO* f_current_price4pmsi : 314.1189951468
*INFO* f_1_step_time : 11:29:52
*INFO* f_1_step_si : 2.0656315104
*INFO* shl_global_parm_short_weight_ratio : 2
previous_pred_les_level : 314.9963012170
previous_pred_les_trend : -0.1014886635
f_1_step_pred_les_level : 314.2362802707
f_1_step_pred_les_trend : -0.1021471958
f_1_step_pred_les : 314.1341330749
f_1_step_pred_adj_misc : -1.5516348134
pred_les + pred_adj_misc : 312.5824982615
f_1_step_pred_price_inc : 645.6802580155
f_1_step_pred_price : 90744.6802580155
f_1_step_pred_price_rounded : 90700
f_1_step_pred_set_price_rounded : 91000
-------------------------------------------------
==>> Forecasting 3 out of next 10 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:52
in_current_price : 90744.680258
*INFO* f_current_datetime : 2017-09 11:29:52
*INFO* f_current_si : 2.0656315104
*INFO* f_current_price4pm : 645
*INFO* f_current_price4pmsi : 312.5824982615
*INFO* f_1_step_time : 11:29:53
*INFO* f_1_step_si : 2.1762324236
*INFO* shl_global_parm_short_weight_ratio : 3
previous_pred_les_level : 314.2362802707
previous_pred_les_trend : -0.1021471958
f_1_step_pred_les_level : 312.8170685094
f_1_step_pred_les_trend : -0.1034642603
f_1_step_pred_les : 312.7136042490
f_1_step_pred_adj_misc : -2.3274522201
pred_les + pred_adj_misc : 310.3861520289
f_1_step_pred_price_inc : 675.4724078803
f_1_step_pred_price : 90774.4724078803
f_1_step_pred_price_rounded : 90800
f_1_step_pred_set_price_rounded : 91100
-------------------------------------------------
==>> Forecasting 4 out of next 10 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:53
in_current_price : 90774.472408
*INFO* f_current_datetime : 2017-09 11:29:53
*INFO* f_current_si : 2.1762324236
*INFO* f_current_price4pm : 675
*INFO* f_current_price4pmsi : 310.3861520289
*INFO* f_1_step_time : 11:29:54
*INFO* f_1_step_si : 2.2959546949
*INFO* shl_global_parm_short_weight_ratio : 4
previous_pred_les_level : 312.8170685094
previous_pred_les_trend : -0.1034642603
f_1_step_pred_les_level : 310.7380074007
f_1_step_pred_les_trend : -0.1054398572
f_1_step_pred_les : 310.6325675435
f_1_step_pred_adj_misc : -3.1032696268
pred_les + pred_adj_misc : 307.5292979166
f_1_step_pred_price_inc : 706.0733353668
f_1_step_pred_price : 90805.0733353668
f_1_step_pred_price_rounded : 90800
f_1_step_pred_set_price_rounded : 91100
-------------------------------------------------
==>> Forecasting 5 out of next 10 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:54
in_current_price : 90805.073335
*INFO* f_current_datetime : 2017-09 11:29:54
*INFO* f_current_si : 2.2959546949
*INFO* f_current_price4pm : 706
*INFO* f_current_price4pmsi : 307.5292979166
*INFO* f_1_step_time : 11:29:55
*INFO* f_1_step_si : 2.4167518634
*INFO* shl_global_parm_short_weight_ratio : 5
previous_pred_les_level : 310.7380074007
previous_pred_les_trend : -0.1054398572
f_1_step_pred_les_level : 307.9984384124
f_1_step_pred_les_trend : -0.1080739863
f_1_step_pred_les : 307.8903644260
f_1_step_pred_adj_misc : -3.8790870336
pred_les + pred_adj_misc : 304.0112773925
f_1_step_pred_price_inc : 734.7198211334
f_1_step_pred_price : 90833.7198211334
f_1_step_pred_price_rounded : 90800
f_1_step_pred_set_price_rounded : 91100
-------------------------------------------------
==>> Forecasting 6 out of next 10 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:55
in_current_price : 90833.719821
*INFO* f_current_datetime : 2017-09 11:29:55
*INFO* f_current_si : 2.4167518634
*INFO* f_current_price4pm : 734
*INFO* f_current_price4pmsi : 304.0112773925
*INFO* f_1_step_time : 11:29:56
*INFO* f_1_step_si : 2.5507155017
*INFO* shl_global_parm_short_weight_ratio : 6
previous_pred_les_level : 307.9984384124
previous_pred_les_trend : -0.1080739863
f_1_step_pred_les_level : 304.5977030121
f_1_step_pred_les_trend : -0.1113666477
f_1_step_pred_les : 304.4863363644
f_1_step_pred_adj_misc : -4.6549044403
pred_les + pred_adj_misc : 299.8314319241
f_1_step_pred_price_inc : 764.7846813105
f_1_step_pred_price : 90863.7846813105
f_1_step_pred_price_rounded : 90900
f_1_step_pred_set_price_rounded : 91200
-------------------------------------------------
==>> Forecasting 7 out of next 10 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:56
in_current_price : 90863.784681
*INFO* f_current_datetime : 2017-09 11:29:56
*INFO* f_current_si : 2.5507155017
*INFO* f_current_price4pm : 764
*INFO* f_current_price4pmsi : 299.8314319241
*INFO* f_1_step_time : 11:29:57
*INFO* f_1_step_si : 2.7036260128
*INFO* shl_global_parm_short_weight_ratio : 7
previous_pred_les_level : 304.5977030121
previous_pred_les_trend : -0.1113666477
f_1_step_pred_les_level : 300.5351426677
f_1_step_pred_les_trend : -0.1153178414
f_1_step_pred_les : 300.4198248263
f_1_step_pred_adj_misc : -5.4307218470
pred_les + pred_adj_misc : 294.9891029793
f_1_step_pred_price_inc : 797.5402123158
f_1_step_pred_price : 90896.5402123158
f_1_step_pred_price_rounded : 90900
f_1_step_pred_set_price_rounded : 91200
-------------------------------------------------
==>> Forecasting 8 out of next 10 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:57
in_current_price : 90896.540212
*INFO* f_current_datetime : 2017-09 11:29:57
*INFO* f_current_si : 2.7036260128
*INFO* f_current_price4pm : 797
*INFO* f_current_price4pmsi : 294.9891029793
*INFO* f_1_step_time : 11:29:58
*INFO* f_1_step_si : 2.7679954159
*INFO* shl_global_parm_short_weight_ratio : 8
previous_pred_les_level : 300.5351426677
previous_pred_les_trend : -0.1153178414
f_1_step_pred_les_level : 295.8100988468
f_1_step_pred_les_trend : -0.1199275674
f_1_step_pred_les : 295.6901712794
f_1_step_pred_adj_misc : -6.2065392537
pred_les + pred_adj_misc : 289.4836320257
f_1_step_pred_price_inc : 801.2893664356
f_1_step_pred_price : 90900.2893664356
f_1_step_pred_price_rounded : 90900
f_1_step_pred_set_price_rounded : 91200
-------------------------------------------------
==>> Forecasting 9 out of next 10 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:58
in_current_price : 90900.289366
*INFO* f_current_datetime : 2017-09 11:29:58
*INFO* f_current_si : 2.7679954159
*INFO* f_current_price4pm : 801
*INFO* f_current_price4pmsi : 289.4836320257
*INFO* f_1_step_time : 11:29:59
*INFO* f_1_step_si : 2.9179195994
*INFO* shl_global_parm_short_weight_ratio : 9
previous_pred_les_level : 295.8100988468
previous_pred_les_trend : -0.1199275674
f_1_step_pred_les_level : 290.4219130171
f_1_step_pred_les_trend : -0.1251958257
f_1_step_pred_les : 290.2967171914
f_1_step_pred_adj_misc : -6.9823566604
pred_les + pred_adj_misc : 283.3143605310
f_1_step_pred_price_inc : 826.6885253928
f_1_step_pred_price : 90925.6885253928
f_1_step_pred_price_rounded : 90900
f_1_step_pred_set_price_rounded : 91200
-------------------------------------------------
==>> Forecasting 10 out of next 10 seconds/steps...
+-----------------------------------------------+
| shl_predict_price_1_step() |
+-----------------------------------------------+
current_ccyy_mm : 2017-09
in_current_time : 11:29:59
in_current_price : 90925.688525
*INFO* f_current_datetime : 2017-09 11:29:59
*INFO* f_current_si : 2.9179195994
*INFO* f_current_price4pm : 826
*INFO* f_current_price4pmsi : 283.3143605310
*INFO* f_1_step_time : 11:30:00
*INFO* f_1_step_si : 3.0586081454
*INFO* shl_global_parm_short_weight_ratio : 10
previous_pred_les_level : 290.4219130171
previous_pred_les_trend : -0.1251958257
f_1_step_pred_les_level : 284.3699266464
f_1_step_pred_les_trend : -0.1311226162
f_1_step_pred_les : 284.2388040302
f_1_step_pred_adj_misc : -7.7581740671
pred_les + pred_adj_misc : 276.4806299631
f_1_step_pred_price_inc : 845.6459068442
f_1_step_pred_price : 90944.6459068442
f_1_step_pred_price_rounded : 90900
f_1_step_pred_set_price_rounded : 91200
-------------------------------------------------
==>> Prediction Restuls in Python List : [91000, 91000, 91100, 91100, 91100, 91200, 91200, 91200, 91200, 91200]
[91000, 91000, 91100, 91100, 91100, 91200, 91200, 91200, 91200, 91200]
In [11]:
print(shl_sm_prediction_list_local_k)
[91000, 91000, 91100, 91100, 91100, 91200, 91200, 91200, 91200, 91200]
In [12]:
shl_pm.shl_data_pm_1_step.tail(11)
Out[12]:
ccyy-mm
f_1_step_pred_adj_misc
f_1_step_pred_les
f_1_step_pred_les_level
f_1_step_pred_les_trend
f_1_step_pred_price
f_1_step_pred_price_inc
f_1_step_pred_price_rounded
f_1_step_pred_set_price_rounded
f_1_step_si
f_1_step_time
f_current_bid
f_current_datetime
f_current_price4pm
f_current_price4pmsi
f_current_si
40
2017-09
0.000000
281.506425
281.642801
-0.136376
90411.709058
312.709058
90400.0
90700.0
1.110842
11:29:41
90400.0
2017-09 11:29:40
301.0
279.745938
1.075976
41
2017-09
0.000000
272.413897
272.559220
-0.145324
90416.635616
317.635616
90400.0
90700.0
1.166004
11:29:42
90400.0
2017-09 11:29:41
301.0
270.965716
1.110842
42
2017-09
0.000000
260.146119
260.303552
-0.157434
90431.099906
332.099906
90400.0
90700.0
1.276590
11:29:43
90400.0
2017-09 11:29:42
301.0
258.146690
1.166004
43
2017-09
0.000000
239.289211
239.467324
-0.178113
90431.421552
332.421552
90400.0
90700.0
1.389204
11:29:44
90400.0
2017-09 11:29:43
301.0
235.784414
1.276590
44
2017-09
0.000000
219.892876
220.090188
-0.197312
90416.858085
317.858085
90400.0
90700.0
1.445513
11:29:45
90400.0
2017-09 11:29:44
301.0
216.670826
1.389204
45
2017-09
0.000000
209.786383
209.993594
-0.207211
90429.101913
330.101913
90400.0
90700.0
1.573514
11:29:46
90400.0
2017-09 11:29:45
301.0
208.230524
1.445513
46
2017-09
0.000000
247.863004
248.031969
-0.168965
90507.228065
408.228065
90500.0
90800.0
1.646991
11:29:47
90500.0
2017-09 11:29:46
401.0
254.843539
1.573514
47
2017-09
0.000000
243.965123
244.137814
-0.172691
90526.630864
427.630864
90500.0
90800.0
1.752836
11:29:48
90500.0
2017-09 11:29:47
401.0
243.474355
1.646991
48
2017-09
0.000000
327.831673
327.920408
-0.088735
90685.851736
586.851736
90700.0
91000.0
1.790101
11:29:49
90700.0
2017-09 11:29:48
601.0
342.872911
1.752836
49
2017-09
0.000000
334.458421
334.540448
-0.082027
90744.233069
645.233069
90700.0
91000.0
1.929188
11:29:50
90700.0
2017-09 11:29:49
601.0
335.735286
1.790101
50
2017-09
-0.775817
314.894813
314.996301
-0.101489
90726.902595
627.902595
90700.0
91000.0
1.998932
11:29:51
90700.0
2017-09 11:29:50
601.0
311.530082
1.929188
In [13]:
shl_pm.shl_data_pm_k_step.tail(20)
Out[13]:
ccyy-mm
f_1_step_pred_adj_misc
f_1_step_pred_les
f_1_step_pred_les_level
f_1_step_pred_les_trend
f_1_step_pred_price
f_1_step_pred_price_inc
f_1_step_pred_price_rounded
f_1_step_pred_set_price_rounded
f_1_step_si
f_1_step_time
f_current_bid
f_current_datetime
f_current_price4pm
f_current_price4pmsi
f_current_si
40
2017-09
0.000000
281.506425
281.642801
-0.136376
90411.709058
312.709058
90400.0
90700.0
1.110842
11:29:41
90400.000000
2017-09 11:29:40
301.000000
279.745938
1.075976
41
2017-09
0.000000
272.413897
272.559220
-0.145324
90416.635616
317.635616
90400.0
90700.0
1.166004
11:29:42
90400.000000
2017-09 11:29:41
301.000000
270.965716
1.110842
42
2017-09
0.000000
260.146119
260.303552
-0.157434
90431.099906
332.099906
90400.0
90700.0
1.276590
11:29:43
90400.000000
2017-09 11:29:42
301.000000
258.146690
1.166004
43
2017-09
0.000000
239.289211
239.467324
-0.178113
90431.421552
332.421552
90400.0
90700.0
1.389204
11:29:44
90400.000000
2017-09 11:29:43
301.000000
235.784414
1.276590
44
2017-09
0.000000
219.892876
220.090188
-0.197312
90416.858085
317.858085
90400.0
90700.0
1.445513
11:29:45
90400.000000
2017-09 11:29:44
301.000000
216.670826
1.389204
45
2017-09
0.000000
209.786383
209.993594
-0.207211
90429.101913
330.101913
90400.0
90700.0
1.573514
11:29:46
90400.000000
2017-09 11:29:45
301.000000
208.230524
1.445513
46
2017-09
0.000000
247.863004
248.031969
-0.168965
90507.228065
408.228065
90500.0
90800.0
1.646991
11:29:47
90500.000000
2017-09 11:29:46
401.000000
254.843539
1.573514
47
2017-09
0.000000
243.965123
244.137814
-0.172691
90526.630864
427.630864
90500.0
90800.0
1.752836
11:29:48
90500.000000
2017-09 11:29:47
401.000000
243.474355
1.646991
48
2017-09
0.000000
327.831673
327.920408
-0.088735
90685.851736
586.851736
90700.0
91000.0
1.790101
11:29:49
90700.000000
2017-09 11:29:48
601.000000
342.872911
1.752836
49
2017-09
0.000000
334.458421
334.540448
-0.082027
90744.233069
645.233069
90700.0
91000.0
1.929188
11:29:50
90700.000000
2017-09 11:29:49
601.000000
335.735286
1.790101
50
2017-09
-0.775817
314.894813
314.996301
-0.101489
90726.902595
627.902595
90700.0
91000.0
1.998932
11:29:51
90700.000000
2017-09 11:29:50
601.000000
311.530082
1.929188
51
2017-09
-1.551635
314.134133
314.236280
-0.102147
90744.680258
645.680258
90700.0
91000.0
2.065632
11:29:52
90726.902595
2017-09 11:29:51
627.902595
314.118995
1.998932
52
2017-09
-2.327452
312.713604
312.817069
-0.103464
90774.472408
675.472408
90800.0
91100.0
2.176232
11:29:53
90744.680258
2017-09 11:29:52
645.680258
312.582498
2.065632
53
2017-09
-3.103270
310.632568
310.738007
-0.105440
90805.073335
706.073335
90800.0
91100.0
2.295955
11:29:54
90774.472408
2017-09 11:29:53
675.472408
310.386152
2.176232
54
2017-09
-3.879087
307.890364
307.998438
-0.108074
90833.719821
734.719821
90800.0
91100.0
2.416752
11:29:55
90805.073335
2017-09 11:29:54
706.073335
307.529298
2.295955
55
2017-09
-4.654904
304.486336
304.597703
-0.111367
90863.784681
764.784681
90900.0
91200.0
2.550716
11:29:56
90833.719821
2017-09 11:29:55
734.719821
304.011277
2.416752
56
2017-09
-5.430722
300.419825
300.535143
-0.115318
90896.540212
797.540212
90900.0
91200.0
2.703626
11:29:57
90863.784681
2017-09 11:29:56
764.784681
299.831432
2.550716
57
2017-09
-6.206539
295.690171
295.810099
-0.119928
90900.289366
801.289366
90900.0
91200.0
2.767995
11:29:58
90896.540212
2017-09 11:29:57
797.540212
294.989103
2.703626
58
2017-09
-6.982357
290.296717
290.421913
-0.125196
90925.688525
826.688525
90900.0
91200.0
2.917920
11:29:59
90900.289366
2017-09 11:29:58
801.289366
289.483632
2.767995
59
2017-09
-7.758174
284.238804
284.369927
-0.131123
90944.645907
845.645907
90900.0
91200.0
3.058608
11:30:00
90925.688525
2017-09 11:29:59
826.688525
283.314361
2.917920
In [ ]:
In [14]:
%matplotlib inline
import matplotlib.pyplot as plt
In [15]:
shl_data_pm_k_step_local = shl_pm.shl_data_pm_k_step.copy()
shl_data_pm_k_step_local.index = shl_data_pm_k_step_local.index + 1
shl_data_pm_k_step_local
Out[15]:
ccyy-mm
f_1_step_pred_adj_misc
f_1_step_pred_les
f_1_step_pred_les_level
f_1_step_pred_les_trend
f_1_step_pred_price
f_1_step_pred_price_inc
f_1_step_pred_price_rounded
f_1_step_pred_set_price_rounded
f_1_step_si
f_1_step_time
f_current_bid
f_current_datetime
f_current_price4pm
f_current_price4pmsi
f_current_si
1
2017-09
0.000000
425.008790
425.008790
0.000000
90107.878192
8.878192
90100.0
90400.0
0.020889
11:29:01
90100.000000
2017-09 11:29:00
1.000000
425.008790
0.002353
2
2017-09
0.000000
104.565213
104.885337
-0.320123
90102.716326
3.716326
90100.0
90400.0
0.035541
11:29:02
90100.000000
2017-09 11:29:01
1.000000
47.871095
0.020889
3
2017-09
0.000000
39.305886
39.690884
-0.384998
90100.646571
1.646571
90100.0
90400.0
0.041891
11:29:03
90100.000000
2017-09 11:29:02
1.000000
28.136714
0.035541
4
2017-09
0.000000
25.806598
26.204697
-0.398099
90100.270680
1.270680
90100.0
90400.0
0.049239
11:29:04
90100.000000
2017-09 11:29:03
1.000000
23.871365
0.041891
5
2017-09
0.000000
20.737583
21.140348
-0.402765
90100.013346
1.013346
90100.0
90400.0
0.048865
11:29:05
90100.000000
2017-09 11:29:04
1.000000
20.309285
0.049239
6
2017-09
0.000000
20.102755
20.505752
-0.402997
90100.642584
1.642584
90100.0
90400.0
0.081709
11:29:06
90100.000000
2017-09 11:29:05
1.000000
20.464463
0.048865
7
2017-09
0.000000
13.017713
13.427386
-0.409672
90100.277808
1.277808
90100.0
90400.0
0.098159
11:29:07
90100.000000
2017-09 11:29:06
1.000000
12.238497
0.081709
8
2017-09
0.000000
10.203317
10.615392
-0.412075
90100.427460
1.427460
90100.0
90400.0
0.139902
11:29:08
90100.000000
2017-09 11:29:07
1.000000
10.187537
0.098159
9
2017-09
0.000000
7.195126
7.609794
-0.414668
90100.459944
1.459944
90100.0
90400.0
0.202907
11:29:09
90100.000000
2017-09 11:29:08
1.000000
7.147885
0.139902
10
2017-09
0.000000
4.854447
5.271040
-0.416592
90100.151187
1.151187
90100.0
90400.0
0.237141
11:29:10
90100.000000
2017-09 11:29:09
1.000000
4.928359
0.202907
11
2017-09
0.000000
3.896154
4.313287
-0.417134
90100.140194
1.140194
90100.0
90400.0
0.292646
11:29:11
90100.000000
2017-09 11:29:10
1.000000
4.216906
0.237141
12
2017-09
0.000000
3.071979
3.489520
-0.417540
90100.047199
1.047199
90100.0
90400.0
0.340888
11:29:12
90100.000000
2017-09 11:29:11
1.000000
3.417098
0.292646
13
2017-09
0.000000
2.536793
2.954451
-0.417658
90099.906873
0.906873
90100.0
90400.0
0.357488
11:29:13
90100.000000
2017-09 11:29:12
1.000000
2.933519
0.340888
14
2017-09
0.000000
2.340479
2.757916
-0.417437
90099.879049
0.879049
90100.0
90400.0
0.375585
11:29:14
90100.000000
2017-09 11:29:13
1.000000
2.797298
0.357488
15
2017-09
0.000000
2.196666
2.613829
-0.417163
90099.887140
0.887140
90100.0
90400.0
0.403858
11:29:15
90100.000000
2017-09 11:29:14
1.000000
2.662513
0.375585
16
2017-09
0.000000
212.406156
212.612903
-0.206747
90188.875149
89.875149
90200.0
90500.0
0.423129
11:29:16
90200.000000
2017-09 11:29:15
101.000000
250.088202
0.403858
17
2017-09
0.000000
234.538903
234.723332
-0.184430
90207.216038
108.216038
90200.0
90500.0
0.461399
11:29:17
90200.000000
2017-09 11:29:16
101.000000
238.698039
0.423129
18
2017-09
0.000000
221.066041
221.263746
-0.197705
90207.110066
108.110066
90200.0
90500.0
0.489040
11:29:18
90200.000000
2017-09 11:29:17
101.000000
218.899430
0.461399
19
2017-09
0.000000
382.258172
382.294649
-0.036476
90293.221136
194.221136
90300.0
90600.0
0.508089
11:29:19
90300.000000
2017-09 11:29:18
201.000000
411.009592
0.489040
20
2017-09
0.000000
393.557932
393.583083
-0.025151
90307.135005
208.135005
90300.0
90600.0
0.528855
11:29:20
90300.000000
2017-09 11:29:19
201.000000
395.600059
0.508089
21
2017-09
0.000000
382.069485
382.106088
-0.036603
90314.854128
215.854128
90300.0
90600.0
0.564960
11:29:21
90300.000000
2017-09 11:29:20
201.000000
380.066506
0.528855
22
2017-09
0.000000
359.693004
359.751925
-0.058921
90305.967816
206.967816
90300.0
90600.0
0.575401
11:29:22
90300.000000
2017-09 11:29:21
201.000000
355.777150
0.564960
23
2017-09
0.000000
350.821642
350.889367
-0.067724
90304.647361
205.647361
90300.0
90600.0
0.586188
11:29:23
90300.000000
2017-09 11:29:22
201.000000
349.321432
0.575401
24
2017-09
0.000000
488.966500
488.896150
0.070350
90399.025194
300.025194
90400.0
90700.0
0.613590
11:29:24
90400.000000
2017-09 11:29:23
301.000000
513.487329
0.586188
25
2017-09
0.000000
490.386718
490.315019
0.071699
90418.825918
319.825918
90400.0
90700.0
0.652191
11:29:25
90400.000000
2017-09 11:29:24
301.000000
490.555192
0.613590
26
2017-09
0.000000
465.932071
465.884874
0.047197
90410.458696
311.458696
90400.0
90700.0
0.668464
11:29:26
90400.000000
2017-09 11:29:25
301.000000
461.521076
0.652191
27
2017-09
0.000000
452.685402
452.651485
0.033916
90410.327204
311.327204
90400.0
90700.0
0.687734
11:29:27
90400.000000
2017-09 11:29:26
301.000000
450.286203
0.668464
28
2017-09
0.000000
439.960401
439.939231
0.021170
90415.205265
316.205265
90400.0
90700.0
0.718713
11:29:28
90400.000000
2017-09 11:29:27
301.000000
437.669128
0.687734
29
2017-09
0.000000
422.005693
422.002481
0.003212
90408.193009
309.193009
90400.0
90700.0
0.732675
11:29:29
90400.000000
2017-09 11:29:28
301.000000
418.804161
0.718713
30
2017-09
0.000000
412.507590
412.513870
-0.006280
90418.030573
319.030573
90400.0
90700.0
0.773393
11:29:30
90400.000000
2017-09 11:29:29
301.000000
410.823369
0.732675
31
2017-09
0.000000
392.692391
392.718460
-0.026069
90408.726475
309.726475
90400.0
90700.0
0.788725
11:29:31
90400.000000
2017-09 11:29:30
301.000000
389.194000
0.773393
32
2017-09
0.000000
383.265526
383.300987
-0.035460
90410.597704
311.597704
90400.0
90700.0
0.813007
11:29:32
90400.000000
2017-09 11:29:31
301.000000
381.628370
0.788725
33
2017-09
0.000000
372.154423
372.200948
-0.046525
90408.738067
309.738067
90400.0
90700.0
0.832284
11:29:33
90400.000000
2017-09 11:29:32
301.000000
370.230338
0.813007
34
2017-09
0.000000
363.187267
363.242703
-0.055437
90412.054225
313.054225
90400.0
90700.0
0.861964
11:29:34
90400.000000
2017-09 11:29:33
301.000000
361.655519
0.832284
35
2017-09
0.000000
351.249491
351.316798
-0.067307
90421.907916
322.907916
90400.0
90700.0
0.919312
11:29:35
90400.000000
2017-09 11:29:34
301.000000
349.202658
0.861964
36
2017-09
0.000000
330.933831
331.021366
-0.087535
90413.162186
314.162186
90400.0
90700.0
0.949320
11:29:36
90400.000000
2017-09 11:29:35
301.000000
327.418721
0.919312
37
2017-09
0.000000
319.065709
319.165013
-0.099304
90411.156824
312.156824
90400.0
90700.0
0.978347
11:29:37
90400.000000
2017-09 11:29:36
301.000000
317.068977
0.949320
38
2017-09
0.000000
309.276946
309.385930
-0.108984
90408.114796
309.114796
90400.0
90700.0
0.999476
11:29:38
90400.000000
2017-09 11:29:37
301.000000
307.661953
0.978347
39
2017-09
0.000000
302.269425
302.385300
-0.115875
90412.017396
313.017396
90400.0
90700.0
1.035558
11:29:39
90400.000000
2017-09 11:29:38
301.000000
301.157893
0.999476
40
2017-09
0.000000
292.293304
292.419030
-0.125726
90413.500668
314.500668
90400.0
90700.0
1.075976
11:29:40
90400.000000
2017-09 11:29:39
301.000000
290.664666
1.035558
41
2017-09
0.000000
281.506425
281.642801
-0.136376
90411.709058
312.709058
90400.0
90700.0
1.110842
11:29:41
90400.000000
2017-09 11:29:40
301.000000
279.745938
1.075976
42
2017-09
0.000000
272.413897
272.559220
-0.145324
90416.635616
317.635616
90400.0
90700.0
1.166004
11:29:42
90400.000000
2017-09 11:29:41
301.000000
270.965716
1.110842
43
2017-09
0.000000
260.146119
260.303552
-0.157434
90431.099906
332.099906
90400.0
90700.0
1.276590
11:29:43
90400.000000
2017-09 11:29:42
301.000000
258.146690
1.166004
44
2017-09
0.000000
239.289211
239.467324
-0.178113
90431.421552
332.421552
90400.0
90700.0
1.389204
11:29:44
90400.000000
2017-09 11:29:43
301.000000
235.784414
1.276590
45
2017-09
0.000000
219.892876
220.090188
-0.197312
90416.858085
317.858085
90400.0
90700.0
1.445513
11:29:45
90400.000000
2017-09 11:29:44
301.000000
216.670826
1.389204
46
2017-09
0.000000
209.786383
209.993594
-0.207211
90429.101913
330.101913
90400.0
90700.0
1.573514
11:29:46
90400.000000
2017-09 11:29:45
301.000000
208.230524
1.445513
47
2017-09
0.000000
247.863004
248.031969
-0.168965
90507.228065
408.228065
90500.0
90800.0
1.646991
11:29:47
90500.000000
2017-09 11:29:46
401.000000
254.843539
1.573514
48
2017-09
0.000000
243.965123
244.137814
-0.172691
90526.630864
427.630864
90500.0
90800.0
1.752836
11:29:48
90500.000000
2017-09 11:29:47
401.000000
243.474355
1.646991
49
2017-09
0.000000
327.831673
327.920408
-0.088735
90685.851736
586.851736
90700.0
91000.0
1.790101
11:29:49
90700.000000
2017-09 11:29:48
601.000000
342.872911
1.752836
50
2017-09
0.000000
334.458421
334.540448
-0.082027
90744.233069
645.233069
90700.0
91000.0
1.929188
11:29:50
90700.000000
2017-09 11:29:49
601.000000
335.735286
1.790101
51
2017-09
-0.775817
314.894813
314.996301
-0.101489
90726.902595
627.902595
90700.0
91000.0
1.998932
11:29:51
90700.000000
2017-09 11:29:50
601.000000
311.530082
1.929188
52
2017-09
-1.551635
314.134133
314.236280
-0.102147
90744.680258
645.680258
90700.0
91000.0
2.065632
11:29:52
90726.902595
2017-09 11:29:51
627.902595
314.118995
1.998932
53
2017-09
-2.327452
312.713604
312.817069
-0.103464
90774.472408
675.472408
90800.0
91100.0
2.176232
11:29:53
90744.680258
2017-09 11:29:52
645.680258
312.582498
2.065632
54
2017-09
-3.103270
310.632568
310.738007
-0.105440
90805.073335
706.073335
90800.0
91100.0
2.295955
11:29:54
90774.472408
2017-09 11:29:53
675.472408
310.386152
2.176232
55
2017-09
-3.879087
307.890364
307.998438
-0.108074
90833.719821
734.719821
90800.0
91100.0
2.416752
11:29:55
90805.073335
2017-09 11:29:54
706.073335
307.529298
2.295955
56
2017-09
-4.654904
304.486336
304.597703
-0.111367
90863.784681
764.784681
90900.0
91200.0
2.550716
11:29:56
90833.719821
2017-09 11:29:55
734.719821
304.011277
2.416752
57
2017-09
-5.430722
300.419825
300.535143
-0.115318
90896.540212
797.540212
90900.0
91200.0
2.703626
11:29:57
90863.784681
2017-09 11:29:56
764.784681
299.831432
2.550716
58
2017-09
-6.206539
295.690171
295.810099
-0.119928
90900.289366
801.289366
90900.0
91200.0
2.767995
11:29:58
90896.540212
2017-09 11:29:57
797.540212
294.989103
2.703626
59
2017-09
-6.982357
290.296717
290.421913
-0.125196
90925.688525
826.688525
90900.0
91200.0
2.917920
11:29:59
90900.289366
2017-09 11:29:58
801.289366
289.483632
2.767995
60
2017-09
-7.758174
284.238804
284.369927
-0.131123
90944.645907
845.645907
90900.0
91200.0
3.058608
11:30:00
90925.688525
2017-09 11:29:59
826.688525
283.314361
2.917920
In [16]:
# bid is predicted bid-price from shl_pm
plt.figure(figsize=(12,6))
plt.plot(shl_pm.shl_data_pm_k_step['f_current_bid'])
# plt.plot(shl_data_pm_1_step_k_step['f_1_step_pred_price'].shift(1))
plt.plot(shl_data_pm_k_step_local['f_1_step_pred_price'])
# bid is actual bid-price from raw dataset
shl_data_actual_bid_local = shl_sm_data[shl_sm_parm_ccyy_mm_offset:shl_sm_parm_ccyy_mm_offset+61].copy()
shl_data_actual_bid_local.reset_index(inplace=True)
plt.figure(figsize=(12,6))
plt.plot(shl_data_actual_bid_local['bid-price'])
plt.plot(shl_data_pm_k_step_local['f_1_step_pred_price'])
plt.figure(figsize=(12,6))
plt.plot(shl_data_actual_bid_local['bid-price'])
plt.plot(shl_data_pm_k_step_local['f_1_step_pred_price_rounded'])
plt.plot(shl_data_pm_k_step_local['f_1_step_pred_set_price_rounded'])
Out[16]:
[<matplotlib.lines.Line2D at 0x7f31066f5240>]
In [17]:
print('Dynamic Increment : +%d' % shl_pm.shl_global_parm_dynamic_increment)
Dynamic Increment : +300
In [18]:
# pd.concat([shl_data_actual_bid_local['bid-price'], shl_data_pm_k_step_local['f_1_step_pred_price'], shl_data_pm_k_step_local['f_1_step_pred_price'] - shl_data_actual_bid_local['bid-price']], axis=1, join='inner')
pd.concat([shl_data_actual_bid_local['bid-price'].tail(11), shl_data_pm_k_step_local['f_1_step_pred_price'].tail(11), shl_data_pm_k_step_local['f_1_step_pred_price'].tail(11) - shl_data_actual_bid_local['bid-price'].tail(11)], axis=1, join='inner')
Out[18]:
bid-price
f_1_step_pred_price
0
50
90700
90744.233069
44.233069
51
90700
90726.902595
26.902595
52
90700
90744.680258
44.680258
53
90800
90774.472408
-25.527592
54
90800
90805.073335
5.073335
55
90800
90833.719821
33.719821
56
90900
90863.784681
-36.215319
57
91000
90896.540212
-103.459788
58
91000
90900.289366
-99.710634
59
91200
90925.688525
-274.311475
60
91300
90944.645907
-355.354093
Content source: telescopeuser/uat_shl
Similar notebooks: