Skip to content

Can CustomFactor Pipelines Be Used with Minute Data? #279

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
hectordanielc opened this issue Apr 20, 2025 · 0 comments
Open

Can CustomFactor Pipelines Be Used with Minute Data? #279

hectordanielc opened this issue Apr 20, 2025 · 0 comments

Comments

@hectordanielc
Copy link

hectordanielc commented Apr 20, 2025

Hi,

Is it possible to use CustomFactor pipelines with minute-level data?

I'm currently encountering the following error when trying to attach a pipeline in the initialize function:

ValueError: At least one valid asset id is required.

Here's some context:

I was successfully testing one of my strategies using daily data from a custom bundle I created. Then I decided to switch to a 1-minute data bundle to test other ideas. However, with the same setup that worked for daily data, I now get the error mentioned above when I try to attach a pipeline.

Here's a minimal example of the pipeline I'm using:

def make_pipeline():
    pipe = Pipeline(
        columns={
            'close': USEquityPricing.close.latest,
        },
        screen=USEquityPricing.close.latest.notnull(),  # Replacing StaticAssets with a broader filter
    )
    return pipe

And this is my initialize function:

def initialize(context):
    # Define the stocks to trade
    context.asset = [symbol(ticker) for ticker in symbol_list]

    pipeline = make_pipeline()
    attach_pipeline(pipeline, 'pipeline')

This works perfectly with daily data. But with 1-minute data, I get the ValueError. Interestingly, if I comment out the attach_pipeline line like this:

def initialize(context):
    context.asset = [symbol(ticker) for ticker in symbol_list]

    pipeline = make_pipeline()
    # attach_pipeline(pipeline, 'pipeline')

…the error goes away and the code runs fine (excluding the pipeline, of course).

This leads me to believe that pipelines are not compatible with minute-level data. Could someone please confirm if this is the case? I want to avoid spending more time trying to debug something that might be unsupported.

Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant