Skip to content

Commit

Permalink
Trying to split up scripts, so added stockTickers by sentiment script
Browse files Browse the repository at this point in the history
  • Loading branch information
theriley106 committed Dec 29, 2018
1 parent 0df5a01 commit 0d740e8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions stockTickersBySentiment.py
@@ -0,0 +1,15 @@
import json
import main



if __name__ == '__main__':
myVals = []
g = len(main.STOCK_TICKERS)
for i, val in enumerate(main.STOCK_TICKERS):
sentiment = main.get_sentiment_by_ticker(val)
print("{} | {}".format(val, sentiment))
myVals.append({"ticker": val, "sentiment": sentiment})
with open('sentimentByTicker.json', 'w') as fout:
json.dump(myVals, fout)
print("{}/{}".format(i, g))

0 comments on commit 0d740e8

Please sign in to comment.