def plotPriceAndBeLong(issue, modelStartDate, modelEndDate, valData): from Code.lib.plot_utils import PlotUtility plotIt = PlotUtility() plotTitle = "Close " + str(modelStartDate) + " to " + str(modelEndDate) plotIt.plot_v2x(valData, plotTitle) plt.show(block=False) plotIt.histogram(valData['beLong'], x_label="beLong signal", y_label="Frequency", title = "beLong distribution for " + issue) plt.show(block=False)
model_results = [] predictor_vars = "Temp holding spot" show_plot = False # IS only for i in range(segments): print("====================================") print("IN SAMPLE") print('{0} to {1}'.format(modelStartDate, modelEndDate)) mmData = dataSet[modelStartDate:modelEndDate].copy() nrows = mmData.shape[0] if show_plot == True: plotTitle = issue + ", " + str(modelStartDate) + " to " + str( modelEndDate) plotIt.plot_v2x(mmData, plotTitle) plotIt.histogram(mmData['beLong'], x_label="beLong signal", y_label="Frequency", title="beLong distribution for " + issue) plt.show(block=False) # Stationarity tests # stationarity_tests(mmData, 'Close', issue) # cols = [k for k,v in feature_dict.items() if v == 'Keep'] # for x in cols: # stationarity_tests(mmData, x, issue) plot_dict = {} plot_dict['Issue'] = issue plot_vars = [k for k, v in feature_dict.items() if v == 'Keep']