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

Bug fix for the WMA operator #1674

Closed
wants to merge 1 commit into from
Closed

Bug fix for the WMA operator #1674

wants to merge 1 commit into from

Conversation

dmnsn7
Copy link

@dmnsn7 dmnsn7 commented Oct 21, 2023

Description

A quick fix for the WMA operator.

The bug can be reproduced by simply running some code (slightly modified) from the examples/tutorial/detailed_workflow.ipynb.

In [ ]:
df = D.features(
    ["SH601216"],
    ["$open", "WMA($open,3)", "WMA($open,3)*3"],
    start_time="2020-05-01",
    end_time="2020-05-31",
)
print(df)

Out [ ]:
                          $open  WMA($open,3)  WMA($open,3)*3
instrument datetime                                          
SH601216   2020-05-06  1.300132      0.431863        1.295588
           2020-05-07  1.318316      0.436666        1.309997
           2020-05-08  1.309334      0.436931        1.310794
           2020-05-11  1.313896      0.437704        1.313112
           2020-05-12  1.309334      0.436952        1.310855
           2020-05-13  1.309334      0.436698        1.310095
           2020-05-14  1.304933      0.435711        1.307133
           2020-05-15  1.295523      0.433654        1.300961
           2020-05-18  1.291245      0.431651        1.294952
           2020-05-19  1.295807      0.431413        1.294239
           2020-05-20  1.314077      0.434727        1.304182
           2020-05-21  1.359704      0.444615        1.333846
           2020-05-22  1.350579      0.449179        1.347537
           2020-05-25  1.363965      0.452931        1.358793
           2020-05-26  1.358994      0.453083        1.359248
           2020-05-27  1.307209      0.444643        1.333930
           2020-05-28  1.276208      0.433446        1.300339
           2020-05-29  1.286643      0.428864        1.286592

Motivation and Context

Omitted.

How Has This Been Tested?

Just let it simply align with the implementation of the EMA operator.

Screenshots of Test Results (if appropriate):

Omitted.

Types of changes

  • Fix bugs
  • Add new feature
  • Update documentation

@github-actions github-actions bot added the waiting for triage Cannot auto-triage, wait for triage. label Oct 21, 2023
@dmnsn7 dmnsn7 closed this by deleting the head repository Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for triage Cannot auto-triage, wait for triage.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant