Skip to content

A Python-based automation project that automatically analyses, scores and visualises the financial data of Borsa Istanbul (BIST) stocks.

License

Notifications You must be signed in to change notification settings

fkucuker/borsa_bilge

Repository files navigation

Borsa Bilge Analysis Automation Project - Readme.md

# 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
  1. 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=...
    
  2. Setup the Database Initialize the database by running:

    python db_setup.py

Usage

  1. Fetch and Save Data Fetch financial data from the API and save it to the database:

    python main.py
  2. Portfolio Optimization Create an optimal portfolio:

    python portfolio.py
  3. Graphical Analysis Visualize stock analysis:

    python grafik_cizdir.py

File Descriptions

  • 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.

Future Development Goals

  1. Diversified Target Price Methods: Implementing additional target price models and analysis techniques.
  2. Database Optimization: Enhancing query and storage structures for faster data processing.
  3. User-Friendly API Structure: Developing an API service for easier integration and data access.
  4. Integration of Macro Financial Data: Incorporating global economic indicators (interest rates, inflation, etc.) into analyses.
  5. Graphical User Interface (GUI): Creating a GUI to make analysis results easier to understand for users.
  6. Artificial Intelligence and Prediction Algorithms: Adding machine learning algorithms to predict future stock performance.

Developer

Fatih KÜÇÜKER


License

This project is licensed under the MIT License. See the LICENSE file for more details.


Contact

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! 😊

About

A Python-based automation project that automatically analyses, scores and visualises the financial data of Borsa Istanbul (BIST) stocks.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published