SHL github project: uat_shl

  • training module: shl_tm

  • prediction module: shl_pm

  • simulation module: shl_sm

  • misc module: shl_mm

data feeds:

  • historical bidding price, per second, time series

  • live bidding price, per second, time series

parameter lookup table: python dictionary

  • parm_si (seasonality index per second)

  • parm_month (parameter like alpha, beta, gamma, etc. per month)

[1] Import useful reference packages


In [1]:
import pandas as pd

Initialization


In [2]:
# function to fetch Seasonality-Index
def shl_intra_fetch_si(ccyy_mm, time, shl_data_parm_si):
#     return shl_data_parm_si[(shl_data_parm_si['ccyy-mm'] == '2017-09') & (shl_data_parm_si['time'] == '11:29:00')]
    return shl_data_parm_si[(shl_data_parm_si['ccyy-mm'] == ccyy_mm) & (shl_data_parm_si['time'] == time)].iloc[0]['si']

In [3]:
# function to fetch Dynamic-Increment
def shl_intra_fetch_di(ccyy_mm, shl_data_parm_month):
    return shl_data_parm_month[shl_data_parm_month['ccyy-mm'] == ccyy_mm].iloc[0]['di']

In [4]:
def shl_intra_fetch_previous_n_sec_time_as_str(shl_data_time_field, n):
    return str((pd.to_datetime(shl_data_time_field, format='%H:%M:%S') - pd.Timedelta(seconds=n)).time())

def shl_intra_fetch_future_n_sec_time_as_str(shl_data_time_field, n):
    return str((pd.to_datetime(shl_data_time_field, format='%H:%M:%S') - pd.Timedelta(seconds=-n)).time())

In [5]:
def shl_initialize(in_ccyy_mm='2017-07'):
    print()
    print('+-----------------------------------------------+')
    print('| shl_initialize()                              |')
    print('+-----------------------------------------------+')
    print()
    global shl_data_parm_si
    global shl_data_parm_month
    shl_data_parm_si = pd.read_csv('data/parm_si.csv') 
    shl_data_parm_month = pd.read_csv('data/parm_month.csv') 

    global shl_global_parm_ccyy_mm 
    shl_global_parm_ccyy_mm = in_ccyy_mm
    
    # create default global base price
    global shl_global_parm_base_price
    shl_global_parm_base_price = 10000000

    global shl_global_parm_dynamic_increment
    shl_global_parm_dynamic_increment = shl_intra_fetch_di(shl_global_parm_ccyy_mm, shl_data_parm_month)

    global shl_global_parm_alpha
    shl_global_parm_alpha = shl_data_parm_month[shl_data_parm_month['ccyy-mm'] == shl_global_parm_ccyy_mm].iloc[0]['alpha']
    global shl_global_parm_beta
    shl_global_parm_beta  = shl_data_parm_month[shl_data_parm_month['ccyy-mm'] == shl_global_parm_ccyy_mm].iloc[0]['beta']
    global shl_global_parm_gamma
    shl_global_parm_gamma = shl_data_parm_month[shl_data_parm_month['ccyy-mm'] == shl_global_parm_ccyy_mm].iloc[0]['gamma']
    global shl_global_parm_sec57_weight
    shl_global_parm_sec57_weight = shl_data_parm_month[shl_data_parm_month['ccyy-mm'] == shl_global_parm_ccyy_mm].iloc[0]['sec57-weight']
    global shl_global_parm_month_weight
    shl_global_parm_month_weight = shl_data_parm_month[shl_data_parm_month['ccyy-mm'] == shl_global_parm_ccyy_mm].iloc[0]['month-weight']
    global shl_global_parm_short_weight
    shl_global_parm_short_weight = shl_data_parm_month[shl_data_parm_month['ccyy-mm'] == shl_global_parm_ccyy_mm].iloc[0]['short-weight']

    # default = 0
    global shl_global_parm_short_weight_ratio
    shl_global_parm_short_weight_ratio = 0
    
    # create default average error between 46~50 seconds:
    global shl_global_parm_short_weight_misc
    shl_global_parm_short_weight_misc = 0

    
    print('shl_global_parm_ccyy_mm           : %s' % shl_global_parm_ccyy_mm)
    print('-------------------------------------------------')
    print('shl_global_parm_alpha             : %0.15f' % shl_global_parm_alpha) # used in forecasting
    print('shl_global_parm_beta              : %0.15f' % shl_global_parm_beta)  # used in forecasting
    print('shl_global_parm_gamma             : %0.15f' % shl_global_parm_gamma) # used in forecasting
    print('shl_global_parm_short_weight      : %f' % shl_global_parm_short_weight) # used in forecasting
    print('shl_global_parm_short_weight_ratio: %f' % shl_global_parm_short_weight) # used in forecasting
    print('shl_global_parm_sec57_weight      : %f' % shl_global_parm_sec57_weight) # used in training a model
    print('shl_global_parm_month_weight      : %f' % shl_global_parm_month_weight) # used in training a model
    print('shl_global_parm_dynamic_increment : %d' % shl_global_parm_dynamic_increment)
    print('-------------------------------------------------')

#     plt.figure(figsize=(6,3)) # plot seasonality index
#     plt.plot(shl_data_parm_si[(shl_data_parm_si['ccyy-mm'] == shl_global_parm_ccyy_mm)]['si'])
    
    global shl_data_pm_1_step
    shl_data_pm_1_step = pd.DataFrame() # initialize dataframe of prediction results
    print()
    print('prediction results dataframe: shl_data_pm_1_step')
    print(shl_data_pm_1_step)

    global shl_data_pm_k_step
    shl_data_pm_k_step = pd.DataFrame() # initialize dataframe of prediction results
    print()
    print('prediction results dataframe: shl_data_pm_k_step')
    print(shl_data_pm_k_step)

In [6]:
# shl_initialize('2017-06')

shl_predict_price(in_current_time, in_current_price, in_k_sec) # return k-seconrds Predicted Prices, in a list format

shl_predict_set_price(in_current_time, in_current_price, in_k_sec) # return k-second Predicted Price + Dynamic Increment, in a list format

call k times of shl_predict_price()

shl_data_pm_1_step_itr = pd.DataFrame() # initialize prediction dataframe at 11:29:00


In [7]:
# (shl_data_pm_1_step['f_1_step_pred_price_inc'].shift(1)[46:50] - shl_data_pm_1_step['f_current_price4pm'][46:50]).sum()

In [8]:
# (shl_data_pm_k_step['f_1_step_pred_price_inc'].shift(1)[46:50] - shl_data_pm_k_step['f_current_price4pm'][46:50]).sum()

In [ ]:


In [9]:
def shl_predict_price_1_step(in_current_time, in_current_price):
# 11:29:00~11:29:50

    global shl_data_pm_k_step
    
    global shl_global_parm_short_weight_misc
    if in_current_time < '11:29:50': shl_global_parm_short_weight_misc = 0
    
    global shl_global_parm_short_weight_ratio
    
    global shl_global_parm_base_price 


    print()
    print('+-----------------------------------------------+')
    print('| shl_predict_price()                           |')
    print('+-----------------------------------------------+')
    print()
    print('current_ccyy_mm   : %s' % shl_global_parm_ccyy_mm) # str, format: ccyy-mm
    print('in_current_time   : %s' % in_current_time) # str, format: hh:mm:ss
    print('in_current_price  : %d' % in_current_price) # number, format: integer
    print('-------------------------------------------------')

    
    # capture & calculate 11:29:00 bid price - 1 as base price
    if in_current_time == '11:29:00':
        shl_global_parm_base_price = in_current_price -1 
        print('*INFO* At time [ %s ] Set shl_global_parm_base_price : %d ' % (in_current_time, shl_global_parm_base_price)) # Debug
        
    f_current_datetime = shl_global_parm_ccyy_mm + ' ' + in_current_time
    print('*INFO* f_current_datetime   : %s ' %  f_current_datetime)

    # get Seasonality-Index, for current second
    f_current_si = shl_intra_fetch_si(shl_global_parm_ccyy_mm, in_current_time, shl_data_parm_si)
    print('*INFO* f_current_si         : %0.10f ' %  f_current_si) # Debug
    
    # get Seasonality-Index, for current second + 1
    f_1_step_time = shl_intra_fetch_future_n_sec_time_as_str(in_current_time, 1)
    f_1_step_si = shl_intra_fetch_si(shl_global_parm_ccyy_mm, f_1_step_time, shl_data_parm_si)
    print('*INFO* f_1_step_si         : %0.10f ' %  f_1_step_si) # Debug
    
    # calculate price increment: f_current_price4pm
    f_current_price4pm = in_current_price -  shl_global_parm_base_price
    print('*INFO* f_current_price4pm   : %d ' % f_current_price4pm) # Debug
    
    # calculate seasonality adjusted price increment: f_current_price4pmsi
    f_current_price4pmsi = f_current_price4pm / f_current_si
    print('*INFO* f_current_price4pmsi : %0.10f ' % f_current_price4pmsi) # Debug
    

    if in_current_time == '11:29:00':
#         shl_data_pm_k_step_itr = pd.DataFrame() # initialize prediction dataframe at 11:29:00
        print('---- call prediction function shl_pm ---- %s' % in_current_time)
        f_1_step_pred_les_level = f_current_price4pmsi # special handling for 11:29:00
        f_1_step_pred_les_trend = 0 # special handling for 11:29:00
        f_1_step_pred_les = f_1_step_pred_les_level + f_1_step_pred_les_trend
        f_1_step_pred_adj_misc = 0
        f_1_step_pred_price_inc = (f_1_step_pred_les + f_1_step_pred_adj_misc) * f_1_step_si
        f_1_step_pred_price = f_1_step_pred_price_inc + shl_global_parm_base_price
        f_1_step_pred_price_rounded = round(f_1_step_pred_price/100, 0) * 100
        f_1_step_pred_set_price_rounded = f_1_step_pred_price_rounded + shl_global_parm_dynamic_increment
        
    else:
        print('---- call prediction function shl_pm ---- %s' % in_current_time)
        
#       function to get average forecast error between 46~50 seconds: mean(f_current_step_error)
        if in_current_time == '11:29:50':
            sec50_pred_price_inc = shl_data_pm_k_step[(shl_data_pm_k_step['ccyy-mm'] == shl_global_parm_ccyy_mm) \
                                                & (shl_data_pm_k_step['f_1_step_time'] ==in_current_time)].iloc[0]['f_1_step_pred_price_inc']
            sec50_error    = sec50_pred_price_inc - f_current_price4pm
            sec46_49_error = (shl_data_pm_k_step['f_1_step_pred_price_inc'].shift(1)[46:50] - shl_data_pm_k_step['f_current_price4pm'][46:50]).sum()
            print('*INFO* sec50_error    : %f' % sec50_error)
            print('*INFO* sec46_49_error : %f' % sec46_49_error)
            
            shl_global_parm_short_weight_misc = (sec50_error + sec46_49_error) / 5
            print('*INFO* shl_global_parm_short_weight_misc  : %f' % shl_global_parm_short_weight_misc)
            
