{"id":23706980,"url":"https://github.com/oaerobert/python-for-finance","last_synced_at":"2026-04-09T08:42:02.592Z","repository":{"id":268295565,"uuid":"901563346","full_name":"oaerobert/Python-for-Finance","owner":"oaerobert","description":"Implementations of financial mathematics and statistics using the \"Python for Finance\" textbook. Includes Monte Carlo simulations, predictive stock prices using ML strategies and real world data visualisations.","archived":false,"fork":false,"pushed_at":"2025-02-13T11:08:36.000Z","size":2991,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T12:25:45.401Z","etag":null,"topics":["matplotlib","numpy","pandas","python"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/oaerobert.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-12-10T22:27:18.000Z","updated_at":"2025-02-13T11:08:40.000Z","dependencies_parsed_at":"2024-12-20T15:44:32.227Z","dependency_job_id":"9aece219-9695-4cda-8eb5-76496ae1848d","html_url":"https://github.com/oaerobert/Python-for-Finance","commit_stats":null,"previous_names":["oaerobert/quant-finance-option-pricing","oaerobert/python-for-finance"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oaerobert%2FPython-for-Finance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oaerobert%2FPython-for-Finance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oaerobert%2FPython-for-Finance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oaerobert%2FPython-for-Finance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oaerobert","download_url":"https://codeload.github.com/oaerobert/Python-for-Finance/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239786251,"owners_count":19696772,"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":["matplotlib","numpy","pandas","python"],"created_at":"2024-12-30T16:01:52.697Z","updated_at":"2026-02-03T04:30:20.752Z","avatar_url":"https://github.com/oaerobert.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 🐍 for Finance \nHey! 👋🏾 \n\nMy name is Oke and I'm currently a second year Mathematical Economics \u0026 Statistics student at the University of Birmingham.\n- I bought the textbook \"Python for Finance\" which currently is enabling me to refine my technical proficiencies in Python and its libraries (**NumPy, Pandas, Statsmodels, Sckit-learn and Matplotlib**). \n\nI've been working through it and I'm documenting the projects of this textbook within this repository. \n\n- This repository showcases my work with Python in analysing and visualising financial data, alongside simulating stock market behaviours and performing statistical tests 📈 It is regularly being updated as I progress within the textbook.\n\n---\n\n#### 1. S\u0026P 500 Data Visualisation 📊\nI used the libraries **NumPy**, **Pandas**, and **Matplotlib** to provide clear visualisations of:\n  - Relative volatilities of different stocks.\n  - Historical trends and patterns in the stock market using real S\u0026P 500 data.\n- Designed user-friendly graphs and plots to make data insights easily interpretable.\n\n#### 2. Monte Carlo Simulations ⏩\nI developed a Monte Carlo simulation model for stock price forecasting. I used **NumPy**\n- This simulation includes:\n  - User-defined parameters such as initial stock price, number of simulations, and time of maturity.\n  - Aimed to help users assess risk and potential returns effectively.\n\n#### 3. ML Trading Strategy using Support Vector Classification 📊\nI created a ML based trading strategy to predict stock price movements, and evaluate its performance against a buy and hold strategy.\n- It predicts stock returns by comparing cumulative returns of the ML strategy to the buy-and-hold strategy.\n- Provides a clear plot of strategy returns vs. actual stock returns for easy interpretation.\n- Uses 3 lags as determined by ACF plot to prevent over-fitting of ML model.\n- Includes markers in Matplotlib that determine the best time to buy and sell for maximum profits\n\n---\n\n### If you would like to see this code in action 🏄🏾‍♀️...\nTake a look at the files within this repository. The titles correspond to the appropriate project 😇\n- Ensure you install the required libraries.\n- Copy and paste the code into Python or Jupyter.\n- Adapt the code to your specific data and user inputs and use to your discretion :)\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foaerobert%2Fpython-for-finance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foaerobert%2Fpython-for-finance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foaerobert%2Fpython-for-finance/lists"}