Unable to determine domain for Pipeline Error on futures bundle

When trying to execute run_pipeline on a bundle containing US futures price data, I receive the following error:

ValueError: Unable to determine domain for Pipeline.
Pass domain=<desired domain> to your Pipeline to set a domain.

I specified the "us_futures" calendar when creating the bundle.

When I execute the run_pipeline code on a bundle containing US equities only, it works fine.

I didn't see any where in the Usage Instructions or API where I need to set a domain for Pipeline.

Here's the run_pipeline code I'm trying to run for reference.

from zipline.pipeline import Pipeline
from zipline.pipeline.factors import AverageDollarVolume, Returns
from zipline.research import run_pipeline
# Calculate 1-year returns for all stocks with 30-day average dollar volume > 10M
pipeline = Pipeline(
    columns={
    "1y_returns": Returns(window_length=252),
    },
    screen=AverageDollarVolume(window_length=30) > 10e6
)

factors = run_pipeline(pipeline, start_date="2018-01-02", end_date="2019-01-01",  bundle="futures-edited-1d-bundle")
factors.tail()

Please advise.

David

I'm new to Zipline, also trying to get it working. I had the same error for my pipeline of Japanese equities. I don't know the exact solution to this for US futures, but this might help:

The Pipeline constructor takes a domain keyword parameter. Here's the list of Zipline domains. I don't see a domain for US futures specifically. You could try zipline.pipeline.domain.US_EQUITIES maybe, or zipline.pipeline.domain.GENERIC.

TL;DR try adding an import zipline.pipeline.domain statement and add a domain=zipline.pipeline.domain.US_EQUITIES, parameter after }, .

HTH. YMMV-I know little about Zipline and nothing about futures. dpc

Please update to version 2.1.1 which adds pipeline support for futures. Then your code should work as is.

Historically, Quantopian introduced pipeline support into Zipline after they more or less discontinued futures support, so pipeline never supported futures. We've now added the enhancements to the underlying library to provide that support.