Análisis y gestión del riesgo en carteras de estrategias de trading algorítmico

Bookmark (0)
Please login to bookmark Close

Este Trabajo Fin de Grado propone un método práctico para construir y probar una cartera (portfolio) formada por varias estrategias automáticas de trading, con el objetivo de reducir el riesgo y no depender de una única estrategia.
El proyecto parte de 13 estrategias que ya habían sido evaluadas previamente en el TFG Generación y Validación de Estrategias de Trading Algorítmico. Para combinarlas se utiliza StrategyQuant X, un software especializado que permite analizar estrategias de trading y crear carteras de estrategias comparando su rentabilidad y su riesgo. Con esta herramienta se prueban distintas combinaciones y se selecciona la que ofrece el mejor equilibrio entre rentabilidad y caídas máximas (drawdown). El resultado es un portfolio final formado por 5 estrategias, buscando que se complementen entre sí y no se comporten todas igual. Después, el portfolio se traslada a un entorno más cercano a la realidad mediante MetaTrader 4 y Darwinex Zero. Darwinex es una plataforma de inversión que permite ejecutar estrategias de trading y evaluarlas bajo un marco profesional, aplicando un sistema de control y estandarización del riesgo para que las estrategias sean comparables entre sí. En esta fase se analiza cómo cambian los resultados cuando la estrategia opera en condiciones reales de mercado (costes, spreads y posibles deslizamientos) y bajo ese control de riesgo. También se explica que el tamaño de las operaciones cambia entre la fase de prueba y la fase operativa (en el backtest se usa un tamaño menor y en Darwinex un tamaño mayor), lo que puede afectar a la rentabilidad y al riesgo. La evaluación operativa se realiza en el periodo 01/09/2025–10/12/2025, revisando indicadores como rentabilidad, caídas máximas, comportamiento según horarios/días y estabilidad del riesgo (VaR).
En conclusión, el trabajo muestra que gestionar estrategias de trading como una cartera requiere combinar tres ideas clave: selección cuantitativa, diversificación real (que no todas fallen a la vez) y validación en un entorno operativo con control de riesgo, ya que los resultados de una simulación (backtest) no siempre se replican exactamente en la práctica. ABSTRACT
This Bachelor’s Thesis proposes a practical method to build and test a portfolio made up of several automated trading strategies, with the aim of reducing risk and avoiding reliance on a single strategy.
The project starts from 13 strategies that had already been evaluated in the companion thesis “Generación y Validación de Estrategias de Trading Algorítmico”. To combine them, the thesis uses StrategyQuant X, a specialized software tool that allows users to analyze trading strategies and build portfolios by comparing their profitability and risk. With this tool, different combinations are tested and the portfolio that offers the best balance between return and maximum drawdown is selected. The final result is a portfolio composed of 5 strategies, chosen so that they complement each other and do not behave in the same way.
Next, the portfolio is transferred to a more realistic execution environment using MetaTrader 4 and Darwinex Zero. Darwinex is an investment platform that allows trading strategies to be executed and evaluated within a professional framework, applying a risk control and risk standardization system so that strategies can be compared consistently. In this stage, the thesis analyzes how results change when the strategy operates under real market conditions (costs, spreads, and potential slippage) and under that risk control framework. It also explains that position sizing differs between the testing phase and the operational phase (a smaller trade size is used in the backtest, while a larger one is used in Darwinex), which can affect both returns and risk.
The operational evaluation covers the period from 01/09/2025 to 10/12/2025, reviewing indicators such as performance, maximum drawdowns, behavior across trading sessions/days of the week, and risk stability (VaR).
In conclusion, the thesis shows that managing trading strategies as a portfolio requires combining three key elements: quantitative selection, genuine diversification (so that not all strategies fail at the same time), and validation in an operational environment with risk control, since backtest results do not always replicate exactly in practice.

​Este Trabajo Fin de Grado propone un método práctico para construir y probar una cartera (portfolio) formada por varias estrategias automáticas de trading, con el objetivo de reducir el riesgo y no depender de una única estrategia.
El proyecto parte de 13 estrategias que ya habían sido evaluadas previamente en el TFG Generación y Validación de Estrategias de Trading Algorítmico. Para combinarlas se utiliza StrategyQuant X, un software especializado que permite analizar estrategias de trading y crear carteras de estrategias comparando su rentabilidad y su riesgo. Con esta herramienta se prueban distintas combinaciones y se selecciona la que ofrece el mejor equilibrio entre rentabilidad y caídas máximas (drawdown). El resultado es un portfolio final formado por 5 estrategias, buscando que se complementen entre sí y no se comporten todas igual. Después, el portfolio se traslada a un entorno más cercano a la realidad mediante MetaTrader 4 y Darwinex Zero. Darwinex es una plataforma de inversión que permite ejecutar estrategias de trading y evaluarlas bajo un marco profesional, aplicando un sistema de control y estandarización del riesgo para que las estrategias sean comparables entre sí. En esta fase se analiza cómo cambian los resultados cuando la estrategia opera en condiciones reales de mercado (costes, spreads y posibles deslizamientos) y bajo ese control de riesgo. También se explica que el tamaño de las operaciones cambia entre la fase de prueba y la fase operativa (en el backtest se usa un tamaño menor y en Darwinex un tamaño mayor), lo que puede afectar a la rentabilidad y al riesgo. La evaluación operativa se realiza en el periodo 01/09/2025–10/12/2025, revisando indicadores como rentabilidad, caídas máximas, comportamiento según horarios/días y estabilidad del riesgo (VaR).
En conclusión, el trabajo muestra que gestionar estrategias de trading como una cartera requiere combinar tres ideas clave: selección cuantitativa, diversificación real (que no todas fallen a la vez) y validación en un entorno operativo con control de riesgo, ya que los resultados de una simulación (backtest) no siempre se replican exactamente en la práctica. ABSTRACT
This Bachelor’s Thesis proposes a practical method to build and test a portfolio made up of several automated trading strategies, with the aim of reducing risk and avoiding reliance on a single strategy.
The project starts from 13 strategies that had already been evaluated in the companion thesis “Generación y Validación de Estrategias de Trading Algorítmico”. To combine them, the thesis uses StrategyQuant X, a specialized software tool that allows users to analyze trading strategies and build portfolios by comparing their profitability and risk. With this tool, different combinations are tested and the portfolio that offers the best balance between return and maximum drawdown is selected. The final result is a portfolio composed of 5 strategies, chosen so that they complement each other and do not behave in the same way.
Next, the portfolio is transferred to a more realistic execution environment using MetaTrader 4 and Darwinex Zero. Darwinex is an investment platform that allows trading strategies to be executed and evaluated within a professional framework, applying a risk control and risk standardization system so that strategies can be compared consistently. In this stage, the thesis analyzes how results change when the strategy operates under real market conditions (costs, spreads, and potential slippage) and under that risk control framework. It also explains that position sizing differs between the testing phase and the operational phase (a smaller trade size is used in the backtest, while a larger one is used in Darwinex), which can affect both returns and risk.
The operational evaluation covers the period from 01/09/2025 to 10/12/2025, reviewing indicators such as performance, maximum drawdowns, behavior across trading sessions/days of the week, and risk stability (VaR).
In conclusion, the thesis shows that managing trading strategies as a portfolio requires combining three key elements: quantitative selection, genuine diversification (so that not all strategies fail at the same time), and validation in an operational environment with risk control, since backtest results do not always replicate exactly in practice. Read More