Skip to content

Commit cbaa525

Browse files
committed
2 parents a9156ed + 1edc889 commit cbaa525

4 files changed

Lines changed: 14 additions & 37 deletions

File tree

README.md

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,11 @@
66
[![Donate PayPal](https://img.shields.io/badge/Donate%20%24-PayPal-brightgreen.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CLF223XAS4W72)
77

88
# stocksight
9-
Crowd-sourced stock market analyzer and stock predictor using Elasticsearch, Twitter, News headlines and Python natural language processing and sentiment analysis. How much do emotions on Twitter and news headlines affect a stock's price? Let's find out...
9+
Stock market analyzer and stock predictor using Elasticsearch, Twitter, News headlines and Python natural language processing and sentiment analysis. How much do emotions on Twitter and news headlines affect a stock's price? Let's find out...
1010

1111
## About
12-
stocksight is a crowd-sourced stock market analysis open source software that uses Elasticsearch to store Twitter and news headlines data for stocks. stocksight analyzes the emotions of what the author writes and does sentiment analysis on the text to determine how the author "feels" about a stock. stocksight makes an aggregated analysis of all collected data from all sources.
12+
stocksight is an open source stock market analysis software that uses Elasticsearch to store Twitter and news headlines data for stocks. stocksight analyzes the emotions of what the author writes and does sentiment analysis on the text to determine how the author "feels" about a stock.
1313

14-
Each user running stocksight has a unique fingerprint: specific stocks they are following, news sites and twitter users they follow to find information for those stocks. This creates a unique sentiment analysis for each user, based on what data sources they are getting stocksight to search. Users can have the same stocks, but their data sources could vary significantly creating different sentiment analysis for the same stock. stocksight website will allow each user to see other sentiment analysis results from other stocksight user app results and a combined aggregated view of all.
15-
16-
## Stocksight website
17-
https://stocksight.diskoverspace.com
18-
Currently in BETA. Free signup. Once you are registered and login, you will be given a token which you need to add to your stocksight config file to upload your stocksight results to the website. Edit config.py and add the line
19-
20-
`stocksight_token = "<your auth token>"`
2114

2215
## Slack workspace
2316
Join the conversation, get support, etc on [stocksight Slack](https://join.slack.com/t/stocksightworkspace/shared_invite/enQtNzk1ODI0NjA3MTM4LTA3ZDA0YzllOGNiM2I5ZjAzYWM2MjNmMjI0OTRlY2ZjYTk1NmM5YmEwMmMwOTE2OTNiMGZlNzdjZmZkM2RjM2U).
@@ -50,8 +43,6 @@ $ cd stocksight
5043
Stocksight Kibana dashboard
5144
<img src="https://github.com/shirosaidev/stocksight/blob/master/docs/stocksight-dashboard-kibana.png?raw=true" alt="stocksight kibana dashboard" />
5245

53-
Stocksight website
54-
<img src="https://github.com/shirosaidev/stocksight/blob/master/docs/stocksight_website_screenshot.png?raw=true" alt="stocksight website dashboard" />
5546

5647
## Install - Docker
5748

@@ -96,9 +87,7 @@ https://developer.twitter.com/en/docs/basics/authentication/guides/access-tokens
9687

9788
4) Add twitter consumer key/access token and secrets to config.py
9889

99-
5) Edit config.py and modify NLTK tokens required/ignored and twitter feeds you want to mine. NLTK tokens required are keywords which must be in tweet before adding it to Elasticsearch and uploaded to StockSight website (whitelist). NLTK tokens ignored are keywords which if are found in tweet, it will not be added to Elasticsearch and uploaded to StockSight website (blacklist).
100-
101-
These settings (tokens, feeds) and optional keywords for tweets, are what creates your unique fingerprint and helps with the crowd-sourcing of the stock symbol data mining and sentiment accuracy on StockSight website. The higher number of unique and valid data sources, the more accurate the sentiment analysis average should be.
90+
5) Edit config.py and modify NLTK tokens required/ignored and twitter feeds you want to mine. NLTK tokens required are keywords which must be in tweet before adding it to Elasticsearch (whitelist). NLTK tokens ignored are keywords which if are found in tweet, it will not be added to Elasticsearch (blacklist).
10291

