{"id":26245966,"url":"https://github.com/carvetighter/sp500","last_synced_at":"2026-02-28T12:02:32.509Z","repository":{"id":282160218,"uuid":"97181215","full_name":"carvetighter/SP500","owner":"carvetighter","description":"Uses simple moving averages to predict when to enter and leave the market using the SP500.","archived":false,"fork":false,"pushed_at":"2025-03-13T04:30:18.000Z","size":5127,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-23T20:31:38.871Z","etag":null,"topics":["finance","financial-analysis","financial-markets","python","python-3","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/carvetighter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2017-07-14T01:50:37.000Z","updated_at":"2021-01-26T09:48:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"5c9e00f9-0de7-49a3-a5c9-94d430b06dc9","html_url":"https://github.com/carvetighter/SP500","commit_stats":null,"previous_names":["carvetighter/sp500"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/carvetighter/SP500","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carvetighter%2FSP500","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carvetighter%2FSP500/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carvetighter%2FSP500/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carvetighter%2FSP500/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/carvetighter","download_url":"https://codeload.github.com/carvetighter/SP500/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carvetighter%2FSP500/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29933021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T09:58:13.507Z","status":"ssl_error","status_checked_at":"2026-02-28T09:57:57.047Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["finance","financial-analysis","financial-markets","python","python-3","python3"],"created_at":"2025-03-13T13:16:55.647Z","updated_at":"2026-02-28T12:02:32.503Z","avatar_url":"https://github.com/carvetighter.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SP500 Moving Average (SMA) Analysis\n\nThis analysis pulls data for the SP500 (since inception) and conducts a moving average analysis to indicate when to get in and out of the market.  The goal of this analysis is to \"get out of the way\" of the long downward trends and stay in as long as the market is going up.\n\n# Requirements\n- SQL Server Database locally (install prior to running script)\n- internet connection (to get the SP500)\n- Anaconda Python distribuiton\n- you will have to modify the code access the SQL Server database and tables; this can be done in the base class\n\n# Running the python script\n1. download / pull the repo\n2. create sp_500_init.py file\n3. create the environment from the environment file\n4. activate the environment\n5. run the script\n\n## Create the Environment\n```conda env create -f env_sp500.yml```\n\n## Activate Environment\nWindows -\u003e ```activate sp_500```\\\nLinux -\u003e ```conda activate sP_500```\n\n## Run Script\n```python sp_500_init.py```\n\n## Example sp_500_init.py file\nBelow is an example of the init file you will need to create.  This file will define the user name and password for the SQL Server locally.  Replace ```\u003csql_server_user_name\u003e``` and ```\u003cpassword\u003e``` with the user name and password for the SQL Server.\n\n```\n'''\nThis is the initial file which is not tracked in git.\nCalls the main method in sp_500_main.py\n'''\n\nfrom sp_500_class import main_class\n\nif __name__ == '__main__':\n    list_sql_up = [r'\u003csql_server_user_name\u003e', r'\u003cpassword\u003e']\n    main_class(list_sql_up)\n```\n\n## Example Image\n\u003cimg src='visualizations/sp500_visualization_2019-07-29 20_27_14.png'\u003e\n\n## Performance\nstart date -\u003e 01 January 1995\\\nend date -\u003e 26 July 2019\\\nstart amount -\u003e $3,000\\\nend date status -\u003e In the Market\\\nbuy and hold result -\u003e $19,772\\\nthis method results -\u003e $24,028","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarvetighter%2Fsp500","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarvetighter%2Fsp500","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarvetighter%2Fsp500/lists"}