QuantConnect / QuantConnect/Lean

DonchianChannel tests don't catch errors with Donchian Channels 50 Mean

Open
#8,169 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
21.7k
Forks
5.3k
Avg merge
2d 22h
Merged PRs (30d)
34

Description

Expected Behavior

If calculated mean value is different from "Donchian Channels 50 Mean" column value from spy_with_don50.txt file, test ComparesAgainstExternalData should fail which is not the case currently.

Actual Behavior

Change values in spy_with_don50.txt file from

Date,Open,High,Low,Close,Donchian Channels 50 Top,Donchian Channels 50 Bottom,Donchian Channels 50 Mean
3/15/2013 12:00:00 AM,155.85,156.04,155.31,155.83,156.04,155.31,155.675

to

Date,Open,High,Low,Close,Donchian Channels 50 Top,Donchian Channels 50 Bottom,Donchian Channels 50 Mean
3/15/2013 12:00:00 AM,155.85,156.04,155.31,155.83,156.04,155.31,999155.675

run DonchianChannelTests... it should fail... but doesn't

Potential Solution

Consider something like #8162 for indicators with several outputs ie give an array of columns to read (from reference data) and an array of assertion functions.

Reproducing the Problem

see previously

System Information
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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with DonchianChannelTests and the spy_with_don50.txt reference data, especially the ComparesAgainstExternalData test. Run the DonchianChannelTests after changing the Donchian Channels 50 Mean value to confirm the current test still passes. Done means the test detects a mismatched mean value and fails appropriately.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.