Merge pull request #223 from DidierRLopes/improve-finbrain

Improve finbrain plot and readme
This commit is contained in:
DidierRLopes
2021-03-18 13:15:08 +00:00
committed by GitHub
2 changed files with 3 additions and 2 deletions

View File

@@ -49,9 +49,9 @@ usage: finbrain
```
FinBrain collects the news headlines from 15+ major financial news sources on a daily basis and analyzes them to generate sentiment scores for more than 4500 US stocks. FinBrain Technologies develops deep learning algorithms for financial analysis and prediction, which currently serves traders from more than 150 countries all around the world. [Source: See https://finbrain.tech]
![finbrain](https://user-images.githubusercontent.com/25267873/111560461-6f735c80-878a-11eb-8f3a-72ef0ddbf8e3.png)
![finbrain2](https://user-images.githubusercontent.com/25267873/111629515-49c97000-87e9-11eb-92a6-a9eebb4b4bd9.png)
<img width="992" alt="Captura de ecrã 2021-03-18, às 01 33 35" src="https://user-images.githubusercontent.com/25267873/111560455-6edac600-878a-11eb-9e1f-599abe3b8263.png">
<img width="986" alt="Captura de ecrã 2021-03-18, às 12 53 31" src="https://user-images.githubusercontent.com/25267873/111629542-4fbf5100-87e9-11eb-8d5d-96faa8d3fca4.png">
# REDDIT <a name="REDDIT"></a>

View File

@@ -85,6 +85,7 @@ def plot_sentiment(sentiment: pd.DataFrame, ticker: str):
start_date = sentiment.index[-1].strftime("%Y/%m/%d")
plt.title(f"FinBrain's Sentiment Analysis for {ticker.upper()} since {start_date}")
plt.gca().xaxis.set_major_formatter(mdates.DateFormatter("%Y/%m/%d"))
plt.gca().xaxis.set_major_locator(mdates.DayLocator(interval=1))
plt.gcf().autofmt_xdate()
plt.ylim([-1.1, 1.1])
senValues = np.array(pd.to_numeric(sentiment["Sentiment Analysis"].values))