Skip to content

Instantly share code, notes, and snippets.

Created June 22, 2015 14:59
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/ffe88d14360d13cce469 to your computer and use it in GitHub Desktop.
Save anonymous/ffe88d14360d13cce469 to your computer and use it in GitHub Desktop.
Investing Regression Example
def investing_example():
"""
This method creates a set of regression analyses based on fundamental trading (revenues)
"""
# b: blue, g: green, r: red, c: cyan, m: magenta, y: yellow, k: black, w: white
statsmodels_args_inv = StatsModelsSettings(2, False)
quandl_args_inv = QuandlSettings(5, 1, "yearly")
regressions_inv = [RegressionAnalysis("DMDRN/GOOG_REV_LAST", quandl_args_inv, statsmodels_args_inv, 'b'),
RegressionAnalysis("DMDRN/YHOO_REV_LAST", quandl_args_inv, statsmodels_args_inv, 'g'),
RegressionAnalysis("DMDRN/AAPL_REV_LAST", quandl_args_inv, statsmodels_args_inv, 'k')]
plot_regression_line(regressions_inv)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment