https://github.com/lizardcat/stocksasa
Stocksasa is a Python stock trend prediction system powered by AI
https://github.com/lizardcat/stocksasa
Last synced: 11 months ago
JSON representation
Stocksasa is a Python stock trend prediction system powered by AI
- Host: GitHub
- URL: https://github.com/lizardcat/stocksasa
- Owner: lizardcat
- Created: 2024-07-31T00:51:52.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-04T00:21:06.000Z (about 1 year ago)
- Last Synced: 2025-04-04T00:26:19.627Z (about 1 year ago)
- Language: Python
- Homepage:
- Size: 147 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Stocksasa - A Simple AI Market Trend Prediction App
**Stocksasa** is a stock trend prediction system powered by AI. It uses historical market data, technical indicators, and macroeconomic event analysis (like tariffs and interest rate changes) to predict whether a stock or index is likely to go up or down the next day.
Built with:
- Python
- Streamlit for interactive UI
- Random Forest Classifier for AI predictions
- yFinance for market data
- NewsAPI for real-time economic events (optional)
## Features
- Predicts up/down movement for any stock or index (only 12 are implemented currently but more can be added)
- Visualizes recent trends and AI predictions
- Learns from technical indicators + global event flags
- Export historical data as CSV
- Automatically update macroeconomic events with `update_events.py`
## Live Demo
You can see a live demo of the app on Streamlit here: https://stocksasa.streamlit.app/
## Screenshots
### 1. Current Market Outlook

### 2. AI Market Prediction for S&P500

## Installation
Clone the repo and install requirements:
```bash
git clone https://github.com/lizardcat/stocksasa.git
cd stocksasa
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# Install packages
pip install -r requirements.txt
```
## API Key Setup (for NewsAPI)
To use live news updates, you’ll need a free API key from [NewsAPI.org](https://newsapi.org/).
- Create a file named .env in the root of your project.
- Inside that file, add your own NewsAPI key like this:
```
NEWSAPI_KEY=your_actual_api_key_here
```
Replace `your_newsapi_key_here` with your personal API key from https://newsapi.org.
This file is ignored by Git and will stay private.
## How to Use
### 1. Train the model:
```bash
python main.py
```
### 2. Run the Streamlit app:
```bash
streamlit run app.py
```
### 3. Update events from live news:
```bash
python update_events.py
```