#       ----------------------------------------------------------------------------------------------------        
#       if in_current_time == '11:29:50':
            shl_global_parm_short_weight_ratio = 1
            print('*INFO* shl_global_parm_short_weight_ratio : %d' % shl_global_parm_short_weight_ratio)
        if in_current_time == '11:29:51':
            shl_global_parm_short_weight_ratio = 2
            print('*INFO* shl_global_parm_short_weight_ratio : %d' % shl_global_parm_short_weight_ratio)        
        if in_current_time == '11:29:52':
            shl_global_parm_short_weight_ratio = 3
            print('*INFO* shl_global_parm_short_weight_ratio : %d' % shl_global_parm_short_weight_ratio)        
        if in_current_time == '11:29:53':
            shl_global_parm_short_weight_ratio = 4
            print('*INFO* shl_global_parm_short_weight_ratio : %d' % shl_global_parm_short_weight_ratio)        
        if in_current_time == '11:29:54':
            shl_global_parm_short_weight_ratio = 5
            print('*INFO* shl_global_parm_short_weight_ratio : %d' % shl_global_parm_short_weight_ratio)        
        if in_current_time == '11:29:55':
            shl_global_parm_short_weight_ratio = 6
            print('*INFO* shl_global_parm_short_weight_ratio : %d' % shl_global_parm_short_weight_ratio)        
        if in_current_time == '11:29:56':
            shl_global_parm_short_weight_ratio = 7
            print('*INFO* shl_global_parm_short_weight_ratio : %d' % shl_global_parm_short_weight_ratio)        
        if in_current_time == '11:29:57':
            shl_global_parm_short_weight_ratio = 8
            print('*INFO* shl_global_parm_short_weight_ratio : %d' % shl_global_parm_short_weight_ratio)        
        if in_current_time == '11:29:58':
            shl_global_parm_short_weight_ratio = 9
            print('*INFO* shl_global_parm_short_weight_ratio : %d' % shl_global_parm_short_weight_ratio)        
        if in_current_time == '11:29:59':
            shl_global_parm_short_weight_ratio = 10
            print('*INFO* shl_global_parm_short_weight_ratio : %d' % shl_global_parm_short_weight_ratio)        
        if in_current_time == '11:29:60':
            shl_global_parm_short_weight_ratio = 11
            print('*INFO* shl_global_parm_short_weight_ratio : %d' % shl_global_parm_short_weight_ratio)        
#       ----------------------------------------------------------------------------------------------------        
        
        previous_pred_les_level = shl_data_pm_k_step[(shl_data_pm_k_step['ccyy-mm'] == shl_global_parm_ccyy_mm) \
                                            & (shl_data_pm_k_step['f_1_step_time'] ==in_current_time)].iloc[0]['f_1_step_pred_les_level']
        print('     previous_pred_les_level : %f' % previous_pred_les_level)
        
        previous_pred_les_trend = shl_data_pm_k_step[(shl_data_pm_k_step['ccyy-mm'] == shl_global_parm_ccyy_mm) \
                                            & (shl_data_pm_k_step['f_1_step_time'] ==in_current_time)].iloc[0]['f_1_step_pred_les_trend']
        print('     previous_pred_les_trend : %f' % previous_pred_les_trend)

            
        f_1_step_pred_les_level = shl_global_parm_alpha * f_current_price4pmsi \
                                    + (1 - shl_global_parm_alpha) * (previous_pred_les_level + previous_pred_les_trend)
        print('     f_1_step_pred_les_level  : %f' % f_1_step_pred_les_level)
        f_1_step_pred_les_trend = shl_global_parm_beta * (f_1_step_pred_les_level - previous_pred_les_level) \
                                    + (1 - shl_global_parm_beta) * previous_pred_les_trend
        print('     f_1_step_pred_les_trend  : %f' % f_1_step_pred_les_trend)
        
        f_1_step_pred_les = f_1_step_pred_les_level + f_1_step_pred_les_trend
        f_1_step_pred_adj_misc = shl_global_parm_short_weight_misc * shl_global_parm_short_weight * shl_global_parm_short_weight_ratio * shl_global_parm_gamma
        print('     les + misc               : %f' % (f_1_step_pred_adj_misc+f_1_step_pred_les))
        f_1_step_pred_price_inc = (f_1_step_pred_les + f_1_step_pred_adj_misc) * f_1_step_si
        print('     f_1_step_pred_price_inc  : %f' % f_1_step_pred_price_inc)
        print('     f_1_step_si              : %f' % f_1_step_si)
        f_1_step_pred_price = f_1_step_pred_price_inc + shl_global_parm_base_price
        f_1_step_pred_price_rounded = round(f_1_step_pred_price/100, 0) * 100
        f_1_step_pred_set_price_rounded = f_1_step_pred_price_rounded + shl_global_parm_dynamic_increment
   
        
    # write results to shl_pm dataframe
            
    shl_data_pm_k_step_itr_dict = {
                         'ccyy-mm' : shl_global_parm_ccyy_mm
                        ,'f_current_datetime' : f_current_datetime
                        ,'f_current_bid' : in_current_price
                        ,'f_current_price4pm' : f_current_price4pm
                        ,'f_current_si' : f_current_si
                        ,'f_current_price4pmsi' :  f_current_price4pmsi
                        ,'f_1_step_time' : f_1_step_time # predicted values/price for next second: in_current_time + 1 second
                        ,'f_1_step_si' : f_1_step_si
                        ,'f_1_step_pred_les_level' : f_1_step_pred_les_level
                        ,'f_1_step_pred_les_trend' : f_1_step_pred_les_trend
                        ,'f_1_step_pred_les' : f_1_step_pred_les
                        ,'f_1_step_pred_adj_misc' : f_1_step_pred_adj_misc
                        ,'f_1_step_pred_price_inc' : f_1_step_pred_price_inc
                        ,'f_1_step_pred_price' : f_1_step_pred_price
                        ,'f_1_step_pred_price_rounded' : f_1_step_pred_price_rounded
                        ,'f_1_step_pred_set_price_rounded' : f_1_step_pred_set_price_rounded
                        }
#     shl_data_pm_k_step_itr =  shl_data_pm_k_step_itr.append(shl_data_pm_k_step_itr_dict, ignore_index=True)
#     shl_data_pm_k_step     =  shl_data_pm_k_step.append(shl_data_pm_k_step_itr_dict, ignore_index=True)
    return shl_data_pm_k_step_itr_dict

In [10]:
# return_value = {'f_1_step_pred_price_rounded', 'f_1_step_pred_set_price_rounded'}
def shl_predict_price_k_step(in_current_time, in_current_price, in_k_seconds=1, return_value='f_1_step_pred_set_price_rounded'):
    global shl_data_pm_1_step
    
    global shl_data_pm_k_step
    shl_data_pm_k_step = shl_data_pm_1_step.copy() 
    
    shl_data_pm_itr_dict = {}
    
    for k in range(1,in_k_seconds+1):
        print()
        print('==>> Forecasting next %3d second/step... ' % k)
        if k == 1:
            print('     procesing current second/step k : ', k)
            input_price = in_current_price
            input_time  = in_current_time
            shl_data_pm_itr_dict = shl_predict_price_1_step(input_time, input_price)
            shl_data_pm_1_step     =  shl_data_pm_1_step.append(shl_data_pm_itr_dict, ignore_index=True)
        else:
            print('     procesing current second/step k : ', k)
            input_price = shl_data_pm_itr_dict['f_1_step_pred_price']
            input_time  = shl_data_pm_itr_dict['f_1_step_time']
            shl_data_pm_itr_dict = shl_predict_price_1_step(input_time, input_price)

        shl_data_pm_k_step     =  shl_data_pm_k_step.append(shl_data_pm_itr_dict, ignore_index=True)
        
    print('*INFO* RETURNED PREDICTION LIST :', shl_data_pm_k_step[shl_data_pm_k_step['f_1_step_time'] > in_current_time][return_value].tolist())
    return shl_data_pm_k_step[shl_data_pm_k_step['f_1_step_time'] > in_current_time][return_value].tolist()

In [ ]:


In [ ]:


In [11]:
# shl_data_pm_1_step['f_current_price4pm'][46:50]

In [12]:
# shl_data_pm_1_step['f_1_step_pred_price_inc'].shift(1)[46:50]

In [13]:
# shl_data_pm_1_step['f_1_step_pred_price_inc'].shift(1)[46:50] - shl_data_pm_1_step['f_current_price4pm'][46:50]

In [ ]:


In [ ]:

shl_sm


In [14]:
shl_data_history_ts_process = pd.read_csv('data/history_ts.csv') 
shl_data_history_ts_process.tail()


Out[14]:
ccyy-mm time bid-price ref-price
1886 2017-07 11:29:56 92100 89800
1887 2017-07 11:29:57 92100 89800
1888 2017-07 11:29:58 92100 89800
1889 2017-07 11:29:59 92200 89800
1890 2017-07 11:30:00 92200 89800

shl_sm Simulation Module Parm:


In [15]:
# which month to predict?
# shl_global_parm_ccyy_mm = '2017-04'
# shl_global_parm_ccyy_mm_offset = 1647

shl_global_parm_ccyy_mm = '2017-05'
shl_global_parm_ccyy_mm_offset = 1708

# shl_global_parm_ccyy_mm = '2017-06'
# shl_global_parm_ccyy_mm_offset = 1769

# shl_global_parm_ccyy_mm = '2017-07'
# shl_global_parm_ccyy_mm_offset = 1830

In [16]:
shl_initialize(shl_global_parm_ccyy_mm)


+-----------------------------------------------+
| shl_initialize()                              |
+-----------------------------------------------+

shl_global_parm_ccyy_mm           : 2017-05
-------------------------------------------------
shl_global_parm_alpha             : 0.710089632774752
shl_global_parm_beta              : 0.203023868746573
shl_global_parm_gamma             : 0.166127729865532
shl_global_parm_short_weight      : 0.125000
shl_global_parm_short_weight_ratio: 0.125000
shl_global_parm_sec57_weight      : 0.500000
shl_global_parm_month_weight      : 0.900000
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 [17]:
# shl_data_pm_1_step

In [18]:
# shl_data_pm_k_step

In [19]:
# shl_data_pm_1_step = pd.DataFrame() # initialize dataframe of prediction results
# shl_data_pm_k_step = pd.DataFrame()

In [20]:
# Upon receiving 11:29:00 second price, to predict till 11:29:49 <- one-step forward price forecasting

shl_data_pm_1_step = pd.DataFrame() # initialize dataframe of prediction results

for i in range(shl_global_parm_ccyy_mm_offset, shl_global_parm_ccyy_mm_offset+50): # use July 2015 data as simulatino
# for i in range(shl_global_parm_ccyy_mm_offset, shl_global_parm_ccyy_mm_offset+55): # use July 2015 data as simulatino
    print('\n<<<< Record No.: %5d >>>>' % i)
    print(shl_data_history_ts_process['ccyy-mm'][i]) # format: ccyy-mm
    print(shl_data_history_ts_process['time'][i]) # format: hh:mm:ss
    print(shl_data_history_ts_process['bid-price'][i]) # format: integer
    shl_predict_price_k_step(shl_data_history_ts_process['time'][i], shl_data_history_ts_process['bid-price'][i],1) # <- one-step forward price forecasting


<<<< Record No.:  1708 >>>>
2017-05
11:29:00
88500

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:00
in_current_price  : 88500
-------------------------------------------------
*INFO* At time [ 11:29:00 ] Set shl_global_parm_base_price : 88499 
*INFO* f_current_datetime   : 2017-05 11:29:00 
*INFO* f_current_si         : 0.0023732830 
*INFO* f_1_step_si         : 0.0154006080 
*INFO* f_current_price4pm   : 1 
*INFO* f_current_price4pmsi : 421.3572506945 
---- call prediction function shl_pm ---- 11:29:00
*INFO* RETURNED PREDICTION LIST : [88800.0]

<<<< Record No.:  1709 >>>>
2017-05
11:29:01
88500

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:01
in_current_price  : 88500
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:01 
*INFO* f_current_si         : 0.0154006080 
*INFO* f_1_step_si         : 0.0247000810 
*INFO* f_current_price4pm   : 1 
*INFO* f_current_price4pmsi : 64.9325013662 
---- call prediction function shl_pm ---- 11:29:01
     previous_pred_les_level : 421.357251
     previous_pred_les_trend : 0.000000
     f_1_step_pred_les_level  : 168.263731
     f_1_step_pred_les_trend  : -51.384025
     les + misc               : 116.879706
     f_1_step_pred_price_inc  : 2.886938
     f_1_step_si              : 0.024700
*INFO* RETURNED PREDICTION LIST : [88800.0]

<<<< Record No.:  1710 >>>>
2017-05
11:29:02
88500

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:02
in_current_price  : 88500
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:02 
*INFO* f_current_si         : 0.0247000810 
*INFO* f_1_step_si         : 0.0321896810 
*INFO* f_current_price4pm   : 1 
*INFO* f_current_price4pmsi : 40.4856971927 
---- call prediction function shl_pm ---- 11:29:02
     previous_pred_les_level : 168.263731
     previous_pred_les_trend : -51.384025
     f_1_step_pred_les_level  : 62.633112
     f_1_step_pred_les_trend  : -62.397379
     les + misc               : 0.235734
     f_1_step_pred_price_inc  : 0.007588
     f_1_step_si              : 0.032190
*INFO* RETURNED PREDICTION LIST : [88800.0]

<<<< Record No.:  1711 >>>>
2017-05
11:29:03
88500

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:03
in_current_price  : 88500
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:03 
*INFO* f_current_si         : 0.0321896810 
*INFO* f_1_step_si         : 0.0408223410 
*INFO* f_current_price4pm   : 1 
*INFO* f_current_price4pmsi : 31.0658561668 
---- call prediction function shl_pm ---- 11:29:03
     previous_pred_les_level : 62.633112
     previous_pred_les_trend : -62.397379
     f_1_step_pred_les_level  : 22.127884
     f_1_step_pred_les_trend  : -57.952750
     les + misc               : -35.824866
     f_1_step_pred_price_inc  : -1.462455
     f_1_step_si              : 0.040822
*INFO* RETURNED PREDICTION LIST : [88800.0]

<<<< Record No.:  1712 >>>>
2017-05
11:29:04
88500

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:04
in_current_price  : 88500
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:04 
*INFO* f_current_si         : 0.0408223410 
*INFO* f_1_step_si         : 0.0403601630 
*INFO* f_current_price4pm   : 1 
*INFO* f_current_price4pmsi : 24.4963903466 
---- call prediction function shl_pm ---- 11:29:04
     previous_pred_les_level : 22.127884
     previous_pred_les_trend : -57.952750
     f_1_step_pred_les_level  : 7.008633
     f_1_step_pred_les_trend  : -49.256527
     les + misc               : -42.247894
     f_1_step_pred_price_inc  : -1.705132
     f_1_step_si              : 0.040360
*INFO* RETURNED PREDICTION LIST : [88800.0]

<<<< Record No.:  1713 >>>>
2017-05
11:29:05
88500

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:05
in_current_price  : 88500
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:05 
*INFO* f_current_si         : 0.0403601630 
*INFO* f_1_step_si         : 0.0789502810 
*INFO* f_current_price4pm   : 1 
*INFO* f_current_price4pmsi : 24.7769068723 
---- call prediction function shl_pm ---- 11:29:05
     previous_pred_les_level : 7.008633
     previous_pred_les_trend : -49.256527
     f_1_step_pred_les_level  : 5.345722
     f_1_step_pred_les_trend  : -39.593887
     les + misc               : -34.248165
     f_1_step_pred_price_inc  : -2.703902
     f_1_step_si              : 0.078950
*INFO* RETURNED PREDICTION LIST : [88800.0]

<<<< Record No.:  1714 >>>>
2017-05
11:29:06
88500

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:06
in_current_price  : 88500
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:06 
*INFO* f_current_si         : 0.0789502810 
*INFO* f_1_step_si         : 0.0982261870 
*INFO* f_current_price4pm   : 1 
*INFO* f_current_price4pmsi : 12.6661993768 
---- call prediction function shl_pm ---- 11:29:06
     previous_pred_les_level : 5.345722
     previous_pred_les_trend : -39.593887
     f_1_step_pred_les_level  : -0.934761
     f_1_step_pred_les_trend  : -32.830471
     les + misc               : -33.765232
     f_1_step_pred_price_inc  : -3.316630
     f_1_step_si              : 0.098226
*INFO* RETURNED PREDICTION LIST : [88800.0]

<<<< Record No.:  1715 >>>>
2017-05
11:29:07
88500

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:07
in_current_price  : 88500
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:07 
*INFO* f_current_si         : 0.0982261870 
*INFO* f_1_step_si         : 0.1281388970 
*INFO* f_current_price4pm   : 1 
*INFO* f_current_price4pmsi : 10.1805845319 
---- call prediction function shl_pm ---- 11:29:07
     previous_pred_les_level : -0.934761
     previous_pred_les_trend : -32.830471
     f_1_step_pred_les_level  : -2.559763
     f_1_step_pred_les_trend  : -26.495016
     les + misc               : -29.054779
     f_1_step_pred_price_inc  : -3.723047
     f_1_step_si              : 0.128139
*INFO* RETURNED PREDICTION LIST : [88800.0]

<<<< Record No.:  1716 >>>>
2017-05
11:29:08
88600

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:08
in_current_price  : 88600
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:08 
*INFO* f_current_si         : 0.1281388970 
*INFO* f_1_step_si         : 0.2021951430 
*INFO* f_current_price4pm   : 101 
*INFO* f_current_price4pmsi : 788.2071905145 
---- call prediction function shl_pm ---- 11:29:08
     previous_pred_les_level : -2.559763
     previous_pred_les_trend : -26.495016
     f_1_step_pred_les_level  : 551.274473
     f_1_step_pred_les_trend  : 91.325674
     les + misc               : 642.600147
     f_1_step_pred_price_inc  : 129.930629
     f_1_step_si              : 0.202195
*INFO* RETURNED PREDICTION LIST : [88900.0]

<<<< Record No.:  1717 >>>>
2017-05
11:29:09
88600

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:09
in_current_price  : 88600
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:09 
*INFO* f_current_si         : 0.2021951430 
*INFO* f_1_step_si         : 0.2315430480 
*INFO* f_current_price4pm   : 101 
*INFO* f_current_price4pmsi : 499.5174389525 
---- call prediction function shl_pm ---- 11:29:09
     previous_pred_les_level : 551.274473
     previous_pred_les_trend : 91.325674
     f_1_step_pred_les_level  : 540.998599
     f_1_step_pred_les_trend  : 70.698135
     les + misc               : 611.696734
     f_1_step_pred_price_inc  : 141.634126
     f_1_step_si              : 0.231543
*INFO* RETURNED PREDICTION LIST : [88900.0]

<<<< Record No.:  1718 >>>>
2017-05
11:29:10
88600

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:10
in_current_price  : 88600
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:10 
*INFO* f_current_si         : 0.2315430480 
*INFO* f_1_step_si         : 0.2968523630 
*INFO* f_current_price4pm   : 101 
*INFO* f_current_price4pmsi : 436.2039839780 
---- call prediction function shl_pm ---- 11:29:10
     previous_pred_les_level : 540.998599
     previous_pred_les_trend : 70.698135
     f_1_step_pred_les_level  : 487.081152
     f_1_step_pred_les_trend  : 45.398197
     les + misc               : 532.479349
     f_1_step_pred_price_inc  : 158.067753
     f_1_step_si              : 0.296852
*INFO* RETURNED PREDICTION LIST : [89000.0]

<<<< Record No.:  1719 >>>>
2017-05
11:29:11
88600

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:11
in_current_price  : 88600
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:11 
*INFO* f_current_si         : 0.2968523630 
*INFO* f_1_step_si         : 0.3535815590 
*INFO* f_current_price4pm   : 101 
*INFO* f_current_price4pmsi : 340.2364696689 
---- call prediction function shl_pm ---- 11:29:11
     previous_pred_les_level : 487.081152
     previous_pred_les_trend : 45.398197
     f_1_step_pred_les_level  : 395.969673
     f_1_step_pred_les_trend  : 17.683475
     les + misc               : 413.653148
     f_1_step_pred_price_inc  : 146.260125
     f_1_step_si              : 0.353582
*INFO* RETURNED PREDICTION LIST : [88900.0]

<<<< Record No.:  1720 >>>>
2017-05
11:29:12
88600

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:12
in_current_price  : 88600
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:12 
*INFO* f_current_si         : 0.3535815590 
*INFO* f_1_step_si         : 0.3518795640 
*INFO* f_current_price4pm   : 101 
*INFO* f_current_price4pmsi : 285.6483813399 
---- call prediction function shl_pm ---- 11:29:12
     previous_pred_les_level : 395.969673
     previous_pred_les_trend : 17.683475
     f_1_step_pred_les_level  : 322.758290
     f_1_step_pred_les_trend  : -0.770351
     les + misc               : 321.987939
     f_1_step_pred_price_inc  : 113.300976
     f_1_step_si              : 0.351880
*INFO* RETURNED PREDICTION LIST : [88900.0]

<<<< Record No.:  1721 >>>>
2017-05
11:29:13
88700

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:13
in_current_price  : 88700
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:13 
*INFO* f_current_si         : 0.3518795640 
*INFO* f_1_step_si         : 0.3733120260 
*INFO* f_current_price4pm   : 201 
*INFO* f_current_price4pmsi : 571.2181682708 
---- call prediction function shl_pm ---- 11:29:13
     previous_pred_les_level : 322.758290
     previous_pred_les_trend : -0.770351
     f_1_step_pred_les_level  : 498.963741
     f_1_step_pred_les_trend  : 35.159961
     les + misc               : 534.123702
     f_1_step_pred_price_inc  : 199.394801
     f_1_step_si              : 0.373312
*INFO* RETURNED PREDICTION LIST : [89000.0]

<<<< Record No.:  1722 >>>>
2017-05
11:29:14
88700

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:14
in_current_price  : 88700
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:14 
*INFO* f_current_si         : 0.3733120260 
*INFO* f_1_step_si         : 0.3962516730 
*INFO* f_current_price4pm   : 201 
*INFO* f_current_price4pmsi : 538.4235867076 
---- call prediction function shl_pm ---- 11:29:14
     previous_pred_les_level : 498.963741
     previous_pred_les_trend : 35.159961
     f_1_step_pred_les_level  : 537.177006
     f_1_step_pred_les_trend  : 35.779854
     les + misc               : 572.956860
     f_1_step_pred_price_inc  : 227.035114
     f_1_step_si              : 0.396252
*INFO* RETURNED PREDICTION LIST : [89000.0]

<<<< Record No.:  1723 >>>>
2017-05
11:29:15
88800

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:15
in_current_price  : 88800
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:15 
*INFO* f_current_si         : 0.3962516730 
*INFO* f_1_step_si         : 0.4083631580 
*INFO* f_current_price4pm   : 301 
*INFO* f_current_price4pmsi : 759.6182439336 
---- call prediction function shl_pm ---- 11:29:15
     previous_pred_les_level : 537.177006
     previous_pred_les_trend : 35.779854
     f_1_step_pred_les_level  : 705.503174
     f_1_step_pred_les_trend  : 62.689920
     les + misc               : 768.193093
     f_1_step_pred_price_inc  : 313.701758
     f_1_step_si              : 0.408363
*INFO* RETURNED PREDICTION LIST : [89100.0]

<<<< Record No.:  1724 >>>>
2017-05
11:29:16
88800

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:16
in_current_price  : 88800
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:16 
*INFO* f_current_si         : 0.4083631580 
*INFO* f_1_step_si         : 0.4536857340 
*INFO* f_current_price4pm   : 301 
*INFO* f_current_price4pmsi : 737.0890201608 
---- call prediction function shl_pm ---- 11:29:16
     previous_pred_les_level : 705.503174
     previous_pred_les_trend : 62.689920
     f_1_step_pred_les_level  : 746.106413
     f_1_step_pred_les_trend  : 58.205797
     les + misc               : 804.312210
     f_1_step_pred_price_inc  : 364.904975
     f_1_step_si              : 0.453686
*INFO* RETURNED PREDICTION LIST : [89200.0]

<<<< Record No.:  1725 >>>>
2017-05
11:29:17
88800

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:17
in_current_price  : 88800
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:17 
*INFO* f_current_si         : 0.4536857340 
*INFO* f_1_step_si         : 0.4866038310 
*INFO* f_current_price4pm   : 301 
*INFO* f_current_price4pmsi : 663.4548486817 
---- call prediction function shl_pm ---- 11:29:17
     previous_pred_les_level : 746.106413
     previous_pred_les_trend : 58.205797
     f_1_step_pred_les_level  : 704.290858
     f_1_step_pred_les_trend  : 37.899075
     les + misc               : 742.189933
     f_1_step_pred_price_inc  : 361.152465
     f_1_step_si              : 0.486604
*INFO* RETURNED PREDICTION LIST : [89200.0]

<<<< Record No.:  1726 >>>>
2017-05
11:29:18
88800

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:18
in_current_price  : 88800
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:18 
*INFO* f_current_si         : 0.4866038310 
*INFO* f_1_step_si         : 0.5002931870 
*INFO* f_current_price4pm   : 301 
*INFO* f_current_price4pmsi : 618.5730173588 
---- call prediction function shl_pm ---- 11:29:18
     previous_pred_les_level : 704.290858
     previous_pred_les_trend : 37.899075
     f_1_step_pred_les_level  : 654.410843
     f_1_step_pred_les_trend  : 20.077824
     les + misc               : 674.488667
     f_1_step_pred_price_inc  : 337.442085
     f_1_step_si              : 0.500293
*INFO* RETURNED PREDICTION LIST : [89100.0]

<<<< Record No.:  1727 >>>>
2017-05
11:29:19
88800

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:19
in_current_price  : 88800
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:19 
*INFO* f_current_si         : 0.5002931870 
*INFO* f_1_step_si         : 0.5252073040 
*INFO* f_current_price4pm   : 301 
*INFO* f_current_price4pmsi : 601.6472097190 
---- call prediction function shl_pm ---- 11:29:19
     previous_pred_les_level : 654.410843
     previous_pred_les_trend : 20.077824
     f_1_step_pred_les_level  : 622.764703
     f_1_step_pred_les_trend  : 9.576625
     les + misc               : 632.341328
     f_1_step_pred_price_inc  : 332.110284
     f_1_step_si              : 0.525207
*INFO* RETURNED PREDICTION LIST : [89100.0]

<<<< Record No.:  1728 >>>>
2017-05
11:29:20
88800

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:20
in_current_price  : 88800
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:20 
*INFO* f_current_si         : 0.5252073040 
*INFO* f_1_step_si         : 0.5681766990 
*INFO* f_current_price4pm   : 301 
*INFO* f_current_price4pmsi : 573.1070335610 
---- call prediction function shl_pm ---- 11:29:20
     previous_pred_les_level : 622.764703
     previous_pred_les_trend : 9.576625
     f_1_step_pred_les_level  : 590.279670
     f_1_step_pred_les_trend  : 1.037104
     les + misc               : 591.316774
     f_1_step_pred_price_inc  : 335.972413
     f_1_step_si              : 0.568177
*INFO* RETURNED PREDICTION LIST : [89100.0]

<<<< Record No.:  1729 >>>>
2017-05
11:29:21
88800

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:21
in_current_price  : 88800
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:21 
*INFO* f_current_si         : 0.5681766990 
*INFO* f_1_step_si         : 0.5810464910 
*INFO* f_current_price4pm   : 301 
*INFO* f_current_price4pmsi : 529.7647730535 
---- call prediction function shl_pm ---- 11:29:21
     previous_pred_les_level : 590.279670
     previous_pred_les_trend : 1.037104
     f_1_step_pred_les_level  : 547.609336
     f_1_step_pred_les_trend  : -7.836549
     les + misc               : 539.772788
     f_1_step_pred_price_inc  : 313.633084
     f_1_step_si              : 0.581046
*INFO* RETURNED PREDICTION LIST : [89100.0]

<<<< Record No.:  1730 >>>>
2017-05
11:29:22
88800

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:22
in_current_price  : 88800
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:22 
*INFO* f_current_si         : 0.5810464910 
*INFO* f_1_step_si         : 0.5941773510 
*INFO* f_current_price4pm   : 301 
*INFO* f_current_price4pmsi : 518.0308368819 
---- call prediction function shl_pm ---- 11:29:22
     previous_pred_les_level : 547.609336
     previous_pred_les_trend : -7.836549
     f_1_step_pred_les_level  : 524.334054
     f_1_step_pred_les_trend  : -10.970980
     les + misc               : 513.363074
     f_1_step_pred_price_inc  : 305.028711
     f_1_step_si              : 0.594177
*INFO* RETURNED PREDICTION LIST : [89100.0]

<<<< Record No.:  1731 >>>>
2017-05
11:29:23
88800

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:23
in_current_price  : 88800
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:23 
*INFO* f_current_si         : 0.5941773510 
*INFO* f_1_step_si         : 0.6269116000 
*INFO* f_current_price4pm   : 301 
*INFO* f_current_price4pmsi : 506.5827559624 
---- call prediction function shl_pm ---- 11:29:23
     previous_pred_les_level : 524.334054
     previous_pred_les_trend : -10.970980
     f_1_step_pred_les_level  : 508.548440
     f_1_step_pred_les_trend  : -11.948466
     les + misc               : 496.599975
     f_1_step_pred_price_inc  : 311.324285
     f_1_step_si              : 0.626912
*INFO* RETURNED PREDICTION LIST : [89100.0]

<<<< Record No.:  1732 >>>>
2017-05
11:29:24
88800

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:24
in_current_price  : 88800
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:24 
*INFO* f_current_si         : 0.6269116000 
*INFO* f_1_step_si         : 0.6627720410 
*INFO* f_current_price4pm   : 301 
*INFO* f_current_price4pmsi : 480.1314890329 
---- call prediction function shl_pm ---- 11:29:24
     previous_pred_les_level : 508.548440
     previous_pred_les_trend : -11.948466
     f_1_step_pred_les_level  : 484.905874
     f_1_step_pred_les_trend  : -14.322647
     les + misc               : 470.583226
     f_1_step_pred_price_inc  : 311.889405
     f_1_step_si              : 0.662772
*INFO* RETURNED PREDICTION LIST : [89100.0]

<<<< Record No.:  1733 >>>>
2017-05
11:29:25
88800

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:25
in_current_price  : 88800
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:25 
*INFO* f_current_si         : 0.6627720410 
*INFO* f_1_step_si         : 0.6820548030 
*INFO* f_current_price4pm   : 301 
*INFO* f_current_price4pmsi : 454.1531346824 
---- call prediction function shl_pm ---- 11:29:25
     previous_pred_les_level : 484.905874
     previous_pred_les_trend : -14.322647
     f_1_step_pred_les_level  : 458.916389
     f_1_step_pred_les_trend  : -16.691294
     les + misc               : 442.225095
     f_1_step_pred_price_inc  : 301.621750
     f_1_step_si              : 0.682055
*INFO* RETURNED PREDICTION LIST : [89100.0]

<<<< Record No.:  1734 >>>>
2017-05
11:29:26
88800

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:26
in_current_price  : 88800
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:26 
*INFO* f_current_si         : 0.6820548030 
*INFO* f_1_step_si         : 0.7047273090 
*INFO* f_current_price4pm   : 301 
*INFO* f_current_price4pmsi : 441.3135112839 
---- call prediction function shl_pm ---- 11:29:26
     previous_pred_les_level : 458.916389
     previous_pred_les_trend : -16.691294
     f_1_step_pred_les_level  : 441.577789
     f_1_step_pred_les_trend  : -16.822712
     les + misc               : 424.755076
     f_1_step_pred_price_inc  : 299.336502
     f_1_step_si              : 0.704727
*INFO* RETURNED PREDICTION LIST : [89100.0]

<<<< Record No.:  1735 >>>>
2017-05
11:29:27
88800

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:27
in_current_price  : 88800
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:27 
*INFO* f_current_si         : 0.7047273090 
*INFO* f_1_step_si         : 0.7312705910 
*INFO* f_current_price4pm   : 301 
*INFO* f_current_price4pmsi : 427.1155610914 
---- call prediction function shl_pm ---- 11:29:27
     previous_pred_les_level : 441.577789
     previous_pred_les_trend : -16.822712
     f_1_step_pred_les_level  : 426.431232
     f_1_step_pred_les_trend  : -16.482413
     les + misc               : 409.948819
     f_1_step_pred_price_inc  : 299.783515
     f_1_step_si              : 0.731271
*INFO* RETURNED PREDICTION LIST : [89100.0]

<<<< Record No.:  1736 >>>>
2017-05
11:29:28
88800

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:28
in_current_price  : 88800
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:28 
*INFO* f_current_si         : 0.7312705910 
*INFO* f_1_step_si         : 0.7472142390 
*INFO* f_current_price4pm   : 301 
*INFO* f_current_price4pmsi : 411.6123411833 
---- call prediction function shl_pm ---- 11:29:28
     previous_pred_les_level : 426.431232
     previous_pred_les_trend : -16.482413
     f_1_step_pred_les_level  : 411.130069
     f_1_step_pred_les_trend  : -16.242591
     les + misc               : 394.887478
     f_1_step_pred_price_inc  : 295.065546
     f_1_step_si              : 0.747214
*INFO* RETURNED PREDICTION LIST : [89100.0]

<<<< Record No.:  1737 >>>>
2017-05
11:29:29
88800

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:29
in_current_price  : 88800
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:29 
*INFO* f_current_si         : 0.7472142390 
*INFO* f_1_step_si         : 0.7829463600 
*INFO* f_current_price4pm   : 301 
*INFO* f_current_price4pmsi : 402.8295825878 
---- call prediction function shl_pm ---- 11:29:29
     previous_pred_les_level : 411.130069
     previous_pred_les_trend : -16.242591
     f_1_step_pred_les_level  : 400.527084
     f_1_step_pred_les_trend  : -15.097616
     les + misc               : 385.429468
     f_1_step_pred_price_inc  : 301.770599
     f_1_step_si              : 0.782946
*INFO* RETURNED PREDICTION LIST : [89100.0]

<<<< Record No.:  1738 >>>>
2017-05
11:29:30
88800

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:30
in_current_price  : 88800
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:30 
*INFO* f_current_si         : 0.7829463600 
*INFO* f_1_step_si         : 0.7923768710 
*INFO* f_current_price4pm   : 301 
*INFO* f_current_price4pmsi : 384.4452383686 
---- call prediction function shl_pm ---- 11:29:30
     previous_pred_les_level : 400.527084
     previous_pred_les_trend : -15.097616
     f_1_step_pred_les_level  : 384.730577
     f_1_step_pred_les_trend  : -15.239508
     les + misc               : 369.491069
     f_1_step_pred_price_inc  : 292.776177
     f_1_step_si              : 0.792377
*INFO* RETURNED PREDICTION LIST : [89100.0]

<<<< Record No.:  1739 >>>>
2017-05
11:29:31
88800

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:31
in_current_price  : 88800
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:31 
*INFO* f_current_si         : 0.7923768710 
*INFO* f_1_step_si         : 0.8207971090 
*INFO* f_current_price4pm   : 301 
*INFO* f_current_price4pmsi : 379.8697450875 
---- call prediction function shl_pm ---- 11:29:31
     previous_pred_les_level : 384.730577
     previous_pred_les_trend : -15.239508
     f_1_step_pred_les_level  : 376.860859
     f_1_step_pred_les_trend  : -13.743264
     les + misc               : 363.117595
     f_1_step_pred_price_inc  : 298.045872
     f_1_step_si              : 0.820797
*INFO* RETURNED PREDICTION LIST : [89100.0]

<<<< Record No.:  1740 >>>>
2017-05
11:29:32
88800

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:32
in_current_price  : 88800
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:32 
*INFO* f_current_si         : 0.8207971090 
*INFO* f_1_step_si         : 0.8434053750 
*INFO* f_current_price4pm   : 301 
*INFO* f_current_price4pmsi : 366.7166912499 
---- call prediction function shl_pm ---- 11:29:32
     previous_pred_les_level : 376.860859
     previous_pred_les_trend : -13.743264
     f_1_step_pred_les_level  : 365.673276
     f_1_step_pred_les_trend  : -13.224400
     les + misc               : 352.448876
     f_1_step_pred_price_inc  : 297.257276
     f_1_step_si              : 0.843405
*INFO* RETURNED PREDICTION LIST : [89100.0]

<<<< Record No.:  1741 >>>>
2017-05
11:29:33
88800

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:33
in_current_price  : 88800
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:33 
*INFO* f_current_si         : 0.8434053750 
*INFO* f_1_step_si         : 0.8697610780 
*INFO* f_current_price4pm   : 301 
*INFO* f_current_price4pmsi : 356.8865090527 
---- call prediction function shl_pm ---- 11:29:33
     previous_pred_les_level : 365.673276
     previous_pred_les_trend : -13.224400
     f_1_step_pred_les_level  : 355.599993
     f_1_step_pred_les_trend  : -12.584648
     les + misc               : 343.015345
     f_1_step_pred_price_inc  : 298.341396
     f_1_step_si              : 0.869761
*INFO* RETURNED PREDICTION LIST : [89100.0]

<<<< Record No.:  1742 >>>>
2017-05
11:29:34
88900

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:34
in_current_price  : 88900
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:34 
*INFO* f_current_si         : 0.8697610780 
*INFO* f_1_step_si         : 0.9292268900 
*INFO* f_current_price4pm   : 401 
*INFO* f_current_price4pmsi : 461.0461541026 
---- call prediction function shl_pm ---- 11:29:34
     previous_pred_les_level : 355.599993
     previous_pred_les_trend : -12.584648
     f_1_step_pred_les_level  : 426.827799
     f_1_step_pred_les_trend  : 4.431280
     les + misc               : 431.259079
     f_1_step_pred_price_inc  : 400.737533
     f_1_step_si              : 0.929227
*INFO* RETURNED PREDICTION LIST : [89200.0]

<<<< Record No.:  1743 >>>>
2017-05
11:29:35
88900

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:35
in_current_price  : 88900
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:35 
*INFO* f_current_si         : 0.9292268900 
*INFO* f_1_step_si         : 0.9644864280 
*INFO* f_current_price4pm   : 401 
*INFO* f_current_price4pmsi : 431.5415366424 
---- call prediction function shl_pm ---- 11:29:35
     previous_pred_les_level : 426.827799
     previous_pred_les_trend : 4.431280
     f_1_step_pred_les_level  : 431.459649
     f_1_step_pred_les_trend  : 4.472001
     les + misc               : 435.931650
     f_1_step_pred_price_inc  : 420.450160
     f_1_step_si              : 0.964486
*INFO* RETURNED PREDICTION LIST : [89200.0]

<<<< Record No.:  1744 >>>>
2017-05
11:29:36
88900

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:36
in_current_price  : 88900
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:36 
*INFO* f_current_si         : 0.9644864280 
*INFO* f_1_step_si         : 0.9823462420 
*INFO* f_current_price4pm   : 401 
*INFO* f_current_price4pmsi : 415.7653113186 
---- call prediction function shl_pm ---- 11:29:36
     previous_pred_les_level : 431.459649
     previous_pred_les_trend : 4.472001
     f_1_step_pred_les_level  : 421.611742
     f_1_step_pred_les_trend  : 1.564718
     les + misc               : 423.176460
     f_1_step_pred_price_inc  : 415.705805
     f_1_step_si              : 0.982346
*INFO* RETURNED PREDICTION LIST : [89200.0]

<<<< Record No.:  1745 >>>>
2017-05
11:29:37
89000

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:37
in_current_price  : 89000
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:37 
*INFO* f_current_si         : 0.9823462420 
*INFO* f_1_step_si         : 0.9910233720 
*INFO* f_current_price4pm   : 501 
*INFO* f_current_price4pmsi : 510.0034779794 
---- call prediction function shl_pm ---- 11:29:37
     previous_pred_les_level : 421.611742
     previous_pred_les_trend : 1.564718
     f_1_step_pred_les_level  : 484.831425
     f_1_step_pred_les_trend  : 14.082147
     les + misc               : 498.913573
     f_1_step_pred_price_inc  : 494.435011
     f_1_step_si              : 0.991023
*INFO* RETURNED PREDICTION LIST : [89300.0]

<<<< Record No.:  1746 >>>>
2017-05
11:29:38
89100

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:38
in_current_price  : 89100
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:38 
*INFO* f_current_si         : 0.9910233720 
*INFO* f_1_step_si         : 1.0336806180 
*INFO* f_current_price4pm   : 601 
*INFO* f_current_price4pmsi : 606.4438205802 
---- call prediction function shl_pm ---- 11:29:38
     previous_pred_les_level : 484.831425
     previous_pred_les_trend : 14.082147
     f_1_step_pred_les_level  : 575.269687
     f_1_step_pred_les_trend  : 29.584261
     les + misc               : 604.853948
     f_1_step_pred_price_inc  : 625.225803
     f_1_step_si              : 1.033681
*INFO* RETURNED PREDICTION LIST : [89400.0]

<<<< Record No.:  1747 >>>>
2017-05
11:29:39
89100

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:39
in_current_price  : 89100
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:39 
*INFO* f_current_si         : 1.0336806180 
*INFO* f_1_step_si         : 1.0814265110 
*INFO* f_current_price4pm   : 601 
*INFO* f_current_price4pmsi : 581.4174993073 
---- call prediction function shl_pm ---- 11:29:39
     previous_pred_les_level : 575.269687
     previous_pred_les_trend : 29.584261
     f_1_step_pred_les_level  : 588.211969
     f_1_step_pred_les_trend  : 26.205542
     les + misc               : 614.417511
     f_1_step_pred_price_inc  : 664.447385
     f_1_step_si              : 1.081427
*INFO* RETURNED PREDICTION LIST : [89500.0]

<<<< Record No.:  1748 >>>>
2017-05
11:29:40
89100

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:40
in_current_price  : 89100
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:40 
*INFO* f_current_si         : 1.0814265110 
*INFO* f_1_step_si         : 1.1110019540 
*INFO* f_current_price4pm   : 601 
*INFO* f_current_price4pmsi : 555.7474260958 
---- call prediction function shl_pm ---- 11:29:40
     previous_pred_les_level : 588.211969
     previous_pred_les_trend : 26.205542
     f_1_step_pred_les_level  : 572.756492
     f_1_step_pred_les_trend  : 17.747361
     les + misc               : 590.503853
     f_1_step_pred_price_inc  : 656.050934
     f_1_step_si              : 1.111002
*INFO* RETURNED PREDICTION LIST : [89500.0]

<<<< Record No.:  1749 >>>>
2017-05
11:29:41
89100

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:41
in_current_price  : 89100
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:41 
*INFO* f_current_si         : 1.1110019540 
*INFO* f_1_step_si         : 1.1632937690 
*INFO* f_current_price4pm   : 601 
*INFO* f_current_price4pmsi : 540.9531439942 
---- call prediction function shl_pm ---- 11:29:41
     previous_pred_les_level : 572.756492
     previous_pred_les_trend : 17.747361
     f_1_step_pred_les_level  : 555.318408
     f_1_step_pred_les_trend  : 10.603876
     les + misc               : 565.922284
     f_1_step_pred_price_inc  : 658.333867
     f_1_step_si              : 1.163294
*INFO* RETURNED PREDICTION LIST : [89500.0]

<<<< Record No.:  1750 >>>>
2017-05
11:29:42
89100

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:42
in_current_price  : 89100
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:42 
*INFO* f_current_si         : 1.1632937690 
*INFO* f_1_step_si         : 1.2818923650 
*INFO* f_current_price4pm   : 601 
*INFO* f_current_price4pmsi : 516.6364817003 
---- call prediction function shl_pm ---- 11:29:42
     previous_pred_les_level : 555.318408
     previous_pred_les_trend : 10.603876
     f_1_step_pred_les_level  : 530.924947
     f_1_step_pred_les_trend  : 3.498581
     les + misc               : 534.423528
     f_1_step_pred_price_inc  : 685.073440
     f_1_step_si              : 1.281892
*INFO* RETURNED PREDICTION LIST : [89500.0]

<<<< Record No.:  1751 >>>>
2017-05
11:29:43
89100

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:43
in_current_price  : 89100
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:43 
*INFO* f_current_si         : 1.2818923650 
*INFO* f_1_step_si         : 1.3861222470 
*INFO* f_current_price4pm   : 601 
*INFO* f_current_price4pmsi : 468.8381149692 
---- call prediction function shl_pm ---- 11:29:43
     previous_pred_les_level : 530.924947
     previous_pred_les_trend : 3.498581
     f_1_step_pred_les_level  : 487.852006
     f_1_step_pred_les_trend  : -5.956550
     les + misc               : 481.895457
     f_1_step_pred_price_inc  : 667.966013
     f_1_step_si              : 1.386122
*INFO* RETURNED PREDICTION LIST : [89500.0]

<<<< Record No.:  1752 >>>>
2017-05
11:29:44
89200

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:44
in_current_price  : 89200
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:44 
*INFO* f_current_si         : 1.3861222470 
*INFO* f_1_step_si         : 1.4288486810 
*INFO* f_current_price4pm   : 701 
*INFO* f_current_price4pmsi : 505.7273999585 
---- call prediction function shl_pm ---- 11:29:44
     previous_pred_les_level : 487.852006
     previous_pred_les_trend : -5.956550
     f_1_step_pred_les_level  : 498.818272
     f_1_step_pred_les_trend  : -2.520814
     les + misc               : 496.297459
     f_1_step_pred_price_inc  : 709.133969
     f_1_step_si              : 1.428849
*INFO* RETURNED PREDICTION LIST : [89500.0]

<<<< Record No.:  1753 >>>>
2017-05
11:29:45
89200

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:45
in_current_price  : 89200
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:45 
*INFO* f_current_si         : 1.4288486810 
*INFO* f_1_step_si         : 1.5641248670 
*INFO* f_current_price4pm   : 701 
*INFO* f_current_price4pmsi : 490.6047850423 
---- call prediction function shl_pm ---- 11:29:45
     previous_pred_les_level : 498.818272
     previous_pred_les_trend : -2.520814
     f_1_step_pred_les_level  : 492.255150
     f_1_step_pred_les_trend  : -3.341499
     les + misc               : 488.913651
     f_1_step_pred_price_inc  : 764.721999
     f_1_step_si              : 1.564125
*INFO* RETURNED PREDICTION LIST : [89600.0]

<<<< Record No.:  1754 >>>>
2017-05
11:29:46
89300

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:46
in_current_price  : 89300
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:46 
*INFO* f_current_si         : 1.5641248670 
*INFO* f_1_step_si         : 1.6438681950 
*INFO* f_current_price4pm   : 801 
*INFO* f_current_price4pmsi : 512.1074518407 
---- call prediction function shl_pm ---- 11:29:46
     previous_pred_les_level : 492.255150
     previous_pred_les_trend : -3.341499
     f_1_step_pred_les_level  : 505.383329
     f_1_step_pred_les_trend  : 0.002239
     les + misc               : 505.385567
     f_1_step_pred_price_inc  : 830.787260
     f_1_step_si              : 1.643868
*INFO* RETURNED PREDICTION LIST : [89600.0]

<<<< Record No.:  1755 >>>>
2017-05
11:29:47
89300

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:47
in_current_price  : 89300
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:47 
*INFO* f_current_si         : 1.6438681950 
*INFO* f_1_step_si         : 1.7409403520 
*INFO* f_current_price4pm   : 801 
*INFO* f_current_price4pmsi : 487.2653430709 
---- call prediction function shl_pm ---- 11:29:47
     previous_pred_les_level : 505.383329
     previous_pred_les_trend : 0.002239
     f_1_step_pred_les_level  : 492.518584
     f_1_step_pred_les_trend  : -2.610066
     les + misc               : 489.908518
     f_1_step_pred_price_inc  : 852.901507
     f_1_step_si              : 1.740940
*INFO* RETURNED PREDICTION LIST : [89700.0]

<<<< Record No.:  1756 >>>>
2017-05
11:29:48
89400

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:48
in_current_price  : 89400
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:48 
*INFO* f_current_si         : 1.7409403520 
*INFO* f_1_step_si         : 1.7854261570 
*INFO* f_current_price4pm   : 901 
*INFO* f_current_price4pmsi : 517.5363986279 
---- call prediction function shl_pm ---- 11:29:48
     previous_pred_les_level : 492.518584
     previous_pred_les_trend : -2.610066
     f_1_step_pred_les_level  : 509.526790
     f_1_step_pred_les_trend  : 1.372911
     les + misc               : 510.899701
     f_1_step_pred_price_inc  : 912.173689
     f_1_step_si              : 1.785426
*INFO* RETURNED PREDICTION LIST : [89700.0]

<<<< Record No.:  1757 >>>>
2017-05
11:29:49
89400

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:49
in_current_price  : 89400
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:49 
*INFO* f_current_si         : 1.7854261570 
*INFO* f_1_step_si         : 1.9330138830 
*INFO* f_current_price4pm   : 901 
*INFO* f_current_price4pmsi : 504.6414249436 
---- call prediction function shl_pm ---- 11:29:49
     previous_pred_les_level : 509.526790
     previous_pred_les_trend : 1.372911
     f_1_step_pred_les_level  : 506.455764
     f_1_step_pred_les_trend  : 0.470686
     les + misc               : 506.926450
     f_1_step_pred_price_inc  : 979.895866
     f_1_step_si              : 1.933014
*INFO* RETURNED PREDICTION LIST : [89800.0]

In [21]:
# Upon receiving 11:29:50 second price, to predict till 11:30:00 <- ten-step forward price forecasting

for i in range(shl_global_parm_ccyy_mm_offset+50, shl_global_parm_ccyy_mm_offset+51): # use July 2015 data as simulation
# for i in range(shl_global_parm_ccyy_mm_offset+55, shl_global_parm_ccyy_mm_offset+56): # use July 2015 data as simulation
    print('\n<<<< Record No.: %5d >>>>' % i)
    print(shl_data_history_ts_process['ccyy-mm'][i]) # format: ccyy-mm
    print(shl_data_history_ts_process['time'][i]) # format: hh:mm:ss
    print(shl_data_history_ts_process['bid-price'][i]) # format: integer
######################################################################################################################    
#   call prediction function, returned result is in 'list' format, i.e. [89400.0] or [89400.0, 89400.0, 89400.0, 89500.0, 89500.0, 89500.0, 89500.0, 89600.0, 89600.0, 89600.0]  
######################################################################################################################    
    shl_predict_price_k_step(shl_data_history_ts_process['time'][i], shl_data_history_ts_process['bid-price'][i],10) # <- ten-step forward price forecasting
######################################################################################################################


<<<< Record No.:  1758 >>>>
2017-05
11:29:50
89500

==>> Forecasting next   1 second/step... 
     procesing current second/step k :  1

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:50
in_current_price  : 89500
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:50 
*INFO* f_current_si         : 1.9330138830 
*INFO* f_1_step_si         : 2.0077031500 
*INFO* f_current_price4pm   : 1001 
*INFO* f_current_price4pmsi : 517.8441856023 
---- call prediction function shl_pm ---- 11:29:50
*INFO* sec50_error    : -21.104134
*INFO* sec46_49_error : -43.415544
*INFO* shl_global_parm_short_weight_misc  : -12.903936
*INFO* shl_global_parm_short_weight_ratio : 1
     previous_pred_les_level : 506.455764
     previous_pred_les_trend : 0.470686
     f_1_step_pred_les_level  : 514.679021
     f_1_step_pred_les_trend  : 2.044643
     les + misc               : 516.455701
     f_1_step_pred_price_inc  : 1036.889738
     f_1_step_si              : 2.007703

==>> Forecasting next   2 second/step... 
     procesing current second/step k :  2

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:51
in_current_price  : 89535
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:51 
*INFO* f_current_si         : 2.0077031500 
*INFO* f_1_step_si         : 2.0700270400 
*INFO* f_current_price4pm   : 1036 
*INFO* f_current_price4pmsi : 516.4557011696 
---- call prediction function shl_pm ---- 11:29:51
*INFO* shl_global_parm_short_weight_ratio : 2
     previous_pred_les_level : 514.679021
     previous_pred_les_trend : 2.044643
     f_1_step_pred_les_level  : 516.533386
     f_1_step_pred_les_trend  : 2.006012
     les + misc               : 518.003473
     f_1_step_pred_price_inc  : 1072.281196
     f_1_step_si              : 2.070027

==>> Forecasting next   3 second/step... 
     procesing current second/step k :  3

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:52
in_current_price  : 89571
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:52 
*INFO* f_current_si         : 2.0700270400 
*INFO* f_1_step_si         : 2.1699728100 
*INFO* f_current_price4pm   : 1072 
*INFO* f_current_price4pmsi : 518.0034730467 
---- call prediction function shl_pm ---- 11:29:52
*INFO* shl_global_parm_short_weight_ratio : 3
     previous_pred_les_level : 516.533386
     previous_pred_les_trend : 2.006012
     f_1_step_pred_les_level  : 518.158843
     f_1_step_pred_les_trend  : 1.928750
     les + misc               : 519.283706
     f_1_step_pred_price_inc  : 1126.831522
     f_1_step_si              : 2.169973

==>> Forecasting next   4 second/step... 
     procesing current second/step k :  4

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:53
in_current_price  : 89625
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:53 
*INFO* f_current_si         : 2.1699728100 
*INFO* f_1_step_si         : 2.2941314270 
*INFO* f_current_price4pm   : 1126 
*INFO* f_current_price4pmsi : 519.2837056343 
---- call prediction function shl_pm ---- 11:29:53
*INFO* shl_global_parm_short_weight_ratio : 4
     previous_pred_les_level : 518.158843
     previous_pred_les_trend : 1.928750
     f_1_step_pred_les_level  : 519.516761
     f_1_step_pred_les_trend  : 1.812858
     les + misc               : 520.257768
     f_1_step_pred_price_inc  : 1193.539696
     f_1_step_si              : 2.294131

==>> Forecasting next   5 second/step... 
     procesing current second/step k :  5

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:54
in_current_price  : 89692
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:54 
*INFO* f_current_si         : 2.2941314270 
*INFO* f_1_step_si         : 2.4080266430 
*INFO* f_current_price4pm   : 1193 
*INFO* f_current_price4pmsi : 520.2577680526 
---- call prediction function shl_pm ---- 11:29:54
*INFO* shl_global_parm_short_weight_ratio : 5
     previous_pred_les_level : 519.516761
     previous_pred_les_trend : 1.812858
     f_1_step_pred_les_level  : 520.568509
     f_1_step_pred_les_trend  : 1.658334
     les + misc               : 520.887029
     f_1_step_pred_price_inc  : 1254.309845
     f_1_step_si              : 2.408027

==>> Forecasting next   6 second/step... 
     procesing current second/step k :  6

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:55
in_current_price  : 89753
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:55 
*INFO* f_current_si         : 2.4080266430 
*INFO* f_1_step_si         : 2.5487838430 
*INFO* f_current_price4pm   : 1254 
*INFO* f_current_price4pmsi : 520.8870294214 
---- call prediction function shl_pm ---- 11:29:55
*INFO* shl_global_parm_short_weight_ratio : 6
     previous_pred_les_level : 520.568509
     previous_pred_les_trend : 1.658334
     f_1_step_pred_les_level  : 521.275455
     f_1_step_pred_les_trend  : 1.465180
     les + misc               : 521.132859
     f_1_step_pred_price_inc  : 1328.255011
     f_1_step_si              : 2.548784

==>> Forecasting next   7 second/step... 
     procesing current second/step k :  7

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:56
in_current_price  : 89827
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:56 
*INFO* f_current_si         : 2.5487838430 
*INFO* f_1_step_si         : 2.6968835530 
*INFO* f_current_price4pm   : 1328 
*INFO* f_current_price4pmsi : 521.1328588605 
---- call prediction function shl_pm ---- 11:29:56
*INFO* shl_global_parm_short_weight_ratio : 7
     previous_pred_les_level : 521.275455
     previous_pred_les_trend : 1.465180
     f_1_step_pred_les_level  : 521.598970
     f_1_step_pred_les_trend  : 1.233394
     les + misc               : 520.956625
     f_1_step_pred_price_inc  : 1404.959355
     f_1_step_si              : 2.696884

==>> Forecasting next   8 second/step... 
     procesing current second/step k :  8

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:57
in_current_price  : 89903
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:57 
*INFO* f_current_si         : 2.6968835530 
*INFO* f_1_step_si         : 2.7633022530 
*INFO* f_current_price4pm   : 1404 
*INFO* f_current_price4pmsi : 520.9566254900 
---- call prediction function shl_pm ---- 11:29:57
*INFO* shl_global_parm_short_weight_ratio : 8
     previous_pred_les_level : 521.598970
     previous_pred_les_trend : 1.233394
     f_1_step_pred_les_level  : 521.500422
     f_1_step_pred_les_trend  : 0.962978
     les + misc               : 520.319698
     f_1_step_pred_price_inc  : 1437.800595
     f_1_step_si              : 2.763302

==>> Forecasting next   9 second/step... 
     procesing current second/step k :  9

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:58
in_current_price  : 89936
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:58 
*INFO* f_current_si         : 2.7633022530 
*INFO* f_1_step_si         : 2.9201466620 
*INFO* f_current_price4pm   : 1437 
*INFO* f_current_price4pmsi : 520.3196984296 
---- call prediction function shl_pm ---- 11:29:58
*INFO* shl_global_parm_short_weight_ratio : 9
     previous_pred_les_level : 521.500422
     previous_pred_les_trend : 0.962978
     f_1_step_pred_les_level  : 520.941180
     f_1_step_pred_les_trend  : 0.653931
     les + misc               : 519.183447
     f_1_step_pred_price_inc  : 1516.091809
     f_1_step_si              : 2.920147

==>> Forecasting next  10 second/step... 
     procesing current second/step k :  10

+-----------------------------------------------+
| shl_predict_price()                           |
+-----------------------------------------------+

current_ccyy_mm   : 2017-05
in_current_time   : 11:29:59
in_current_price  : 90015
-------------------------------------------------
*INFO* f_current_datetime   : 2017-05 11:29:59 
*INFO* f_current_si         : 2.9201466620 
*INFO* f_1_step_si         : 3.0517320600 
*INFO* f_current_price4pm   : 1516 
*INFO* f_current_price4pmsi : 519.1834467994 
---- call prediction function shl_pm ---- 11:29:59
*INFO* shl_global_parm_short_weight_ratio : 10
     previous_pred_les_level : 520.941180
     previous_pred_les_trend : 0.653931
     f_1_step_pred_les_level  : 519.882613
     f_1_step_pred_les_trend  : 0.306253
     les + misc               : 517.509240
     f_1_step_pred_price_inc  : 1579.299538
     f_1_step_si              : 3.051732
*INFO* RETURNED PREDICTION LIST : [89800.0, 89900.0, 89900.0, 90000.0, 90100.0, 90100.0, 90200.0, 90200.0, 90300.0, 90400.0]

In [22]:
# shl_data_pm_1_step.tail(11)

In [23]:
# shl_data_pm_k_step.tail(11)

In [ ]:

MISC - Validation


In [24]:
%matplotlib inline
import matplotlib.pyplot as plt

In [25]:
shl_data_pm_k_step_test = shl_data_pm_k_step.copy()

shl_data_pm_k_step_test.index = shl_data_pm_k_step_test.index + 1

shl_data_pm_k_step_test