10392
### Examples
10493

@@ -108,16 +97,10 @@ Run sentiment.py to create 'stocksight' index in Elasticsearch and start mining
10897
$ python sentiment.py -s TSLA -k 'Elon Musk',Musk,Tesla,SpaceX --debug
10998
```
11099

111-
Start mining and analyzing Tweets using keywords and upload sentiment results to stocksight website (requires website auth token) using the stock symbol and stocksight website symbol TSLA. The website symbol is the "tag name" for the sentiment data being uploaded
112-
113-
```sh
114-
$ python sentiment.py -s TSLA -k 'Elon Musk',Musk,Tesla,SpaceX -U --debug
115-
```
116-
117100
Start mining and analyzing Tweets using keywords and the stock symbol TSLA and follow any url links in tweets and performing sentiment analysis on the link web page as well as the tweet
118101

119102
```sh
120-
$ python sentiment.py -s TSLA -k 'Elon Musk',Musk,Tesla,SpaceX -l -U --debug
103+
$ python sentiment.py -s TSLA -k 'Elon Musk',Musk,Tesla,SpaceX -l --debug
121104
```
122105

123106
Start mining and analyzing Tweets from feeds in config using cached user ids from file (if you change any of the twitter feeds in the config file, you need to delete this file and recreate it without -f)
@@ -150,7 +133,7 @@ To import the saved exported visualizations/dashboard, go to Kibana, click on ma
150133
```
151134
usage: sentiment.py [-h] [-i INDEX] [-d] -s SYMBOL [-k KEYWORDS] [-a] [-u URL]
152135
[-f FILE] [-l] [-n] [--frequency FREQUENCY]
153-
[--followlinks] [-U] [-w] [--noelasticsearch]
136+
[--followlinks] [-w] [--noelasticsearch]
154137
[--overridetokensreq TOKEN [TOKEN ...]]
155138
[--overridetokensignore TOKEN [TOKEN ...]] [-v] [--debug]
156139
[-q] [-V]
@@ -162,10 +145,7 @@ optional arguments:
162145
-d, --delindex Delete existing Elasticsearch index first
163146
-s SYMBOL, --symbol SYMBOL
164147
Stock symbol you are interesed in searching for,
165-
example: TSLA This is used as the symbol tag on
166-
stocksight website. Could also be set to a tag name
167-
like 'elonmusk' or 'elon' etc. Cannot contain spaces
168-
and more than 25 characters.
148+
example: TSLA
169149
-k KEYWORDS, --keywords KEYWORDS
170150
Use keywords to search for in Tweets instead of feeds.
171151
Separated by comma, case insensitive, spaces are ANDs
@@ -183,7 +163,6 @@ optional arguments:
183163
(default: 120 sec)
184164
--followlinks Follow links on news headlines and scrape relevant
185165
text from landing page
186-
-U, --upload Upload sentiment to stocksight website (BETA)
187166
-w, --websentiment Get sentiment results from text processing website
188167
--noelasticsearch Don't connect or add new docs to Elasticsearch
189168
--overridetokensreq TOKEN [TOKEN ...]
@@ -196,9 +175,8 @@ optional arguments:
196175
--debug Debug message output
197176
-q, --quiet Run quiet with no message output
198177
-V, --version Prints version and exits
199-
```
200178
201-
```
179+
202180
usage: stockprice.py [-h] [-i INDEX] [-d] [-s SYMBOL] [-f FREQUENCY] [-v]
203181
[--debug] [-q] [-V]
204182

config.py.sample

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ elasticsearch_host = "localhost"
22
elasticsearch_port = 9200
33
elasticsearch_user = ""
44
elasticsearch_password = ""
5-
consumer_key = "wA4nfiLzLZn8nfJUms7W44Lu9"
6-
consumer_secret = "R3oYihq08zkWf3qLu5auiO0BcNzegs7gpW47oWgJCQuBAKyLr4"
7-
access_token = "912155670882820096-jr9ipJ6FqyzcCc6v4c6ahPaQZmjx5JY"
8-
access_token_secret = "3GfwcUW4rsyVvPbKnkHfRW0iDZgzQcHbO9mtvYdGF0RRI"
5+
consumer_key = ""
6+
consumer_secret = ""
7+
access_token = ""
8+
access_token_secret = ""
99
nltk_tokens_required = ("neuralink", "solar", "tesla", "@tesla", "#tesla", "tesla", "tsla", "#tsla", "elonmusk", "elon", "musk", "spacex", "starlink")
1010
nltk_min_tokens = 1
1111
nltk_tokens_ignored = ("win", "giveaway")
@@ -17,4 +17,4 @@ twitter_feeds = ["@elonmusk", "@cnbc", "@benzinga", "@stockwits",
1717
"@muddywatersre", "@mcuban", "@AswathDamodaran", "@elerianm",
1818
"@MorganStanley", "@ianbremmer", "@GoldmanSachs", "@Wu_Tang_Finance",
1919
"@Schuldensuehner", "@NorthmanTrader", "@Frances_Coppola", "@bySamRo",
20-
"@BuzzFeed","@nytimes"]
20+
"@BuzzFeed","@nytimes"]

docs/_pages/home.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ header:
88
cta_label: "<i class='fa fa-download' aria-hidden='true'></i> Download"
99
cta_url: "https://github.com/shirosaidev/stocksight/releases/latest"
1010
caption:
11-
excerpt: "Crowd-sourced stock analyzer and stock predictor using Elasticsearch, Twitter, News headlines and Python natural language processing and sentiment analysis.<br /> <small><a href='https://github.com/shirosaidev/stocksight/releases/tag/v0.1-b.9'>Latest release v0.1-b.9</a></small><br /><br />
11+
excerpt: "Stock analyzer and stock predictor using Elasticsearch, Twitter, News headlines and Python natural language processing and sentiment analysis.<br /> <small><a href='https://github.com/shirosaidev/stocksight/releases/tag/v0.1-b.9'>Latest release v0.1-b.11</a></small><br /><br />
1212
{::nomarkdown}<iframe style='display: inline-block;' src='https://ghbtns.com/github-btn.html?user=shirosaidev&repo=stocksight&type=star&count=true&size=large' frameborder='0' scrolling='0' width='160px' height='30px'></iframe> <iframe style='display: inline-block;' src='https://ghbtns.com/github-btn.html?user=shirosaidev&repo=diskover&type=fork&count=true&size=large' frameborder='0' scrolling='0' width='158px' height='30px'></iframe>{:/nomarkdown}"
1313
github:
1414
- excerpt: '{::nomarkdown}<iframe style="display: inline-block;" src="https://ghbtns.com/github-btn.html?user=shirosaidev&repo=stocksight&type=star&count=true&size=large" frameborder="0" scrolling="0" width="160px" height="30px"></iframe> <iframe style="display: inline-block;" src="https://ghbtns.com/github-btn.html?user=shirosaidev&repo=stocksight&type=fork&count=true&size=large" frameborder="0" scrolling="0" width="158px" height="30px"></iframe>
@@ -19,5 +19,4 @@ intro:
1919

2020
{% include feature_row id="intro" type="center" %}
2121

22-
<p><strong>stocksight</strong> is a crowd-sourced stock analysis open source software that uses <strong>Elasticsearch</strong> to store Twitter and news headlines data for stocks. stocksight analyzes the emotions of what the author writes and does sentiment analysis on the text to determine how the author "feels" about a stock. stocksight makes an aggregated analysis of all collected data from all sources.</p>
23-
<p>Each user running stocksight has a unique fingerprint: specific stocks they are following, news sites and twitter users they follow to find information for those stocks. This creates a unique sentiment analysis for each user, based on what data sources they are getting stocksight to search. Users can have the same stocks, but their data sources could vary significantly creating different sentiment analysis for the same stock. stocksight website will allow each user to see other sentiment analysis results from other stocksight user app results and a combined aggregated view of all.</p>
22+
<p><strong>stocksight</strong> is an open source stock analysis software that uses <strong>Elasticsearch</strong> to store Twitter and news headlines data for stocks. stocksight analyzes the emotions of what the author writes and does sentiment analysis on the text to determine how the author "feels" about a stock.</p>
-552 KB
Binary file not shown.

0 commit comments

Comments
 (0)