How sidhumanbirsingh/stock_market works
Main Components
• External Data Sources: Represent Yahoo Finance and Quandl, which are the primary external APIs for obtaining stock prices, dividend records, and interest rate data.
• Data Collection Layer: A component (or set of components) responsible for fetching data. According to the README, this is done through scripts – likely what “main.py” (or Gen8.py) represents.
• Ticker Configuration: A module or file (Ticker/ticker.csv) that provides the list of stock tickers being analyzed.
• Data Storage/Output Layer: Represented by the Data directory with subdirectories (Prices, Dividends, Others). This layer stores raw and processed data (CSV outputs).
• Data Processing/Standardization Layer: A component (implemented by standardize.py or Stan1.py as mentioned in the usage instructions) that normalizes the raw financial figures and computes comparative metrics.
• Data Visualization (Optional): Represented by Visuals-1.py—likely responsible for interpreting, graphing, or otherwise visualizing the consolidated or standardized outputs.
• Reporting/Analysis: The final output or analysis might be stored as files (for example, the Excel workbook “financial_analysis.xlsx”) which serve as a summary report.
Relationships and Interactions
• The Ticker component feeds into the Data Collection layer. The collection script reads ticker symbols from Ticker/ticker.csv.
• The Data Collection Layer reaches out to two external services (Yahoo Finance and Quandl) and retrieves raw data.
• Retrieved data is then stored in the respective subdirectories under the Data folder (Prices for stock price data, Dividends for payment information, and Others for additional financial metrics).
• The Standardization Component picks up the raw CSV data from the Data directory, processes it to normalize units and calculate standardized financial ratios, and outputs new files (e.g., all_others_standardized.csv).
• If present, the Visualization component (Visuals-1.py) will consume either raw or standardized data to generate visual representations of the analysis results.
• The final analysis might be compiled into an Excel workbook (financial_analysis.xlsx) to provide a summary report.
Architectural Patterns & Design Principles
• Separation of Concerns: Different scripts (for collection, processing/standardization, and visualization) separate the tool’s responsibilities.
• Modular Design: Each module (data collection, processing, visualization) can be developed, tested, and maintained independently.
• Data Flow: Emphasize a unidirectional data flow – from data sources → collection → storage → processing → visualization/reporting.
Technologies and Frameworks
• Python 3.6+ is used, with packages like yfinance, pandas, numpy, and quandl.
• External APIs (Yahoo Finance and Quandl) are critical to the data collection aspect.
• Potential libraries for visualization (if used in Visuals-1.py) could include matplotlib or seaborn.
Final Touches
• Every component is labeled clearly and the data flow is unambiguous.
• Integration points (e.g., how the script interfaces with the external APIs) and any important dependencies (API keys for Quandl, for example).