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

Add Kaufman Adaptive Moving Average #86

Merged
merged 13 commits into from
Nov 20, 2021
Merged

Add Kaufman Adaptive Moving Average #86

merged 13 commits into from
Nov 20, 2021

Conversation

jhmenke
Copy link
Contributor

@jhmenke jhmenke commented Oct 28, 2021

The indicator was tested against the reference investopedia article. It has more settings than other indicators, so the name could be parsed into five parts now.

close_10_kama_2_30

has three settings:

  • 10 is the number of periods for the Efficiency Ratio (ER).
  • 2 is the number of periods for the fastest EMA constant.
  • 30 is the number of periods for the slowest EMA constant.

To make sure regular indicators are parsed as usual, only those within the tuple MULTI_SPLIT_INDICATORS will be parsed into five parts.

@jhmenke
Copy link
Contributor Author

jhmenke commented Oct 28, 2021

It seems that the only issue is missing flake8 formatting. Sorry i don't have that installed.

@jealous
Copy link
Owner

jealous commented Oct 30, 2021

Thanks for the PR.
The change Looks fine to me. Could you please address following flake8 error so that we could pass the build and merge it?

stockstats.py:928:80: E501 line too long (123 > 79 characters)
stockstats.py:943:80: E501 line too long (84 > 79 characters)
stockstats.py:946:45: E225 missing whitespace around operator
stockstats.py:946:46: E202 whitespace before ')'
stockstats.py:947:80: E501 line too long (120 > 79 characters)
stockstats.py:951:80: E501 line too long (133 > 79 characters)
stockstats.py:966:80: E501 line too long (86 > 79 characters)
stockstats.py:1089:80: E501 line too long (80 > 79 characters)
test.py:568:80: E501 line too long (101 > 79 characters)
test.py:569:80: E501 line too long (101 > 79 characters)
test.py:570:80: E501 line too long (99 > 79 characters)

@codecov-commenter
Copy link

codecov-commenter commented Nov 2, 2021

Codecov Report

Merging #86 (c2c4ee4) into master (e6123f6) will increase coverage by 0.26%.
The diff coverage is 98.03%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #86      +/-   ##
==========================================
+ Coverage   95.12%   95.39%   +0.26%     
==========================================
  Files           3        3              
  Lines        1087     1129      +42     
==========================================
+ Hits         1034     1077      +43     
+ Misses         53       52       -1     
Impacted Files Coverage Δ
stockstats.py 96.55% <97.22%> (+0.33%) ⬆️
test.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e6123f6...c2c4ee4. Read the comment docs.

@jhmenke
Copy link
Contributor Author

jhmenke commented Nov 2, 2021

We should be good now. It is unclear to me why the Python 2.7 test fails. I specifically tested it with a new 2.7 environment on my machine and the test passed without issue.

@jealous
Copy link
Owner

jealous commented Nov 2, 2021

It' OK. Let me deal with it when I have time. I will merge this PR when I have the solution.
Thanks for the contribution.

@jealous jealous merged commit e8b7abf into jealous:master Nov 20, 2021
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

Successfully merging this pull request may close these issues.

None yet

3 participants