Package: innov8
innov8finance: interactive market dashboardinnov8financeis a versatile market dashboard designed to meet the needs of traders, offering an innovative alternative to Tradingview, with a plethora of aesthetically pleasing themes to choose from. It provides users with the convenience of accessing the platform online or hosting it locally on their machine. This allows traders to have uninterrupted access to historical tick data even when the grid is down, ensuring they can backtest their trading strategies anytime, anywhere. Experience the power of innov8finance for reliable and efficient trading analysis.LEGAL DISCLAIMERThis project is intended for research and educational purposes only.Main FeaturesFull List of S&P 500 Component Stocks:Access data for stocks from some of the largest companies in the United States.Economic Sector Filtering:Easily filter stocks by economic sector.Trending Stocks:Stay updated with the most active and volatile stocks.Daily Candlestick Price Charts:Access daily candlestick price charts for stocks.Stock Information:Obtain comprehensive stock information, including the symbol, company name, current price and change, the stock's exchange, and sector.Intra-sector Data:Explore data such as the 90-day correlation and prices among stocks within the same sector.52-Week Charts:View weekly closing prices, the high/low range, and changes for the past 52 weeks.Cross-Platform Functionality:Enjoy a seamless experience across different platforms.Online and Offline Accessibility:Access the application both online and offline.Aesthetic Themes:Choose from 6 dark and 9 light aesthetically pleasing themes.Usage and InstallationThe online version of the tool can be accessed athttp://innov8finance.pythonanywhere.comor its backup athttps://innov8.onrender.com(note that the web server on the backup link may take a few minutes to load since it automatically spins down after 15 minutes of inactivity and needs to be reawakened).It is highly recommended to install a local version for optimal performance and faster rendering.innov8financerequires Python to run. The latest version can be downloaded and installed fromhttps://www.python.org. The package is available onPyPIand can be easily installed using pip:pipinstallinnov8Once the installation is complete, you can run the tool from your terminal with a simple command:innov8The app is designed to be platform-agnostic, supporting Windows, Linux, and macOS operating systems.Developmentinnov8financeutilizes Dash and Plotly for the front end, and Pandas and SQLite for the back end. Data is acquired from Yahoo! Finance's API and stored in an SQLite database. Necessary data is then queried and loaded into a Pandas DataFrame for further manipulation. Interactive charts are generated using Plotly and seamlessly integrated into the Dash app's layout, alongside other components, resulting in a smooth dashboard experience.The choice of database (SQLite) was mainly influenced by hosting platform limitations. Ideally, a timeseries database such as TimeScaleDB (employing a hypertable to store tick data and utilizing a time_bucket for interval aggregation) or a fast column-oriented DBMS such as ClickHouse would have been preferred. Furthermore, if storage space limitations were not a concern, implementing a materialized view paired with a trigger for concurrent refreshment could significantly enhance performance.Considering contextual factors encompassing application requirements, development constraints, project goals, and other pertinent aspects, the database is structured in a normalized manner to handle data anomalies and the following schema has been decided on:Primary keys and attributes with unique constraints are automatically indexed and remain unaltered. On the other hand, indexes on foreign keys are not generated automatically, so, to speed up querying, a composite index is created on the foreign keys of thetickertable.Order of composite indexes:tickertable -sector_id->exchange_id->currency_id->ticker_type_idpricetable (composite primary key) -ticker_id->date_idTheDataStoreclass in thedb_opsmodule is responsible for handling data-related operations. This includes managing and updating the database, as well as loading the main DataFrame used by the Dash components. The Dashappis initialized within theappmodule. Additionally, two convenience decorators are created in thedecoratorsmodule within thecomponentsfolder. These decorators facilitate passing data and registering callbacks. Components and their respective callbacks are grouped and stored in separate modules within thecomponentsfolder. All these components are then consolidated into the final app layout, located in the root directory of the package, specifically within thelayoutmodule. Finally, the app is imported from thelayoutmodule into therunmodule, which serves as the entry point for running the app. For deployment, aservervariable is also created within therunmodule to be used withgunicorn.Below is a helpful static call graph designed to assist in familiarizing oneself with and understanding the codebase. It illustrates the calling relationships between subroutines within the program, providing an interprocedural view of the code.The following diagram presents a simplified call graph:Note that callbacks are not depicted in the call graphs since they are not explicitly called in the code, but are implicitly triggered and executed by the Dashappwhen theInputto a callback function changes. When a user interacts with a Dash component, it triggers the associated callback function to run. Dash captures the input values from the components and provides them as arguments to the callback function. The callback function then performs the necessary computations or updates based on the input values and returns the updated output values.The following Dash callback graph displays a visual representation of the callbacks: which order they are fired in, how long they take, and what data is passed back and forth.Note: Early development of the MVP can be viewed in the Jupyter Notebooks located within thearchivefolder.RoadmapMove Indicators: Consolidate indicators, along with settings and a color picker, into a single drop-up element.Add Additional Indicators: Incorporate VWAP, RSI, MACD, Parabolic SAR, ATR, and other indicators.Database Migration: Transition from SQLite to TimeScaleDB or ClickHouse for improved data management.Switch Data Manipulation Library: Replace Pandas with Polars to enhance efficiency for data manipulation tasks.Multiple Timeframes: Introduce support for multiple timeframes and include an interval selection button group.Code Optimization: Optimize the code by implementing client-side callbacks using JavaScript where appropriate.Enhanced User Interface: Implement dbc.Progress to transform the update button behavior (replace loading).Visual Improvements: Enrich sector and symbol dropdowns by adding components as option labels, including scraped and added SVGs.Filter & Search Enhancement: add truncated ticker names as greyed-out hints, as well as custom search terms for the symbol dropdown.Machine Learning Integration: Train an LSTM model for predicting OHLC (Open, High, Low, Close) data.Advanced Analytics & Explainable AI Page: Develop a second page featuring additional analytical tools for enhanced insights, such as SHAP, PDP, and other tools to increase transparency and interpretability of the ML model.LicenseBSD 3-Clause LicenseCopyright (c) 2023, mayushii21ContactTelegram:@mayushii21Email:the.real.mayushii21@gmail.com