Skip to content

Default to ALL market opens in market data subscriptions #9461

@DerekMelchin

Description

@DerekMelchin

Expected Behavior

Agents write valid time rules

Actual Behavior

The agent wrote

self.schedule.on(
            self.date_rules.month_start(),
            self.time_rules.after_market_open(minutes=30),
            self._rebalance
        )

which threw

During the algorithm initialization, the following exception has occurred: Trying to dynamically access a method that does not exist throws a TypeError exception. To prevent the exception, ensure each parameter type matches those required by the () method. Please checkout the API documentation.
  at initialize
    self.time_rules.after_market_open(minutes=30),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 in main.py: line 23
 No method matches given arguments for AfterMarketOpen: () (Open Stack Trace)

Potential Solution

N/A

Reproducing the Problem

N/A - code produced by agents. Could just try to use the code snippet in an algorithm.

System Information

QC Cloud

Checklist

  • I have completely filled out this template
  • I have confirmed that this issue exists on the current master branch
  • I have confirmed that this is not a duplicate issue by searching issues
  • I have provided detailed steps to reproduce the issue

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions