Skip to content

PorQua – A Framework for Constructing and Backtesting Investment Strategies

Vissarion Fisikopoulos edited this page Feb 17, 2025 · 3 revisions

Overview

PorQua aims to provide a robust framework for constructing, optimizing, and backtesting investment strategies, combining state-of-the-art techniques in portfolio optimization, machine learning, and risk management. The project involves implementing a flexible and extensible set of tools for portfolio optimization, asset return prediction, and risk management, ultimately enhancing investment decision-making and strategy development.
PorQua differentiates itself from other backtesting libraries by its ability to model real-world requirements, such as changes in the investable universe, path-dependencies, transaction costs, and turnover control, or liquidity constraints.

Tasks

1. Optimization

a. Portfolio Optimization Framework:

  • Implement the classes LinearProgram and ConvexProgram to serve as wrappers for corresponding open-source solvers (e.g., CVXPY, Gurobi) in alignment with the existing QuadraticProgram class.
  • Define an API that facilitates a seamless interface for creating and solving optimization problems.

b. Portfolio Optimization Objectives:

Define classes for key optimization objectives, allowing for a flexible and extensible design:

  • Maximum Utility: Define a utility function (e.g., logarithmic utility) that captures investor preferences.
  • Maximimum Ratio: Implement Sharpe ratio optimization and other related metrics (e.g., Sortino ratio, Omega ratio).
  • Minimum Risk: Implement minimization techniques for different risk metrics, such as Variance, Conditional Value-at-Risk (CVaR), Tracking error, Drawdown.
  • Equal Risk Contribution: Implement optimization techniques to ensure equal risk contribution from all assets.

c. Multi-Objective Optimization: Provide flexibility for combining objectives such as maximizing utility while minimizing risk.

d. Constraints Implementation:

  • Implement risk contribution constraints that enforce balance across different assets in terms of risk contributions, ensuring that no single asset or group of assets disproportionately impacts the overall risk.

2. Machine Learning

a. Time Series Prediction (LSTM):

Implement Long Short-Term Memory (LSTM) networks to predict future stock returns based on historical data.

  • Provide pre-processing pipelines for preparing input data.
  • Train and evaluate LSTM models for various forecast horizons.

b. Learning to Rank (LTR):

Implement a Learning-to-Rank model to predict the ordering of future stock returns.

  • Utilize techniques like RankNet or LambdaRank for ranking stocks based on expected return.

c. Feature Generation:

Develop a suite of technical analysis features to feed into machine learning models.

d. Feature Selection:

Implement feature selection methods to identify the most relevant features for forecasting stock returns, such as Recursive Feature Elimination (RFE), L1 regularization (Lasso), Random Forest feature importance.

3. Deliverables:

  • A full-featured portfolio optimization engine with support for linear, convex, and quadratic programming.
  • Machine learning models (LSTM and Learning to Rank) with the ability to predict stock returns and orderings.
  • A suite of technical analysis features for machine learning model training and portfolio construction.
  • Documentation and tutorials for the framework, making it accessible for both experienced quants and new users.

Difficulty: Hard

Size

Large (350 hours)

Mentors

  • Bachelard Cyril <cyril.bachelard at quantarea.ch> He serves as the Head of Quant Engineering and is a founding partner at Quantarea, a quantitative Asset Manager in Switzerland. He has 12+ years of experience in quantitative portfolio management and systematic equity research. His areas of expertise include high-dimensional portfolio optimization, machine learning, and signal processing for dynamic asset allocation. Mentoring experience with GeomScale since 2024.

  • Apostolos Chalkis <tolis.chal at gmail.com> is a Research Engineer at Quantagonia GmbH. He is an expert in statistical software, computational geometry, and optimization, and has previous GSoC student experience (2018 & 2019) and mentoring experience with GeomScale (from 2020 to 2024).