Created
September 16, 2021 15:37
-
-
Save h3ik0th/cf682d60ebd87054d3c0ea6f63f8971c to your computer and use it in GitHub Desktop.
GoT_grangercausality_01.py
This file contains 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
import statsmodels.api as sm | |
from statsmodels.stats.stattools import durbin_watson | |
from statsmodels.tsa.stattools import grangercausalitytests, adfuller, kpss, coint | |
from pmdarima.arima import ndiffs # for order of differencing | |
from statsmodels.tsa.api import VAR | |
import numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
import warnings | |
warnings.filterwarnings("ignore") | |
ALPHA = 0.05 | |
# import the Google Trend csv file | |
# Tyrion and Cersei's weekly Google fame since 2011 | |
df = pd.read_csv("got_Cersei_Tyrion.csv") | |
df | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment