{"id":20452959,"url":"https://github.com/mike-remo/stock-analysis","last_synced_at":"2025-06-23T04:35:01.273Z","repository":{"id":231190541,"uuid":"735374077","full_name":"mike-remo/stock-analysis","owner":"mike-remo","description":"Simple Stock Technical Analysis","archived":false,"fork":false,"pushed_at":"2024-06-16T00:06:28.000Z","size":5381,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T09:48:37.715Z","etag":null,"topics":["macd","python3","rsi","sql","sqlite3","stock-analysis","stock-market","technical-indicators"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mike-remo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-24T17:21:29.000Z","updated_at":"2024-06-16T00:06:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"1971d2b8-b255-4df6-997e-fc6ce7d22944","html_url":"https://github.com/mike-remo/stock-analysis","commit_stats":null,"previous_names":["mike-remo/stock-analysis"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mike-remo/stock-analysis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mike-remo%2Fstock-analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mike-remo%2Fstock-analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mike-remo%2Fstock-analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mike-remo%2Fstock-analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mike-remo","download_url":"https://codeload.github.com/mike-remo/stock-analysis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mike-remo%2Fstock-analysis/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261415975,"owners_count":23155030,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["macd","python3","rsi","sql","sqlite3","stock-analysis","stock-market","technical-indicators"],"created_at":"2024-11-15T11:10:59.272Z","updated_at":"2025-06-23T04:34:56.262Z","avatar_url":"https://github.com/mike-remo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stock Market Technical Analysis with Python and SQL\n\nIndicators | Graphs\n--- | ---\n![Example charts](https://github.com/mike-remo/stock-analysis/blob/main/samples/charts-example1.png) | ![Example charts](https://github.com/mike-remo/stock-analysis/blob/main/samples/charts-example2.png)\n\n## Introduction\nThis project is a simple look at performing \"_technical analysis_\" on stock market time series data using Python 3 and SQLite.\n\n### Goals\n1. Acquire data from external data source\n2. Integrate and organize the data into owned database\n3. Perform data analysis to derive technical indicators\n4. (Bonus) Generate data visualizations to aid in understanding data\n\nTo accomplish this, we will retrieve time series (and other stock market data such as earnings reports) from external sources. Since external data sources may not be 100% reliable, we will make use of two different sources: Twelve Data https://twelvedata.com/ and AlphaVantage https://www.alphavantage.co/\n\nData will be retrieved with API calls made with the \"requests\" Python library, and then loaded into a SQLite database. The SQLite module is part of the standard library for Python 3, and provides \"...a small, fast, self-contained, high-reliability, full-featured, SQL database engine.\" https://www.sqlite.org/index.html\n\nAfter data is loaded into the SQLite DB, SQL queries can be used to calculate for a variety of \"_technical indicators_\" such as the Relative Strength Index (RSI), Moving Average Convergence/Divergence indicator (MACD), and other metrics such as the Price/Earnings Ratio and Earnings Yield. This information may then be used to _attempt_ to predict future price changes and assist in making trading decisions.\n\nAdditionally, the use of the \"plotly\" python library allows us to create financial charts, which assists in analysis of data by providing a visual component.\n\n## Requirements\nThis project requires a Python 3 environment plus the following packages:\n1. requests (for API calls) https://pypi.org/project/requests/\n2. pandas (nicer looking table output) https://pypi.org/project/pandas/\n3. plotly (graphing data) https://plotly.com/python/\n\nBoth can be conveniently installed via PIP\n1. `pip install requests`\n2. `pip install pandas`\n3. `pip install plotly==5.21.0`\n\nAdditionally, to retrieve new data, you will need to get your own free API keys from Twelve Data https://twelvedata.com/ and AlphaVantage https://www.alphavantage.co/ and put them into the appropriate locations in the _keys.json_ file.\n(If you want to skip this part, you can use the provided sample database pre-loaded with data located in /samples/data1.sqlite)\n\n## Usage\n1. Download the _src_ *.py files into the same local directory.\n2. Sign up for your free API keys from TwelveData and optionally, AlphaVantage, if you want to get earnings data which is used to calculate PEratio and Earnings Yield.\n3. Add your API keys to _keys.json_ in the same dir. If you don't have the _keys.json_ file, the script will create it and prompt you for your API keys.\n4. Add some stock symbols into _stocklist.txt_ (one per line, following the format: symbol,exchange  Ex.: NVDA,NASDAQ)\n5. Run `GetData.py` to load data into the DB. (A new SQLite DB file named _data1.sqlite_ will be created if it doesn't already exist.)\n6. Follow the prompts. Answer Y to download new time series data based on the stocks listed in the _stocklist.txt_ file. Optionally, answer Y when prompted to download earnings data used for some calculations.\n7. Run `Demo.py` to view results from a variety of saved queries. By default, results will output to the terminal, and any option with visualizations enabled will automatically create and display the graphics in your default browser. Optionally, results may be output into Excel or whichever default app your system uses to view .CSV files by changing the external editor option ('X' at the menu). These files will be placed in your `%TEMP%` dir. You can also turn off the visualization option ('V' from the manu).\n\n### Optionally\n* You may use the provided _/samples/data1.sqlite_ SQLite DB file that already has some sample data loaded into it. If so, you may skip steps 2-6. Make sure the file is in the same dir as the .py files.\n* You may use the provided _/samples/stocklist.txt_ file which already contains some stock symbols. If so, you may skip step 4. Make sure the file is in the same dir as the .py files.\n\n## More Info\n### Limitations\nThis project currently has the following limitations:\n1. Only checks for stocks listed on the NASDAQ and NYSE. This can be updated in the future.\n2. The 'free' API access from Twelve Data and AlphaVantage both have varying API request limits. For the exact rate and daily API limits, please visit the respective website.\n\n### Additional Documentation\n[Metadata/Data Dictionary](https://github.com/mike-remo/stock-analysis/blob/main/docs/data-dictionary.md)\n\n### Disclaimer\nThis project is intended only for informational purposes only and is not intended to give financial advice.\n\n### LICENSE\nGNU General Public License v3.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmike-remo%2Fstock-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmike-remo%2Fstock-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmike-remo%2Fstock-analysis/lists"}