{"id":44257093,"url":"https://github.com/tno-quantum/problems.portfolio_optimization","last_synced_at":"2026-02-10T16:34:30.436Z","repository":{"id":234438092,"uuid":"788533569","full_name":"TNO-Quantum/problems.portfolio_optimization","owner":"TNO-Quantum","description":"Python code that converts the multi-objective portfolio optimization problem into a QUBO problem.","archived":false,"fork":false,"pushed_at":"2025-10-01T13:46:05.000Z","size":6900,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-01T15:28:53.702Z","etag":null,"topics":["portfolio-optimization","quantum-computing"],"latest_commit_sha":null,"homepage":"https://tno-quantum.github.io/documentation/","language":"Python","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/TNO-Quantum.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-04-18T15:47:13.000Z","updated_at":"2025-10-01T14:08:07.000Z","dependencies_parsed_at":"2024-04-19T10:59:00.360Z","dependency_job_id":"3eeef81a-41e4-44cf-993e-76d1e49f8af1","html_url":"https://github.com/TNO-Quantum/problems.portfolio_optimization","commit_stats":null,"previous_names":["tno-quantum/problems.portfolio_optimization"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/TNO-Quantum/problems.portfolio_optimization","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TNO-Quantum%2Fproblems.portfolio_optimization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TNO-Quantum%2Fproblems.portfolio_optimization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TNO-Quantum%2Fproblems.portfolio_optimization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TNO-Quantum%2Fproblems.portfolio_optimization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TNO-Quantum","download_url":"https://codeload.github.com/TNO-Quantum/problems.portfolio_optimization/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TNO-Quantum%2Fproblems.portfolio_optimization/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29307909,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T16:09:25.305Z","status":"ssl_error","status_checked_at":"2026-02-10T16:08:52.170Z","response_time":65,"last_error":"SSL_read: 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":["portfolio-optimization","quantum-computing"],"created_at":"2026-02-10T16:34:29.579Z","updated_at":"2026-02-10T16:34:30.428Z","avatar_url":"https://github.com/TNO-Quantum.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Portfolio optimization\n\nReal-world investment decisions involve multiple, often conflicting, objectives that needs to be balanced.\nPrimary goals typically revolve around maximizing returns while minimizing risks.\nAt the same time, one might want to require additional constraints such as demanding a minimum carbon footprint reduction. \nFinding a portfolio that balances these objectives is a challenging task and can be solved using multi-objective portfolio optimization. \n\nThis repository provides Python code that converts the multi-objective portfolio optimization problem\ninto a [QUBO](https://en.wikipedia.org/wiki/Quadratic_unconstrained_binary_optimization) problem. The transformed problem can then be solved using quantum annealing techniques.\n\nThe following objectives can be considered\n\n- `return on capital`, indicated by `ROC`,\n- `diversification`, indicated by the [Herfindahl-Hirschman Index](https://en.wikipedia.org/wiki/Herfindahl%E2%80%93Hirschman_inde) `HHI`.\n\nAdditionally, we allow for a capital growth factor and arbitrary emission reduction constraints to be considered.\n\nThe Pareto front, the set of solutions where one objective can't be improved without worsening the other objective,\ncan be computed for the objectives return on capital and diversification. \n\nThe codebase is based on the following paper:\n\n- [Aguilera et al., - Multi-objective Portfolio Optimisation Using the Quantum Annealer (2024)](https://www.mdpi.com/2227-7390/12/9/1291)\n\n**Funding:** This research was funded by Rabobank and Stichting TKI High Tech Systems\nand Materials, under a program by Brightland's Techruption.\n\n\n## Documentation\n\nDocumentation of the `tno.quantum.problems.portfolio_optimization` package can be found [here](https://tno-quantum.github.io/documentation/).\n\n## Install\n\nEasily install the `tno.quantum.problems.portfolio_optimization` package using pip:\n\n```console\n$ python -m pip install tno.quantum.problems.portfolio_optimization\n```\n\nIf you wish to run the tests you can use:\n```console\n$ python -m pip install tno.quantum.problems.portfolio_optimization[tests]\n```\n\nUsage examples can be found in the [documentation](https://tno-quantum.github.io/documentation/).\n\nData input\n----------\n\nThe data used for the portfolio optimization can be imported via an excel file, csv file,\njson file or as a Pandas DataFrame.\nThe data needs to contain at least the following columns:\n\n- `asset`: The name of the asset.\n- `outstanding_now`: Current outstanding amount per asset.\n- `min_outstanding_future`: Lower bound outstanding amount in the future per asset.\n- `max_outstanding_future`: Upper bound outstanding amount in the future per asset.\n- `income_now`: Current income per asset, corresponds to return multiplied by the current outstanding amount.\n- `regcap_now`: Current regulatory capital per asset.\n\n\nIf the input datafile contains all the correct information, but has different column\nnames, it is possible to rename the columns without altering the input file.\n\nThe data that was used for the publication can be found in the `src/tno/quantum/problems/portfolio_optimization/datasets/` folder.\n\n\n## (End)use limitations\nThe content of this software may solely be used for applications that comply with international export control laws.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftno-quantum%2Fproblems.portfolio_optimization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftno-quantum%2Fproblems.portfolio_optimization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftno-quantum%2Fproblems.portfolio_optimization/lists"}