added

Point-in-time for alpha tests & portfolio strategies

Point-in-time support allows you to avoid look-ahead bias in your alternative data analysis workflows. We have now rolled out beta point-in-time support to Alpha Tests and Portfolio Strategies, our workhorse quant tools to backtest signals for alpha potential and risk.

In both Alpha Tests and Portfolio Strategies, you will now be able to enable point-in-time evaluation. If this is enabled, on each portfolio rebalancing date, the backtester will evaluate the input signals based on their known values as of the rebalance date.

If your alpha tests or portfolio strategies are configured with a screen as the company universe, the screen will also be evaluated based on the known values as of each rebalance date. (As a recap, screens allow you to dynamically define a set of companies using signals. It is these signals that are again evaluated based on their known values as of the rebalance date.)

Enabling point-in-time evaluation

For Alpha Tests, under Advanced options, turn on "Evaluate with point-in-time data":

1812

For Portfolio Strategies, under the Alpha factors configuration page, turn on "Evaluate with point-in-time data":

3498

Demonstration

Here, we construct an example signal with obvious look-ahead bias, and demonstrate how enabling point-in-time evaluation clearly prevents this.

Our signal looks for the close price 3 days into the future and calculates the future 3-day return:

series_function(lambda s: s.shift(-3))(Close_Price) / Close_Price - 1

(While clearly not a realistic real-world scenario, this provides a clear example of look-ahead bias using market data that is available to all Exabel users, and is hence easily reproducible.)

We run a portfolio strategy backtest over 2017-21 with the S&P 500 as our company universe, using a long-short portfolio with default portfolio & risk control parameters, and the above signal as the only alpha factor.

Without point-in-time evaluation, the look-ahead bias of the signal uses the knowledge of future share prices to be used in the backtest, resulting in a Madoff-ian like return profile:

3460

However, with point-in-time evaluation enabled, the look-ahead bias is eliminated, resulting in a much more realistic backtest result:

3490

More technical details

Under the hood, when you enable point-in-time evaluation for alpha tests & portfolio strategies, what the backtester does is functionally equivalent to using the version() DSL function to evaluate each signal based on its known values on each rebalance date:

version(rebalance_date, signal)  # Eg: version('2021-01-01', close_price)