A Python framework for portfolio optimization using deep learning to allocate investment weights in a single forward pass.
deepdow is a Python framework that connects portfolio optimization with deep learning, enabling the creation of neural networks that perform investment weight allocation in a single forward pass. It merges forecasting and optimization steps into a fully differentiable pipeline, allowing researchers to train models end-to-end using gradient descent. The framework focuses on buy-and-hold strategies, simplifying the design of allocation networks without active trading complexities.
Researchers and data scientists in quantitative finance who want to experiment with deep learning for portfolio optimization, and developers building differentiable allocation models using PyTorch.
deepdow offers a unified, differentiable framework that replaces traditional multi-step portfolio optimization with a single neural network pipeline, providing flexibility, extensibility, and integration with tools like cvxpylayers for convex optimization. Its modular design and support for various loss functions make it ideal for rapid experimentation and research.
Portfolio optimization with deep learning.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
All layers are built on PyTorch and support gradient-based optimization, enabling seamless training of the entire portfolio allocation pipeline in one forward pass, as described in the README.
Incorporates cvxpylayers for differentiable convex optimization within networks, allowing for precise and optimizable allocation layers that bridge deep learning and traditional methods.
Provides multiple dataloading strategies like RigidDataLoader and FlexibleDataLoader to handle varied financial data structures, ensuring adaptability to different research setups.
Designed for easy extension with customizable layers and integration with mlflow and tensorboard via callbacks, making it ideal for iterative experimentation and tracking.
The framework explicitly excludes active trading and transaction cost considerations, restricting its use to long-term allocation scenarios, which is a admitted limitation in the README.
Requires deep expertise in both PyTorch and portfolio theory, making it less accessible for developers without a strong background in quantitative finance and deep learning.
As a specialized tool, it lacks the extensive community support, comprehensive documentation, and production-ready features found in more mainstream libraries, which can hinder adoption.