Out[25]:
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-05 0.000000 421.357251 421.357251 0.000000 88505.489158 6.489158 88500.0 88800.0 0.015401 11:29:01 88500.000000 2017-05 11:29:00 1.000000 421.357251 0.002373
2 2017-05 0.000000 116.879706 168.263731 -51.384025 88501.886938 2.886938 88500.0 88800.0 0.024700 11:29:02 88500.000000 2017-05 11:29:01 1.000000 64.932501 0.015401
3 2017-05 0.000000 0.235734 62.633112 -62.397379 88499.007588 0.007588 88500.0 88800.0 0.032190 11:29:03 88500.000000 2017-05 11:29:02 1.000000 40.485697 0.024700
4 2017-05 0.000000 -35.824866 22.127884 -57.952750 88497.537545 -1.462455 88500.0 88800.0 0.040822 11:29:04 88500.000000 2017-05 11:29:03 1.000000 31.065856 0.032190
5 2017-05 0.000000 -42.247894 7.008633 -49.256527 88497.294868 -1.705132 88500.0 88800.0 0.040360 11:29:05 88500.000000 2017-05 11:29:04 1.000000 24.496390 0.040822
6 2017-05 0.000000 -34.248165 5.345722 -39.593887 88496.296098 -2.703902 88500.0 88800.0 0.078950 11:29:06 88500.000000 2017-05 11:29:05 1.000000 24.776907 0.040360
7 2017-05 0.000000 -33.765232 -0.934761 -32.830471 88495.683370 -3.316630 88500.0 88800.0 0.098226 11:29:07 88500.000000 2017-05 11:29:06 1.000000 12.666199 0.078950
8 2017-05 0.000000 -29.054779 -2.559763 -26.495016 88495.276953 -3.723047 88500.0 88800.0 0.128139 11:29:08 88500.000000 2017-05 11:29:07 1.000000 10.180585 0.098226
9 2017-05 0.000000 642.600147 551.274473 91.325674 88628.930629 129.930629 88600.0 88900.0 0.202195 11:29:09 88600.000000 2017-05 11:29:08 101.000000 788.207191 0.128139
10 2017-05 0.000000 611.696734 540.998599 70.698135 88640.634126 141.634126 88600.0 88900.0 0.231543 11:29:10 88600.000000 2017-05 11:29:09 101.000000 499.517439 0.202195
11 2017-05 0.000000 532.479349 487.081152 45.398197 88657.067753 158.067753 88700.0 89000.0 0.296852 11:29:11 88600.000000 2017-05 11:29:10 101.000000 436.203984 0.231543
12 2017-05 0.000000 413.653148 395.969673 17.683475 88645.260125 146.260125 88600.0 88900.0 0.353582 11:29:12 88600.000000 2017-05 11:29:11 101.000000 340.236470 0.296852
13 2017-05 0.000000 321.987939 322.758290 -0.770351 88612.300976 113.300976 88600.0 88900.0 0.351880 11:29:13 88600.000000 2017-05 11:29:12 101.000000 285.648381 0.353582
14 2017-05 0.000000 534.123702 498.963741 35.159961 88698.394801 199.394801 88700.0 89000.0 0.373312 11:29:14 88700.000000 2017-05 11:29:13 201.000000 571.218168 0.351880
15 2017-05 0.000000 572.956860 537.177006 35.779854 88726.035114 227.035114 88700.0 89000.0 0.396252 11:29:15 88700.000000 2017-05 11:29:14 201.000000 538.423587 0.373312
16 2017-05 0.000000 768.193093 705.503174 62.689920 88812.701758 313.701758 88800.0 89100.0 0.408363 11:29:16 88800.000000 2017-05 11:29:15 301.000000 759.618244 0.396252
17 2017-05 0.000000 804.312210 746.106413 58.205797 88863.904975 364.904975 88900.0 89200.0 0.453686 11:29:17 88800.000000 2017-05 11:29:16 301.000000 737.089020 0.408363
18 2017-05 0.000000 742.189933 704.290858 37.899075 88860.152465 361.152465 88900.0 89200.0 0.486604 11:29:18 88800.000000 2017-05 11:29:17 301.000000 663.454849 0.453686
19 2017-05 0.000000 674.488667 654.410843 20.077824 88836.442085 337.442085 88800.0 89100.0 0.500293 11:29:19 88800.000000 2017-05 11:29:18 301.000000 618.573017 0.486604
20 2017-05 0.000000 632.341328 622.764703 9.576625 88831.110284 332.110284 88800.0 89100.0 0.525207 11:29:20 88800.000000 2017-05 11:29:19 301.000000 601.647210 0.500293
21 2017-05 0.000000 591.316774 590.279670 1.037104 88834.972413 335.972413 88800.0 89100.0 0.568177 11:29:21 88800.000000 2017-05 11:29:20 301.000000 573.107034 0.525207
22 2017-05 0.000000 539.772788 547.609336 -7.836549 88812.633084 313.633084 88800.0 89100.0 0.581046 11:29:22 88800.000000 2017-05 11:29:21 301.000000 529.764773 0.568177
23 2017-05 0.000000 513.363074 524.334054 -10.970980 88804.028711 305.028711 88800.0 89100.0 0.594177 11:29:23 88800.000000 2017-05 11:29:22 301.000000 518.030837 0.581046
24 2017-05 0.000000 496.599975 508.548440 -11.948466 88810.324285 311.324285 88800.0 89100.0 0.626912 11:29:24 88800.000000 2017-05 11:29:23 301.000000 506.582756 0.594177
25 2017-05 0.000000 470.583226 484.905874 -14.322647 88810.889405 311.889405 88800.0 89100.0 0.662772 11:29:25 88800.000000 2017-05 11:29:24 301.000000 480.131489 0.626912
26 2017-05 0.000000 442.225095 458.916389 -16.691294 88800.621750 301.621750 88800.0 89100.0 0.682055 11:29:26 88800.000000 2017-05 11:29:25 301.000000 454.153135 0.662772
27 2017-05 0.000000 424.755076 441.577789 -16.822712 88798.336502 299.336502 88800.0 89100.0 0.704727 11:29:27 88800.000000 2017-05 11:29:26 301.000000 441.313511 0.682055
28 2017-05 0.000000 409.948819 426.431232 -16.482413 88798.783515 299.783515 88800.0 89100.0 0.731271 11:29:28 88800.000000 2017-05 11:29:27 301.000000 427.115561 0.704727
29 2017-05 0.000000 394.887478 411.130069 -16.242591 88794.065546 295.065546 88800.0 89100.0 0.747214 11:29:29 88800.000000 2017-05 11:29:28 301.000000 411.612341 0.731271
30 2017-05 0.000000 385.429468 400.527084 -15.097616 88800.770599 301.770599 88800.0 89100.0 0.782946 11:29:30 88800.000000 2017-05 11:29:29 301.000000 402.829583 0.747214
31 2017-05 0.000000 369.491069 384.730577 -15.239508 88791.776177 292.776177 88800.0 89100.0 0.792377 11:29:31 88800.000000 2017-05 11:29:30 301.000000 384.445238 0.782946
32 2017-05 0.000000 363.117595 376.860859 -13.743264 88797.045872 298.045872 88800.0 89100.0 0.820797 11:29:32 88800.000000 2017-05 11:29:31 301.000000 379.869745 0.792377
33 2017-05 0.000000 352.448876 365.673276 -13.224400 88796.257276 297.257276 88800.0 89100.0 0.843405 11:29:33 88800.000000 2017-05 11:29:32 301.000000 366.716691 0.820797
34 2017-05 0.000000 343.015345 355.599993 -12.584648 88797.341396 298.341396 88800.0 89100.0 0.869761 11:29:34 88800.000000 2017-05 11:29:33 301.000000 356.886509 0.843405
35 2017-05 0.000000 431.259079 426.827799 4.431280 88899.737533 400.737533 88900.0 89200.0 0.929227 11:29:35 88900.000000 2017-05 11:29:34 401.000000 461.046154 0.869761
36 2017-05 0.000000 435.931650 431.459649 4.472001 88919.450160 420.450160 88900.0 89200.0 0.964486 11:29:36 88900.000000 2017-05 11:29:35 401.000000 431.541537 0.929227
37 2017-05 0.000000 423.176460 421.611742 1.564718 88914.705805 415.705805 88900.0 89200.0 0.982346 11:29:37 88900.000000 2017-05 11:29:36 401.000000 415.765311 0.964486
38 2017-05 0.000000 498.913573 484.831425 14.082147 88993.435011 494.435011 89000.0 89300.0 0.991023 11:29:38 89000.000000 2017-05 11:29:37 501.000000 510.003478 0.982346
39 2017-05 0.000000 604.853948 575.269687 29.584261 89124.225803 625.225803 89100.0 89400.0 1.033681 11:29:39 89100.000000 2017-05 11:29:38 601.000000 606.443821 0.991023
40 2017-05 0.000000 614.417511 588.211969 26.205542 89163.447385 664.447385 89200.0 89500.0 1.081427 11:29:40 89100.000000 2017-05 11:29:39 601.000000 581.417499 1.033681
41 2017-05 0.000000 590.503853 572.756492 17.747361 89155.050934 656.050934 89200.0 89500.0 1.111002 11:29:41 89100.000000 2017-05 11:29:40 601.000000 555.747426 1.081427
42 2017-05 0.000000 565.922284 555.318408 10.603876 89157.333867 658.333867 89200.0 89500.0 1.163294 11:29:42 89100.000000 2017-05 11:29:41 601.000000 540.953144 1.111002
43 2017-05 0.000000 534.423528 530.924947 3.498581 89184.073440 685.073440 89200.0 89500.0 1.281892 11:29:43 89100.000000 2017-05 11:29:42 601.000000 516.636482 1.163294
44 2017-05 0.000000 481.895457 487.852006 -5.956550 89166.966013 667.966013 89200.0 89500.0 1.386122 11:29:44 89100.000000 2017-05 11:29:43 601.000000 468.838115 1.281892
45 2017-05 0.000000 496.297459 498.818272 -2.520814 89208.133969 709.133969 89200.0 89500.0 1.428849 11:29:45 89200.000000 2017-05 11:29:44 701.000000 505.727400 1.386122
46 2017-05 0.000000 488.913651 492.255150 -3.341499 89263.721999 764.721999 89300.0 89600.0 1.564125 11:29:46 89200.000000 2017-05 11:29:45 701.000000 490.604785 1.428849
47 2017-05 0.000000 505.385567 505.383329 0.002239 89329.787260 830.787260 89300.0 89600.0 1.643868 11:29:47 89300.000000 2017-05 11:29:46 801.000000 512.107452 1.564125
48 2017-05 0.000000 489.908518 492.518584 -2.610066 89351.901507 852.901507 89400.0 89700.0 1.740940 11:29:48 89300.000000 2017-05 11:29:47 801.000000 487.265343 1.643868
49 2017-05 0.000000 510.899701 509.526790 1.372911 89411.173689 912.173689 89400.0 89700.0 1.785426 11:29:49 89400.000000 2017-05 11:29:48 901.000000 517.536399 1.740940
50 2017-05 0.000000 506.926450 506.455764 0.470686 89478.895866 979.895866 89500.0 89800.0 1.933014 11:29:50 89400.000000 2017-05 11:29:49 901.000000 504.641425 1.785426
51 2017-05 -0.267963 516.723664 514.679021 2.044643 89535.889738 1036.889738 89500.0 89800.0 2.007703 11:29:51 89500.000000 2017-05 11:29:50 1001.000000 517.844186 1.933014
52 2017-05 -0.535925 518.539398 516.533386 2.006012 89571.281196 1072.281196 89600.0 89900.0 2.070027 11:29:52 89535.889738 2017-05 11:29:51 1036.889738 516.455701 2.007703
53 2017-05 -0.803888 520.087594 518.158843 1.928750 89625.831522 1126.831522 89600.0 89900.0 2.169973 11:29:53 89571.281196 2017-05 11:29:52 1072.281196 518.003473 2.070027
54 2017-05 -1.071851 521.329619 519.516761 1.812858 89692.539696 1193.539696 89700.0 90000.0 2.294131 11:29:54 89625.831522 2017-05 11:29:53 1126.831522 519.283706 2.169973
55 2017-05 -1.339813 522.226843 520.568509 1.658334 89753.309845 1254.309845 89800.0 90100.0 2.408027 11:29:55 89692.539696 2017-05 11:29:54 1193.539696 520.257768 2.294131
56 2017-05 -1.607776 522.740635 521.275455 1.465180 89827.255011 1328.255011 89800.0 90100.0 2.548784 11:29:56 89753.309845 2017-05 11:29:55 1254.309845 520.887029 2.408027
57 2017-05 -1.875739 522.832364 521.598970 1.233394 89903.959355 1404.959355 89900.0 90200.0 2.696884 11:29:57 89827.255011 2017-05 11:29:56 1328.255011 521.132859 2.548784
58 2017-05 -2.143702 522.463400 521.500422 0.962978 89936.800595 1437.800595 89900.0 90200.0 2.763302 11:29:58 89903.959355 2017-05 11:29:57 1404.959355 520.956625 2.696884
59 2017-05 -2.411664 521.595111 520.941180 0.653931 90015.091809 1516.091809 90000.0 90300.0 2.920147 11:29:59 89936.800595 2017-05 11:29:58 1437.800595 520.319698 2.763302
60 2017-05 -2.679627 520.188867 519.882613 0.306253 90078.299538 1579.299538 90100.0 90400.0 3.051732 11:30:00 90015.091809 2017-05 11:29:59 1516.091809 519.183447 2.920147

In [26]:
# bid is predicted bid-price from shl_pm
plt.figure(figsize=(12,6))
plt.plot(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_test['f_1_step_pred_price'])

# bid is actual bid-price from raw dataset
shl_data_actual_bid = shl_data_history_ts_process[shl_global_parm_ccyy_mm_offset:shl_global_parm_ccyy_mm_offset+61].copy()
shl_data_actual_bid.reset_index(inplace=True)
plt.figure(figsize=(12,6))
plt.plot(shl_data_actual_bid['bid-price'])
plt.plot(shl_data_pm_k_step_test['f_1_step_pred_price'])


Out[26]:
[<matplotlib.lines.Line2D at 0x7f71591eb4a8>]

In [ ]:


In [27]:
# pd.concat([shl_data_actual_bid['bid-price'], shl_data_pm_k_step_test['f_1_step_pred_price'], shl_data_pm_k_step_test['f_1_step_pred_price'] - shl_data_actual_bid['bid-price']], axis=1, join='inner')
pd.concat([shl_data_actual_bid['bid-price'].tail(11), shl_data_pm_k_step_test['f_1_step_pred_price'].tail(11), shl_data_pm_k_step_test['f_1_step_pred_price'].tail(11) - shl_data_actual_bid['bid-price'].tail(11)], axis=1, join='inner')


Out[27]:
bid-price f_1_step_pred_price 0
50 89500 89478.895866 -21.104134
51 89500 89535.889738 35.889738
52 89600 89571.281196 -28.718804
53 89600 89625.831522 25.831522
54 89700 89692.539696 -7.460304
55 89800 89753.309845 -46.690155
56 89900 89827.255011 -72.744989
57 90000 89903.959355 -96.040645
58 90100 89936.800595 -163.199405
59 90100 90015.091809 -84.908191
60 90100 90078.299538 -21.700462

In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


The End