Skip to content

Instantly share code, notes, and snippets.

Created June 22, 2015 15:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/e642202a424a3bb92cfc to your computer and use it in GitHub Desktop.
Save anonymous/e642202a424a3bb92cfc to your computer and use it in GitHub Desktop.
def economics_example():
"""
This method creates a set of regression analyses based on economics GDP's of the BRICS nations,
"""
# b: blue, g: green, r: red, c: cyan, m: magenta, y: yellow, k: black, w: white
statsmodels_args = StatsModelsSettings(1, False)
quandl_args_prices = QuandlSettings(15, 1, "yearly")
# South Africa, China, Brazil, India, Russia
regressions = [RegressionAnalysis("WORLDBANK/ZAF_NY_GDP_MKTP_KN", quandl_args_prices, statsmodels_args, 'b'),
RegressionAnalysis("WORLDBANK/CHN_NY_GDP_MKTP_KN", quandl_args_prices, statsmodels_args, 'g'),
RegressionAnalysis("WORLDBANK/BRA_NY_GDP_MKTP_KN", quandl_args_prices, statsmodels_args, 'k'),
RegressionAnalysis("WORLDBANK/IND_NY_GDP_MKTP_KN", quandl_args_prices, statsmodels_args, 'm'),
RegressionAnalysis("WORLDBANK/RUS_NY_GDP_MKTP_KN", quandl_args_prices, statsmodels_args, 'c')]
plot_regression_line(regressions)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment