#    gl.tradingPV(timeData)
    #
    #    ax2 = gl.subplot2grid((5,4), (3,0), rowspan=1, colspan=4)
    #    RSI = timeData.RSI(n = 14)
    #    gl.tradingOcillator(timeData, RSI)
    #
    #    ax3 = gl.subplot2grid((5,4), (4,0), rowspan=1, colspan=4)
    #    STO = timeData.STO(n = 14)
    #    gl.tradingOcillator(timeData, STO)
    #
    #    ws = 100
    #    gl.add_slider(args = {"wsize":ws}, plots_affected = [])
    #    gl.add_hidebox()

    plt.subplots_adjust(left=.09,
                        bottom=.14,
                        right=.90,
                        top=.95,
                        wspace=.0,
                        hspace=0)

#############################################################
############## Classic TimeSeries Analysis #################################
#############################################################
tsa_f = 0
if (tsa_f == 1):
    timeSeries = timeData.get_timeSeries(["Average"])
    returns = timeData.get_timeSeriesReturn()
    grtsa.plot_acf_pacf(returns[:, 0])
    grtsa.plot_decomposition(timeSeries[:, 0].T)
#    gl.add_slider(args = {"wsize":ws}, plots_affected = [])
#    gl.add_hidebox()
    
    plt.subplots_adjust(left=.09, bottom=.14, right=.90, top=.95, wspace=.0, hspace=0)

#############################################################
############## Classic TimeSeries Analysis #################################
#############################################################

tsa_f = 0

if (tsa_f == 1):
    timeSeries = timeData.get_timeSeries(["Average"]);
    returns = timeData.get_timeSeriesReturn()
    grtsa.plot_acf_pacf(returns[:,0])
    grtsa.plot_decomposition(timeSeries[:,0].T)
    
#############################################################
############## Data filling  #################################
#############################################################

data_filling = 0
if (data_filling == 1):
    time_diff = intl.find_min_timediff(timeData.TD)
#    print time_diff
#    print type(time_diff)
    
#    idx = intl.get_pdintra_by_days(timeData.TD)
    
    ## Fill the interspaces, create another timeSeries and plot it
    filled_all = intl.fill_everything(timeData.get_timeData())