All Projects → IBM → watson-stock-advisor

IBM / watson-stock-advisor

Licence: Apache-2.0 license
Create a web app for monitoring sentiment, price, and news for individual listed stocks, using IBM Watson Discovery and CloudantDB as well as Nodejs and Alpha Vantage.

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to watson-stock-advisor

watson-discovery-news
A Node.js web app that uses the Watson Discovery News service to query and view the latest trending news items.
Stars: ✭ 39 (-56.18%)
Mutual labels:  watson-discovery, ibmcode
StockBar
A menu bar app to track stock prices, currency exchange rates, and cryptocurrency prices.
Stars: ✭ 17 (-80.9%)
Mutual labels:  stock-prices
watson-discovery-sdu-with-assistant
Build a Node.js chatbot that uses Watson services and webhooks to query an owner's manual
Stars: ✭ 20 (-77.53%)
Mutual labels:  ibmcode
stock-market-prediction-via-google-trends
Attempt to predict future stock prices based on Google Trends data.
Stars: ✭ 45 (-49.44%)
Mutual labels:  stock-prices
alpha-vantage-cookbook
JavaScript examples to help you with accessing market data from https://www.alphavantage.co/
Stars: ✭ 97 (+8.99%)
Mutual labels:  stock-prices
intrinio-realtime-python-sdk
Intrinio Python SDK for Real-Time Stock Prices
Stars: ✭ 79 (-11.24%)
Mutual labels:  stock-prices
personal-wealth-portfolio-mgt-bot
WARNING: This repository is no longer maintained ⚠️ This repository will not be updated. This repository will be kept available in read-only mode.
Stars: ✭ 43 (-51.69%)
Mutual labels:  ibmcode
spring-boot-starter
Spring Boot support for Watson services
Stars: ✭ 12 (-86.52%)
Mutual labels:  watson-discovery
TraderBot
No description or website provided.
Stars: ✭ 39 (-56.18%)
Mutual labels:  stock-prices
regression-stock-prediction
Predicting Google’s stock price using regression
Stars: ✭ 54 (-39.33%)
Mutual labels:  stock-prices
AlphaVantage.Net
.Net client library for Alpha Vantage API
Stars: ✭ 65 (-26.97%)
Mutual labels:  alphavantage
watson-discovery-ui
Develop a fully featured Node.js web app built on the Watson Discovery Service
Stars: ✭ 63 (-29.21%)
Mutual labels:  ibmcode
sms-analysis-with-wks
Analyzing SMS offers for domain specific entities using Watson Knowledge Studio and Watson's Natural Language Understanding
Stars: ✭ 17 (-80.9%)
Mutual labels:  ibmcode
TerminalStocks
Pure terminal stock ticker for Windows.
Stars: ✭ 88 (-1.12%)
Mutual labels:  stock-prices
d3-kagi
An open source javascript library to render beautiful Kagi charts using D3.js and pure Javascript
Stars: ✭ 26 (-70.79%)
Mutual labels:  stock-prices
predictive-model-on-watson-ml
Create and deploy a predictive model using Watson Studio and Watson Machine Learning
Stars: ✭ 51 (-42.7%)
Mutual labels:  ibmcode
banking-digitalization-using-hybrid-cloud-with-mainframes
The following journey will introduce the available Banking APIs published on IBM Cloud with logical business programs running on the IBM Z Mainframe through a simulated retail bank called MPLbank.
Stars: ✭ 21 (-76.4%)
Mutual labels:  ibmcode
gdpr-fingerprint-pii
Use Watson Natural Language Understanding and Watson Knowledge Studio to fingerprint personal data from unstructured documents
Stars: ✭ 49 (-44.94%)
Mutual labels:  ibmcode
volatile
Volatile: your day-to-day trading companion.
Stars: ✭ 53 (-40.45%)
Mutual labels:  stock-prices
alexa-skill-watson-assistant
Alexa Skill using IBM Watson Assistant and IBM Cloud Functions
Stars: ✭ 72 (-19.1%)
Mutual labels:  ibmcode

Build Status

Read this in other languages: 日本語.

WARNING: This repository is no longer maintained ⚠️

This repository will not be updated. The repository will be kept available in read-only mode.

Watson Stock Advisor

In this Code Pattern, we will create a web app for monitoring sentiment, price, and news for individual listed stocks, using IBM Watson Discovery and CloudantDB as well as Nodejs and Alpha Vantage. The web page is adapted from a template from Start Bootstrap by Blackrock Digital. You can find the repository for the template here, including its License.

When the reader has completed this Code Pattern, they will understand how to:

  • Create and use Watson Discovery and Cloudant NoSQL Database
  • Gather news from the Watson Discovery News service
  • Obtain stock price information from Alpha Vantage
  • Deploy a Nodejs application to input stock choices and display information

Flow

  1. The user adds and remove stocks they are interested in using the Web UI.
  2. User input is processed and routed to the backend server.
  3. The backend server stores stock information in a Cloudant NoSQL database for easy retrieval.
  4. The backend server uses Watson Discovery to find information about a specific company.
  5. The Watson Discovery Service queries the Watson News collection for articles related to the company.
  6. The Alpha Vantage APIs are queried to find market price for a given company.
  7. News, sentiment, and stock price are all returned and rendered in the web app to the user.

Included Components

  • Watson Discovery: A cognitive search and content analytics engine for applications to identify patterns, trends, and actionable insights.
  • Cloudant NoSQL DB: A fully managed data layer designed for modern web and mobile applications that leverages a flexible JSON schema.

Featured Technologies

  • NodeJS: Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js' package ecosystem, npm, is the largest ecosystem of open source libraries in the world.

Watch the Video

Prerequisites

