stop: Stop the running server
rm: Remove all unused containers
rm-all: Stop and remove all containers
rmi: Remove stockstalker images without removing base images. Useful for speeding up build time when switching from one start script to another such as make start to make test
rmi-all: Remove all images
purge: Use with caution Completely purge Docker containers, networks, images, volumes, and cache
lint: Run flake8
build: Build development server without running the server
start: Start development server at port 8080
reload: Stop development server and restart the server at port 8080
hard-reload: Stop container, remove container, rebuild container, and start development server
debug: Start development server in debug mode
test: Start test server
test-security: Test security vulnerabilities (must have snyk installed globally)
test-image-security: Test security vulnerabilities for base images (must have snyk installed globally)
reload-test: Reload test server
hard-reload-test: Remove container, rebuild container, and start test server
Clone the repo
git clone git@github.com:Stock-Stalker/predictor.gitcd into the directory
cd predictorRename .env.sample to .env
mv .env.sample .envEdit the .env file to contain your environment variables
vim .envRun the application!
make startTo stop the app press CNTRL + C. Then run:
make stopBase URL:
https://stockstalker.tk/predictor/GET https://stockstalker.tk/predictor/:symbolIn order to make a request to predictor, you must specify which company's stock you'd like to predict.
You can pass through the stock's ticker symbol (i.e: AAPL for Apple, or AMZN for Amazon).
The predictor will scrape headlines for the day, and make predictions based on the headlines. It will then return a list of integers denoting its predictions
The predictor will, behind the scenes, scrape and cache top daily headlines for the company that you specify. It will return a list of predictions:
{
"predictions": [0, 1, 1, 1]
}Types:
-
predictions: Array/list of integers
- integer options:
- 0 -> stock is predicted to decrease (negative)
- 1 -> stock is predicted to increase (positive)
- 2 -> stock is predicted to hold (neutral)
- integer options:
In the event that there is no news on a given day for the company you provide (for example, if today no one has published any articles containing keywords about "Apple" or "AAPL"), the predictor will always return 2. This corresponds to a neutral prediction. The reasoning for this is that if we do not have data on a given day, we are unable to make a confident prediction as to the behavior of the stock.
GET https://stockstalker.tk/predictor/AAPLTo run tests simple run:
make testIf any of the tests fail or if the tests do not have at least 90% coverage the command will exit with a status code of 1.
