Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
How to identify stocks with the highest fluctuation but steadiest average?

Lets say I have five stocks, or better yet, selected a universe of stocks. How do identify the stock with the highest fluctuation but steadiest average, ie. a stock that goes from .19 .21 c multiple times a day. Also how do I find a stock that has the aforementioned qualities but is closest to the lowest price in n amount of hours?

thanks

4 responses

Hi Aidan,

Maybe a batch_transform to calculate the volatility on a rolling basis, and compare that to a moving average? Maybe "steadiness" could be defined as the relative volatility of two moving averages?

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

Can you further explain, especially the two moving averages part?

I thought you might calculate a short moving average, say 30 days, and a longer one, maybe 60 days. Then you could look at the spread between them, and how volatile that spread is.

Hello Aiden,

Hmm...you might want to look into a test for stationarity. If I understand correctly, you are interested in identifying stocks with stationary price time series, and then finding the ones that have the highest variability (e.g. standard deviation).

With a quick google search, I found http://www.cas.usf.edu/~cconnor/geolsoc/html/chapter11.pdf.

Grant