question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SSF indicator computation

See original GitHub issue

Hi @twopirllc,

I’m reviewing the computation of the SSF indicator, and it behaves strangely at the begining of the input data.

Let’s compute and plot the SSF with a length of 10, using :

df.ta.ssf(length=10, poles=2, append=True, col_names=('SSF',))

image That’s strange !

Skipping the first 10 points when plotting gives : image which is (almost) what we want.

I beleive this behavior comes from this part in the computation :

    for i in range(0, m):
        ssf.iloc[i] = c1 * close.iloc[i] + b1 * ssf.iloc[i - 1] + a1 * ssf.iloc[i - 2]

Aren’t ssf.iloc[i - 1] and ssf.iloc[i - 2] undefined when i<2 ? No error is raised, so I’m confused. More generaly, I think that the SSF series should countain NaNs for i<length.

Could you please take a look ?

Thanks!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
DrPaprikaacommented, Aug 16, 2021

Looks good to me ! Thanks @twopirllc

1reaction
twopirllccommented, Aug 11, 2021

@DrPaprikaa,

Sounds good! No worries.

  • length > poles
  • for i in range(poles, m)
  • ssf.iloc[:length] = npNaN

KJ

Read more comments on GitHub >

github_iconTop Results From Across the Web

SSF — Indicators and Signals - TradingView
This indicator was originally developed by John F. Ehlers (see his book `Cybernetic Analysis for Stocks and Futures`, Chapter 13: `Super Smoothers`).
Read more >
Standardized scoring functions (SSF) types to normalize soil ...
quantify relationships between soil quality indicators and soil functions, ... selecting soil indicators and calculating overall soil health score).
Read more >
Appendix B – SSF Examples
Calculating Relative Selection Strength (RSS) for Two Locations. Calculating the relative use of location s1 versus location ...
Read more >
Viewing a thread - Ehlers SSF Indicator - TradeTight Forum
I'm creating this thread to provide a "gussied-up" version of the SSF, that uses the same core calculations. Many thanks, Mel, for the...
Read more >
Validation of Risk-Based Performance Indicators - OSTI.gov
SSF indicators and provided much faster response. ... (based on the number of system trains) were used for calculating the unavaila bility indicator...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found