Comments (4)
Hi @saroun74 ,
The implementation of ROC (Rate Of Change) is different than your link, but it's right. The result is the same if you use:
close / close.shift(r1) - 1
or
(close - close.shift(r1)) / close.shift(r1)
So, I think we can change the implementation from:
rocma1 = (close / close.shift(r1) - 1).rolling(n1).mean()
rocma2 = (close / close.shift(r2) - 1).rolling(n2).mean()
rocma3 = (close / close.shift(r3) - 1).rolling(n3).mean()
rocma4 = (close / close.shift(r4) - 1).rolling(n4).mean()
to:
rocma1 = ((close - close.shift(r1)) / close.shift(r1)).rolling(n1).mean()
rocma2 = ((close - close.shift(r2)) / close.shift(r2)).rolling(n2).mean()
rocma3 = ((close - close.shift(r3)) / close.shift(r3)).rolling(n3).mean()
rocma4 = ((close - close.shift(r4)) / close.shift(r4)).rolling(n4).mean()
Perhaps the code is more clear in this way.
What do you think?
from ta.
I'm not mentioning the implementation of ROC.
This package returns the 'sig', but the sockcharts.com link guides 'kst - sig' as indicator.
from ta.
Ok, I understand your suggestion now.
So, I think we could get 3 indicators: KST, KST Signal, and KST - KST Signal.
What do you think?
from ta.
Library updated to new version 0.1.5.
Now, we get 3 indicators from KST: KST, KST Signal, and KST - KST Signal.
from ta.
Related Issues (20)
- Default window
- MACD errors HOT 1
- volume_price_trend is completly wrong HOT 2
- requesting two indicators HOT 1
- Confusion about Force Index HOT 1
- Add parameter "exclude_ta_features" from add_all_ta_features.
- Why does Bollinger Bands use ddof=0 instead of the default ddof=1? HOT 1
- FutureWarning (with pandas 1.5.1) HOT 1
- ADXIndicator.adx_pos / adx_neg head assertion failed
- AroonIndicator from trend.py based on inadequate input HOT 2
- Bollinger Band data series - something is off HOT 1
- Feature Request: Support incremental computation
- calculate daily return will use future infomation HOT 3
- ADX indicator on stockcharts is wrong (and therefore, it's implementation here too, I guess) HOT 1
- RSIIndicator: Value Error HOT 1
- add_all_ta_features not installing due to bug on OnBalanceVolumeIndicator
- Issue with ADXIndicator interacting with numpy HOT 1
- FutureWarning HOT 1
- not compatible with python 3.12? HOT 1
- Can't install ta with Anaconda on windows
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ta.