Create an app to get stock information, prices, and sentiment
Use Watson Discovery, Cloudant NoSQL DB, Node.js, and Alpha Vantage to create a web app to monitor sentiment, price, and news for individually listed stocks
In the world of investments, there are many things to take into consideration. Along with the normal metrics such as price and earnings, there are other factors that you need to make an informed decision, factors such as sentiments about a company. This code pattern shows you how to create an app that uses Watson Discovery, Node.js, and Cloudant NoSQL DB to help you with these decisions. You can then use it as a guide to jump-start your own coding projects.
Investing in the stock market can be tricky because there are many metrics to consider. Things like price, price-earnings ratios, alphas, price-to-book, and free cash flow are just a few of the factors to think about. There is also the qualitative data that comes from news sources. Data that can help you make investment decisions around a company’s future value based on positive or negative news. To help you with these decisions, you can use the Watson Discovery pre-enriched news collection to keep track of various companies. With this code pattern as a guide, you can create a web app that lets you monitor, view sentiment information on, get links to news stories about, and track stock prices over time for companies you’re interested in investing in.
The code pattern explains how to create a Node.js web app that uses an open source bootstrap template from Blackrock Digital. The app uses Watson Discovery to gather information about the company and display an analysis of positive or negative sentiment. Price information comes from Alpha Vantage, and all of the information is stored in a Cloudant NoSQL database.
When you have completed this code pattern, you should understand how to:
- Use Watson Discovery News
- Create a Node.js app for a web interface to stock information
- Access stock information from free APIs provided by Alpha Vantage
- Store and retrieve information in a Cloudant NoSQL database
- Add and remove stocks using the Web UI.
- The app processes the input and routes it to the back-end server.
- The back-end server stores the stock information in a Cloudant NoSQL database.
- The back-end server uses Watson Discovery to find information about a specific company.
- Watson Discovery queries the Watson News Collection for articles related to the company.
- The Alpha Vantage APIs are queried to find market price for a given company.
- News, sentiment, and stock price are all returned and rendered in the web app.
Find the detailed steps for this pattern in the README. The steps will show you how to:
- Clone the watson-stock-advisor repo.
- Create IBM Cloud services.
- Configure Watson Discovery and get credentials.
- Provision a Cloudant NoSQL database and get credentials.
- Add IBM Cloud credentials to the .env file.
- Run the application.