{"id":18799879,"url":"https://github.com/fedesgh/finding_best_portfolio_efficient_frontier","last_synced_at":"2025-06-26T20:11:00.306Z","repository":{"id":259218483,"uuid":"866050524","full_name":"Fedesgh/Finding_Best_Portfolio_Efficient_Frontier","owner":"Fedesgh","description":"Finding the best portfolio for a list of stocks using efficient frontier","archived":false,"fork":false,"pushed_at":"2024-10-25T21:47:42.000Z","size":24328,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-21T20:11:19.489Z","etag":null,"topics":["efficient-frontier","yfinance"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Fedesgh.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":"2024-10-01T15:04:36.000Z","updated_at":"2024-10-25T21:47:45.000Z","dependencies_parsed_at":"2024-11-07T22:27:07.989Z","dependency_job_id":null,"html_url":"https://github.com/Fedesgh/Finding_Best_Portfolio_Efficient_Frontier","commit_stats":null,"previous_names":["fedesgh/finding_best_portfolio_efficient_frontier"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Fedesgh/Finding_Best_Portfolio_Efficient_Frontier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fedesgh%2FFinding_Best_Portfolio_Efficient_Frontier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fedesgh%2FFinding_Best_Portfolio_Efficient_Frontier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fedesgh%2FFinding_Best_Portfolio_Efficient_Frontier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fedesgh%2FFinding_Best_Portfolio_Efficient_Frontier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fedesgh","download_url":"https://codeload.github.com/Fedesgh/Finding_Best_Portfolio_Efficient_Frontier/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fedesgh%2FFinding_Best_Portfolio_Efficient_Frontier/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262137149,"owners_count":23264675,"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":["efficient-frontier","yfinance"],"created_at":"2024-11-07T22:16:56.525Z","updated_at":"2025-06-26T20:11:00.276Z","avatar_url":"https://github.com/Fedesgh.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Idea\nUsing yfinance we want to find the best portfolio given an upper bound risk, and a list of stocks.\n\n## Functions\n\nBasic functions are Log return (**portfolio_return**) , portafolio standart deviation (**std_portfolio**), and a weights random generator (**weights_gen**).\nThe inputs are **ticker** wich are **yfinance ticker** like \"COME.BA\" , \"BYMA.BA\", etc. and **weights** generated by **weights_gen**\n\n\n![images/functions.jpg](images/functions.jpg)\n\n\nThen we construct **frontier** with inputs **stocks** wich are a list of **yfinance tickers** , and **iterations** wich is the number of iterations that our function **weights_gen** will create randoms weights.\n\n\n![images/efifrontier.jpg](images/efifrontier.jpg)\n\n\nThe output is a **dataframe** with **Return**, **Risk** for each combination of weights given by **weights_gen** for a particular list of tickers (stocks in our porfolio).\n\n\n\n![images/efrontier.png](images/efrontier.png)\n\n\n\nFinally we build **find_best** wich is a function that return the weights compositions with the **best return** given and upper bound **Risk** that we want assume for a set of stocks. The input is the data frame provided by **frontier**\n\n![images/best.jpg](images/best.jpg)\n\n\n\n![images/pieportfolio.png](images/pieportfolio.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffedesgh%2Ffinding_best_portfolio_efficient_frontier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffedesgh%2Ffinding_best_portfolio_efficient_frontier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffedesgh%2Ffinding_best_portfolio_efficient_frontier/lists"}