Three-phase model for portfolio management with tax optimization using AI

Discover the innovative three-phase AI-based model that optimizes investment portfolios with tax awareness, personalizing strategies dynamically.

miércoles, 1 de julio de 2026 • 3 min read • Q2BSTUDIO Team

Deep reinforcement learning system for personalized portfolios

Investment portfolio management has evolved from approaches based on fixed rules to intelligent systems capable of adapting to multiple objectives and risk profiles. However, traditional methods have limitations such as rigidity in asset selection, the inability to simultaneously optimize conflicting objectives (long-term growth vs. capital preservation, for example), and the lack of dynamic personalization. Artificial intelligence offers solutions to overcome these barriers, enabling the construction of systems that learn from historical data, adapt to new conditions, and continuously optimize portfolios.

A promising approach is structured in three phases. The first consists of pre-training an asset encoder independent of the ticker identifier through self-supervised learning on a multi-asset corpus. This encoder is combined with a foundational time series model, such as Chronos, through a learned gating mechanism. The result is a generic representation that can be applied to any public asset using a 50-dimensional metadata vector, without the need for retraining. This eliminates dependence on fixed asset lists and allows new instruments to be incorporated instantly.

The second phase fine-tunes the portfolio policy using an actor-critic based on mixture of experts (MoE) trained with PPO. The reward is conditioned on six investment objectives: short-term alpha, short-term gain, long-term gain, capital preservation, tax-loss harvesting, and long-term gains only. Each objective is handled by a specialized expert (momentum, growth, defensive, tax), and a trained router combines their outputs according to the active objective and market regime, avoiding gradient conflicts between objectives. This achieves efficient multi-objective optimization without the need for manual weights.

The third phase adds a lightweight personalization layer using LoRA (76 parameters) that is fine-tuned at inference time using the investor's actual transaction history. In this way, the system infers the true investment objectives from revealed behavior, not from questionnaires. Additionally, a natural language parser allows goals expressed in free language (for example, 'I want to save for retirement while minimizing taxes') to be converted into structured investment parameters. This democratizes access to sophisticated tax optimization strategies for retail investors.

Implementing a system of this caliber requires combining multiple technological disciplines. It is necessary to have artificial intelligence solutions for businesses that allow training complex models, as well as AWS and Azure cloud service platforms to scale data processing and real-time inference. Cybersecurity is essential to protect sensitive financial data, and business intelligence tools such as Power BI facilitate the visualization of results for advisors and clients. At Q2BSTUDIO we develop custom applications that integrate these components, including AI agents capable of acting autonomously in portfolio management.

The combination of self-supervised learning, multi-objective optimization with mixture of experts, and personalization through low-rank adaptation represents a significant advance over previous approaches. By eliminating dependence on fixed tickers, supporting multiple simultaneous objectives, and adapting to the investor's actual behavior, these systems offer more flexible, efficient portfolio management aligned with individual needs. Tax optimization becomes an integrated component, not an afterthought, reducing the tax burden legally and automatically.

The future of personalized investing lies in systems that continuously learn from markets and from each user. Companies that adopt these technologies will be able to offer more competitive and adaptive services. From Q2BSTUDIO, with our experience in custom software development and artificial intelligence, we help build these solutions, also integrating business intelligence services and process automation for real financial environments.

A BREAK?

Play for a moment before you go

OUR SERVICES

How we can help you

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.