# Borsa Analysis Automation Project
## Project Description
The Borsa Analysis Automation Project is a comprehensive Python application that automatically fetches, analyzes, scores, and visualizes financial data for stocks listed on Borsa Istanbul (BIST). This project integrates with a PostgreSQL database and Flask web framework, aiming to assist in making informed investment decisions.
---
## Features
- **Data Fetching:** Automatically fetches stock and balance sheet data via the Finnet API.
- **Database Management:** Securely stores and optimizes data using PostgreSQL.
- **Scoring System:** Scores stock financial performance based on 5-period data.
- **Portfolio Optimization:** Creates optimal portfolios using the PyPortfolioOpt library.
- **Graham Valuation:** Conducts Graham valuation for stock price analysis.
- **Percentage Return Analysis:** Calculates percentage gain or loss over specific periods.
- **Graphical Analysis:** Visualizes stock analysis with dynamic graphs using Plotly.
- **Database Cleanup:** Automatically removes redundant and duplicate data for optimization.
---
## Installation
1. **Install Required Libraries**
```bash
pip install -r requirements.txt
-
Create a
.env
File Create a.env
file with the following structure:DB_NAME=... DB_USER=... DB_PASSWORD=... DB_HOST=... DB_PORT=... KULLANICI_ADI=... SIFRE=...
-
Setup the Database Initialize the database by running:
python db_setup.py
-
Fetch and Save Data Fetch financial data from the API and save it to the database:
python main.py
-
Portfolio Optimization Create an optimal portfolio:
python portfolio.py
-
Graphical Analysis Visualize stock analysis:
python grafik_cizdir.py
main.py
: The main program file for data fetching, analysis, and reporting.fetching.py
: Handles API requests for stock and balance sheet data.data_pipeline.py
: Manages data processing workflows, including cleaning and saving.puanla.py
: Contains algorithms for scoring stocks and analyzing financial performance.grafik_cizdir.py
: Generates dynamic graphs using Plotly.portfolio.py
: Performs portfolio optimization operations.db_save.py
: Handles saving and updating data in the database.db_get.py
: Fetches data from the database.db_cleaner.py
: Cleans and optimizes the database by removing redundant entries.load.py
: Processes and loads data for analysis.
- Diversified Target Price Methods: Implementing additional target price models and analysis techniques.
- Database Optimization: Enhancing query and storage structures for faster data processing.
- User-Friendly API Structure: Developing an API service for easier integration and data access.
- Integration of Macro Financial Data: Incorporating global economic indicators (interest rates, inflation, etc.) into analyses.
- Graphical User Interface (GUI): Creating a GUI to make analysis results easier to understand for users.
- Artificial Intelligence and Prediction Algorithms: Adding machine learning algorithms to predict future stock performance.
Fatih KÜÇÜKER
This project is licensed under the MIT License. See the LICENSE
file for more details.
For more information, visit the Borsa Bilge GitHub page.
This English version of the README provides a detailed overview of your project, including features, installation steps, usage instructions, file descriptions, and future goals. Let me know if there’s anything else you'd like to add or modify! 😊