Skip to content
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

snake_case Error Messages for Python #8474

Open
4 tasks done
DerekMelchin opened this issue Dec 20, 2024 · 0 comments
Open
4 tasks done

snake_case Error Messages for Python #8474

DerekMelchin opened this issue Dec 20, 2024 · 0 comments
Assignees

Comments

@DerekMelchin
Copy link
Collaborator

Expected Behavior

This algorithm throws an error message with the method names in snake_case

class MyAlgorithm(QCAlgorithm):

    def initialize(self):
        self.set_start_date(2024, 12, 11)
        self.add_equity('SPY', Resolution.DAILY).symbol
        self.set_warm_up(timedelta(7))
    
    def on_data(self, data):
        if not self.portfolio.invested:
            self.set_holdings('spy', 1)

Actual Behavior

Backtest Handled Error: This operation is not allowed in Initialize or during warm up: OrderRequest.Submit. Please move this code to the OnWarmupFinished() method.

Potential Solution

N/A

Reproducing the Problem

Run the algorithm above.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants