Back to Community
Custom Factor or TA Lib function to screen universe by High/Low range %

Is there a Custom Factor or technical function that I can use in Pipeline to filter stocks by High/Low % range and return the frequency by window_length?


4 responses

Fourier Transform

Concept in visualisation an animation.

Fourier Transform I and Fourier Transform II an introduction.

Programming, Analysis and Visualization with Python.

I watched the vid at that first link, thanks very much.
Here's where folks are looking to apply to the stock market, for example 'Use Fourier Analysis to Find the Dominant Cycle '

MATLAB has Probably can replicate in Python. This would give you continuous functions representing the point-in-time high and low, which could then be processed further.

Hi Karl -

One approach would be to use the daily HL bar data in Pipeline. For each stock, every day, you could compute:


Then set a threshold for this normalized range. If the threshold is exceeded on a given day, the indicator is 1, otherwise it is zero. Then, over a trailing window, for each stock, simple add the indicators (you could also normalize by the size of the trailing window). This would give some gross measure of the frequency of variation and the volatility. You could also incorporate the volume, to put more weight on days that are higher volume.

You might have better luck with this sort of cycle counting technique than a Fourier transform.