Skip to content

AlgoETS/AINewsTracker

Repository files navigation

AINewsTracker

AINewsTracker

License MIT FastAPI MongoDB Python Docker NumPy Pandas Jupyter Notebook
Coverage

What is AINewsTracker?

AINewsTracker is a sophisticated web application that backtests the influence of financial news on the stock market. It utilizes artificial intelligence to categorize, filter, and analyze financial news from a variety of trustworthy international and regional sources. This allows users to monitor and predict potential impacts on market trends.

Features

  • Real-time tracking of financial news: Get up-to-date news articles from over 60 sources.
  • AI-based analysis: Leverage artificial intelligence for sentiment analysis, topic prediction, and tickers allocation.
  • Backtesting capabilities: Explore the influence of past news on market behavior and verify your predictive models.
  • Versatile data sources: Gain insights from a wide range of international and regional news providers.

News Sources

AINewsTracker aggregates financial news from multiple trusted sources globally and regionally. Below is a list of these sources:

How to use

  1. Setup and activate the Python environment of your choice.
cp .env.example .env
  1. Run the following command to install the required dependencies:
pip install poetry
poetry shell
poetry install
  1. Test the application by running the following command:
poetry run pytest
  1. Run the following command to launch FastAPI in development mode:
poetry run uvicorn app.main:app --reload
  1. Dockerize the application by running the following command:
docker-compose up --build

Documentation

The documentation of the API is available at the following URL: http://localhost:8000/api/v1/docs

File Structure

# AINewsTracker.svg & AINewsTracker_transparent.svg: Logo or graphic resources
# app: Main application code directory
# ├── config.py: File that contains the configuration settings of the application
# ├── core: Directory that includes essential parts of the application
# ├── ├── database: Includes scripts for managing database connections
# ├── ├── ├── db.py: Main database module containing connection settings, queries, etc.
# ├── ├── logging.py: File that sets up the logging for the application
# ├── ├── repo: Directory that contains scripts for database operations
# ├── ├── services: Contains service functions for different operations
# ├── ├── telemetry: Directory containing scripts for system logging and monitoring
# ├── main.py: Entry point of the application
# ├── models: Directory containing the data models used by the application
# ├── routers: Directory containing FastAPI routers (request handling logic)
# ├── static: Contains static files (images, CSS, JavaScript, etc.)
# ├── __version__.py: File that contains the version number of the application
# CODE_OF_CONDUCT.md: Markdown file outlining the code of conduct for the project
# CONTRIBUTING.md: Markdown file outlining the guidelines for contributing to the project
# deploy: Directory for deployment-related files and scripts
# ├── docker-compose.yml: Docker Compose file for setting up the production environment
# ├── README.md: Markdown file with instructions for deploying the application
# docker-compose.yml: Docker Compose file for setting up the development environment
# Dockerfile: Contains instructions for Docker to build an image for the application
# LICENSE: The license of the project
# monitoring: Contains configuration files for monitoring tools
# poetry.lock & pyproject.toml: Configuration files for Python project and dependency management (Poetry)
# README.md: General project documentation and overview
# renovate.json: Configuration file for Renovate (automates dependency updates)
# requirements-dev.txt & requirements.txt: Python dependencies for development and production environments
# SECURITY.md: Markdown file outlining the security policy of the project
# Test-AI.ipynb: A Jupyter notebook file for testing AI functionalities
# tests: Directory for test modules
# wiki: Directory for additional project documentation or guides

TODO

  • Add a new endpoint to get the news from a specific company
  • Implement caching to improve performance for frequently accessed data
  • Add user authentication and role-based access control for secure endpoints
  • Implement unit and integration testing to ensure the stability of the application
  • Add pagination to news feed endpoints to limit the amount of data returned
  • Improve error handling and send descriptive error messages
  • Implement a logging system to keep track of user activity and system status
  • Enhance the database schema to include additional relevant fields for the articles
  • Add an endpoint for users to subscribe to specific companies or news tags
  • Implement a system for sending daily/weekly email updates for subscribed users
  • Add multi-language support for international users
  • Create a mechanism to rate-limit requests to protect the API from abuse
  • Optimize database queries to improve performance
  • Implement a backup system for the database
  • Write detailed API documentation for end-users and developers
  • Refactor and clean up the codebase for better maintainability
  • Implement real-time updates using WebSockets
  • Add analytics features for tracking user behavior and system performance
  • Deployment and server provisioning process
  • Plan and implement a regular backup strategy
  • Set up a monitoring system for server resources (CPU, memory, disk space, etc.).
  • Set up a Continuous Integration (CI) and Continuous Deployment (CD) pipeline.