Skip to content

hbinmadi/itsJohanLiebert

Repository files navigation

BankNifty Significant Days Visualization

This project is a Dash application designed to visualize significant trading days for the BankNifty index. It displays candlestick charts along with associated indicators such as the AD Line, EMA, and weighted volume. The application is interactive, allowing users to navigate through significant days using a slider or buttons.

Features

  • Candlestick Charts: Visual representation of price movements (open, high, low, close) for BankNifty.
  • AD Line and EMA Indicators: Plots the AD Line (Weighted) and its 9-period EMA.
  • Volume Analysis: Displays weighted volume with color coding to differentiate between bullish and bearish candles.
  • Interactive Slider: Allows users to select and view significant days where large price movements occurred.
  • Day Navigation: Previous and Next buttons facilitate easy navigation between significant days.

Prerequisites

Before you can run the application, ensure you have the following installed:

  • Python 3.7+
  • Dash
  • Plotly
  • Pandas
  • SQLite3
  • psutil

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/banknifty-visualization.git
    cd banknifty-visualization
  2. Install the required Python packages:

    pip install dash plotly pandas psutil
  3. Set up your SQLite database:

    Ensure that you have the SQLite database (IntradayGGData.db) containing the BankNifty data. If you need to populate it, you can use the GetDataForGGBackTest module or any other method to fetch and store data in the banknifty table.

Usage

  1. Run the Dash application:

    python app.py
  2. Access the app:

    Once the server is running, open your browser and go to http://127.0.0.1:8051 to interact with the visualization.

File Structure

  • app.py: The main script that initializes and runs the Dash application.
  • GetDataForGGBackTest.py: A module to prepare the data for visualization.
  • IntradayGGData.db: SQLite database file containing the BankNifty data (not included in the repo).
  • significant_days.csv: CSV file generated by the app, storing significant days identified by the application.

How It Works

  1. Data Loading and Processing:

    • The app loads data from the SQLite database and filters for significant days where the BankNifty index showed a one-sided move of 350 points or more.
    • It identifies the previous and next trading days for each significant day.
  2. Interactive Visualization:

    • Users can select a day using the slider, which triggers a callback to update the candlestick chart along with the AD Line, EMA, and volume plots for the selected period.
    • Vertical lines are added at the end of each day (EOD) for clarity.
  3. Performance Monitoring:

    • The app includes memory usage monitoring to optimize performance and prevent memory leaks.

Troubleshooting

  • App Becomes Unresponsive: Ensure your system has sufficient memory to handle large datasets. Check the efficiency of your callbacks and consider optimizing database queries or reducing the amount of data processed.
  • Rangebreaks Issue: If you encounter issues with rangebreaks, consider updating your Plotly and Dash packages or commenting out the rangebreaks settings.

Contributions

Feel free to fork this repository and contribute by submitting a pull request. For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • The Dash and Plotly community for providing a powerful visualization framework.
  • The original creators of the data and indicators used in this application.

About

Data analysis for banknifty with big moves

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages