{"id":22209414,"url":"https://github.com/jialuechen/deepfolio","last_synced_at":"2026-01-27T04:41:43.150Z","repository":{"id":247510658,"uuid":"805510719","full_name":"jialuechen/deepfolio","owner":"jialuechen","description":"Diffusion-Transformer for Joint Portfolio Construction \u0026 Execution Optimization","archived":false,"fork":false,"pushed_at":"2025-02-23T00:01:28.000Z","size":4228,"stargazers_count":103,"open_issues_count":3,"forks_count":8,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-09T05:12:20.651Z","etag":null,"topics":["attention-mechanism","diffusion-models","event-driven","execution","market-making","portfolio-optimization","quant-finance","transformer"],"latest_commit_sha":null,"homepage":"https://jialuechen.github.io/deepfolio/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jialuechen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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-05-24T18:30:01.000Z","updated_at":"2025-03-05T11:39:55.000Z","dependencies_parsed_at":"2024-08-25T02:44:14.429Z","dependency_job_id":"5dd7c8a4-e39c-4db1-ba4d-0b3746a7eaec","html_url":"https://github.com/jialuechen/deepfolio","commit_stats":null,"previous_names":["jialuechen/deepfolio"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jialuechen%2Fdeepfolio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jialuechen%2Fdeepfolio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jialuechen%2Fdeepfolio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jialuechen%2Fdeepfolio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jialuechen","download_url":"https://codeload.github.com/jialuechen/deepfolio/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244776336,"owners_count":20508506,"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":["attention-mechanism","diffusion-models","event-driven","execution","market-making","portfolio-optimization","quant-finance","transformer"],"created_at":"2024-12-02T19:30:11.696Z","updated_at":"2026-01-27T04:41:43.073Z","avatar_url":"https://github.com/jialuechen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=center\u003e\n\u003cimg src=\"assets/deepfolio.png\" width=\"45%\" loc\u003e\n\n[![TensorFlow](https://img.shields.io/badge/TensorFlow-2.15-red)](https://tensorflow.org/)\n![PyPI - Version](https://img.shields.io/pypi/v/deepfolio)\n[![License](https://img.shields.io/badge/License-BSD_2--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause)\n![Python versions](https://img.shields.io/badge/python-3.6%2B-green)\n![PyPI downloads](https://img.shields.io/pypi/dm/deepfolio)  \n\n\u003c/div\u003e\n\n# **DeepFolio | Diffusion-Transformer (DiT) for Portfolio \u0026 Execution Optimization**  \n\nDeepFolio is an **OpenAI Sora-inspired Diffusion-Transformer (DiT) framework** for **joint portfolio optimization and best execution**, designed to **maximize Sharpe ratio without explicit return forecasts**. It leverages:  \n- **Transformer** to capture asset dependencies and encode market conditions.  \n- **Diffusion Models** to filter market noise and generate both **robust allocation weights** and **optimized trading trajectories**.  \n- **End-to-End Strategy Execution** to reduce information loss between **strategy design and execution implementation**, ensuring optimal real-world performance.  \n\n---\n\n## **🚀 Key Features**\n✅ **Unified Portfolio \u0026 Execution Optimization** – Bridges the gap between portfolio construction and trade execution.  \n✅ **Diffusion-Based Portfolio Generation** – Generates **adaptive, robust asset allocations** without relying on explicit return forecasts.  \n✅ **Market-Aware Execution Path Modeling** – Uses **Diffusion Models** to optimize **execution trajectories**, reducing slippage and market impact.  \n✅ **Scenario-Based Adaptation** – Dynamically adjusts strategies for **high/low volatility regimes, liquidity shifts, and market anomalies**.  \n✅ **Transaction Cost-Aware Optimization** – Integrates **TCA (Transaction Cost Analysis)** into optimization, minimizing execution costs.  \n\n---\n\n## **📜 Architecture**\nDeepFolio consists of **two core modules**:  \n\n### **1️⃣ Portfolio Optimization** (Transformer + Diffusion)  \n- **Transformer Encoder** extracts asset relationships, learning market structure.  \n- **Diffusion Model** generates optimal portfolio weights, ensuring robustness under different conditions.  \n\n### **2️⃣ Execution Optimization** (Trade Path Diffusion)  \n- **Transformer encodes market microstructure (LOB, liquidity, volatility).**  \n- **Diffusion Model optimizes execution paths** to minimize market impact and transaction costs.  \n\n📌 **Pipeline Overview**:  \n\n\n## Documentation\n\nFor detailed documentation, please visit our [documentation site](https://diffopt-portfolio.readthedocs.io).\n\n## Contributing\n\nWe welcome contributions! Please see our [contributing guidelines](CONTRIBUTING.md) for more details.\n\n\n## License\n\nThis project is licensed under the BSD-2-Clause License- see the [LICENSE](LICENSE) file for details.\n\n## Reference\n\u003ca id=\"1\"\u003e[1]\u003c/a\u003e \nDamian Kisiel, Denise Gorse (2022). \nPortfolio Transformer for Attention-Based Asset Allocation\narXiv:2206.03246 [q-fin.PM]\n\n## Acknowledgments\n\n- This package leverages the power of TensorFlow for efficient portfolio optimization.\n- Thanks to the financial machine learning community for inspiring many of the implemented methods.\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjialuechen%2Fdeepfolio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjialuechen%2Fdeepfolio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjialuechen%2Fdeepfolio/lists"}