Created
July 20, 2019 02:50
-
-
Save kperry2215/a1dac8cebd99d9720614281b0ecef8fa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Convert the dataframe to a numpy array | |
master_array=np.array(master_df[['Electricity_Price_Transformed_Differenced', | |
'Nat_Gas_Price_MCF_Transformed_Differenced']].dropna()) | |
#Generate a training and test set for building the model: 95/5 split | |
training_set = master_array[:int(0.95*(len(master_array)))] | |
test_set = master_array[int(0.95*(len(master_array))):] | |
#Fit to a VAR model | |
model = VAR(endog=training_set) | |
model_fit = model.fit() | |
#Print a summary of the model results | |
model_fit.summary() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment