{"id":24221543,"url":"https://github.com/michdo93/stock-prediction","last_synced_at":"2026-05-09T11:53:26.416Z","repository":{"id":232569996,"uuid":"784658738","full_name":"Michdo93/stock-prediction","owner":"Michdo93","description":"A simple Python programme that tries to make predictions about stocks.","archived":false,"fork":false,"pushed_at":"2024-04-10T10:04:48.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-14T06:19:28.112Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Michdo93.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}},"created_at":"2024-04-10T09:41:15.000Z","updated_at":"2024-04-10T09:54:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"0be5ec4e-4b45-43e5-b897-bfdc8c0047d9","html_url":"https://github.com/Michdo93/stock-prediction","commit_stats":null,"previous_names":["michdo93/stock-prediction"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Michdo93%2Fstock-prediction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Michdo93%2Fstock-prediction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Michdo93%2Fstock-prediction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Michdo93%2Fstock-prediction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Michdo93","download_url":"https://codeload.github.com/Michdo93/stock-prediction/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241763748,"owners_count":20016162,"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":[],"created_at":"2025-01-14T06:19:11.751Z","updated_at":"2026-05-09T11:53:26.384Z","avatar_url":"https://github.com/Michdo93.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stock-prediction\nA simple Python programme that tries to make predictions about stocks.\n\n## Pre-Installation\n\nTo make the programme run you have to install following packages via `pip`:\n\n```\npip install pandas\npip install numpy\npip install scikit-learn\n```\n\n## Usage\n\nYou need a CSV file for each stock, which can look like this:\n\n```\nDate        Open      High      Low       Close\n2024-04-01  100.00    105.00    99.50     104.20\n2024-04-02  104.50    106.80    103.70    105.50\n2024-04-03  105.70    107.20    104.80    106.00\n...         ...       ...       ...       ...\n```\n\nThe CSV file could contain data on historical share prices. Typically, this data would be in the form of a table with various columns.\n\nThe columns could be interpreted as follows:\n- `Date`: The date on which the price was recorded.\n- `Open`: The price at the beginning of the trading day.\n- `High`: The highest price during the trading day.\n- `Low`: The lowest price during the trading day.\n- `Close`: The price at the end of the trading day.\n\n`new_data` represents the price data for a new example for which a prediction is to be made. It should have the same structure as the historical data, i.e. an array with values for open, high, low and close. Here is a fictitious example of new_data:\n\n```\nnew_data = np.array([[110.00, 112.50, 109.80, 111.20]])\n```\n\nThis would mean that the price for the new example opened at 110.00, reached a high of 112.50, reached a low of 109.80 and closed at 111.20 at the close of trading.\n\nAt least your code can look like this:\n\n```\nfrom strock_predictor import StockPredictor\n\nif __name__ == \"__main__\":\n    vw_predictor = StockPredictor(\"vw.csv\")\n    daimler_trucks_predictor = StockPredictor(\"daimler_trucks.csv\")\n\n    # Vorhersage für VW\n    new_data_vw = np.array([[110.00, 112.50, 109.80, 111.20]])\n    vw_predictor.make_prediction(new_data_vw, \"VW\")\n\n    # Vorhersage für Daimler Trucks\n    new_data_daimler = np.array([[50.00, 52.00, 49.50, 51.20]])\n    daimler_trucks_predictor.make_prediction(new_data_daimler, \"Daimler Trucks\")\n```\n\nThe share prices are now also fictitious again. I have not checked the exact prices for this example. However, these are realistic values based on a rough estimate.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichdo93%2Fstock-prediction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichdo93%2Fstock-prediction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichdo93%2Fstock-prediction/lists"}