Create an Alpha Vantage account and get API key

  • Create an account on Alpha Vantage by clicking Get Your Free API Key Today.
  • Copy the Alpha Vantage API key for later use

Steps

Use the Deploy to IBM Cloud button OR create the services and run locally.

Deploy to IBM Cloud

Deploy to IBM Cloud

  1. Press the above Deploy to IBM Cloud button and then click on Deploy.
  1. In Toolchains, click on Delivery Pipeline to watch while the app is deployed. (Note, if you get an error on the first time you deploy such as Server error, status code: 409, error code: 60016, message: An operation for service instance wsa-discovery is in progress., just click on the re-deploy button again, and it should work). Once deployed, the app can be viewed by clicking View app.

  1. To see the app and services created and configured for this Code Pattern, use the IBM Cloud dashboard. The app is named watsonstockadvisor with a unique suffix. The following services are created and easily identified by the wsa- prefix:
    • wsa-discovery
    • wsa-cloudant

You can Deploy the application simply by clicking the Deploy to IBM Cloud button above to automatically create a toolchain to provision and run the application.

If you do not have an IBM Cloud account yet, you will need to create one.

Update the Environment of your deployed app

  1. Navigate to https://cloud.ibm.com/dashboard/apps/
  2. Located and click on your newly created application (not the 'Route' link)
  3. Select 'Runtime' in the left menu
  4. Select the 'Environment Variables' tab in the middle of the page
  5. Scroll down to the User defined variables section
  6. Paste your API key from Alpha Vantage

Run locally

  1. Clone the repo
  2. Create IBM Cloud services
  3. Configure Watson Discovery and Get Credentials
  4. Provision Cloudant NoSQL DB and Get Credentials
  5. Web Portal
  6. Add IBM Cloud Services Credentials to .env file
  7. Run the application

1. Clone the repo

Clone the watson-stock-advisor locally. In a terminal, run:

$ git clone https://github.com/ibm/watson-stock-advisor

2. Create IBM Cloud services

Create the following services:

3. Configure Watson Discovery and get credentials

  • Launch the Watson Discovery tool. The first time you do this, you will see "Before working with private data, we will need to set up your storage". Click Continue and wait for the storage to be set up.

  • Choose Watson Discovery News from the Manage Data tab.

  • Under Collection Info section, click Use this collection in API and copy the Environment ID into your .env file as DISCOVERY_ENV_ID. This should be system for the Watson Discovery News collection.

  • From the top-level Discovery page, click Service Credentials. If there is no credential under View Credentials click New Credential and then View Credentials.

  • Use the username and password in the .env file, as instructed below.

4. Provision Cloudant NoSQL DB and Get Credentials

  • Navigate to cloud.ibm.com

  • Click Create Resource

  • Search for cloudant nosql

  • Select the only search result under Data & Analytics called Cloudant NoSQL DB

  • Specify the settings you want

  • Click Create in the bottom right

  • From the top-level Cloudant page, click Service Credentials. If there is no credential under View Credentials click New Credential and then View Credentials.

5. Web Portal

The web page is adapted from a template from Start Bootstrap by Blackrock Digital. You can find the repository for the template here, including its License.

6. Add IBM Cloud Services Credentials to .env file

As you create the Bluemix Services, you'll need to create service credentials and get the username and password:

Move the watson-stock-advisor/web/env.sample file to watson-stock-advisor/web/.env and populate the service credentials (and Cloudant URL) as you create the credentials:

The credentials for IBM Cloud services (Discovery), can be found in the Services menu in IBM Cloud, by selecting the Service Credentials option for each service.

The other settings for Discovery were collected during the earlier setup steps (ENV_ID).

Navigate to the web directory and Copy the env.sample to .env.

$ cp env.sample .env

Edit the .env file with the necessary settings.

env.sample:

# Copy this file to .env and replace the credentials with 
# your own before starting the app.

# Watson Discovery
DISCOVERY_VERSION_DATE="2018-03-05"
DISCOVERY_ENV_ID="system"
DISCOVERY_URL=<add_discovery_url>
## Un-comment and use either username+password or IAM apikey.
# DISCOVERY_USERNAME=<add_discovery_username>
# DISCOVERY_PASSWORD=<add_discovery_password>
# DISCOVERY_IAM_APIKEY=<add_discovery_iam_apikey>

# Cloudant
CLOUDANT_USERNAME=<add_cloudant_username>
CLOUDANT_PASSWORD=<add_cloudant_password>
CLOUDANT_HOST=<add_cloudant_host>
DB_NAME="stock-data"

# App Config
MAX_COMPANIES=20
MAX_ARTICLES_PER_COMPANY=100

# AlphaVantage
ALPHAVANTAGE_API_KEY="demo"

7. Run the application

If you decided to run the app locally...

In the root directory, run:

$ npm install
$ npm start

The portal should now be accessible on port 8080 (or another port specified by PORT in .env)

Sample Output

Links

Learn more

  • Artificial Intelligence Code Patterns: Enjoyed this Code Pattern? Check out our other AI Code Patterns.
  • AI and Data Code Pattern Playlist: Bookmark our playlist with all of our Code Pattern videos
  • With Watson: Want to take your Watson app to the next level? Looking to utilize Watson Brand assets? Join the With Watson program to leverage exclusive brand, marketing, and tech resources to amplify and accelerate your Watson embedded commercial solution.

License

This code pattern is licensed under the Apache Software License, Version 2. Separate third party code objects invoked within this code pattern are licensed by their respective providers pursuant to their own separate licenses. Contributions are subject to the Developer Certificate of Origin, Version 1.1 (DCO) and the Apache Software License, Version 2.

Apache Software License (ASL) FAQ

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].