Screen for stocks at all time high

High, I am new here.

Could someone show me how to screen for a list of stocks at all-time-high at a specified date and also with a ROIC that is greater than 20% and Average sales growth of the past 3 years at 20% or more?

Mucha appreciated!

Thanks.

Welcome, Synchro!

I made one for you in the following screen:

https://www.portfolio123.com/app/screen/summary/307384?mt=1.

To adjust the date: adjust the 'As of' date in the top right under 'Settings'.

I noticed there are not that many companies that qualify your suggested screening criteria through time. Another way to go about it would be to put the three criteria you suggested in a ranking system. Let me know if you need any more help turning your ideas into tests!

Best,

Victor

Thank you so much. This would get me started quicken on the road to learning how to write screens. Much appreciated!

1 Like

Hi Victor, I am trying to do a backtest of this screen, but what I want is to just keep accumulating and buy-and-hold the stocks (say $500 a stock, but only the new ones that shows up on the screen, not ones that have previously shown up on the screen) that shows up on the screen from 2010 (what I am allowed to go back) to now. Is there a way to do that?

Thanks.

Essentially what I want to simulate is a “coffee-can” investment approach (buy-and-never-sell) with this screen. My idea is that the 100-baggers are bound to show up at ATH at some point in the past, I will just keep collecting these stocks. Some of them will die along the way, but the 100-baggers in theory should make up more than those losses

Our backtesting does not allow one to make deposits and withdrawals during the test. What you want to simulate involves making additional deposits as new stocks enter the picture, so it's not a good fit for us. If you can think of a strategy that would not involve deposits and withdrawals, it can probably be run in a simulation.

Im not sure if Synchro is referring to deposits and withdrawals. I think he wants an expanding portfolio where each time a potential 100 bagger enters the scene (which he defined by the screen in the post), it is simply added to the portfolio until oblivion.

I was thinking this can be roughly done by at each moment in time checking whether a stock has ever met the criteria of the first post in its past. Havent implemented it in a screen yet.

In the backtest, or simulation (if you could point me the way how it can be done, that would be much appreciated, thanks), I will never withdraw, but only add an equal amount to a new stock showing up in such a screen. Some stocks may repeatedly showing up if they keep making ATH month in and month out, those I will ignore once I have already invested in it before,

If Portfolio123 can't do this thing I am envisioning, I will have to use Portfolio123 to extract the week-by-week (or day-by-day, which sounds horribly laborious) screens results, and then build an elaborate and gigantic spreadsheet to collect the portfolio results. So obviously I am trying avoid going that route.

Plus this manual approach won't allow me to automate the optimization of the parameters by keep re-running the simulation. For example, I have no idea whether ROIC% > 20% and 3yrAvgSalesGrowth > 20% are the optimal parameters for the screen criteria

I think I would try something like this:

https://www.portfolio123.com/app/screen/summary/307456?st=0&mt=1

That adds the line:

FHistMax("Close(0)= HighVal(2500)", 260, 2) and FHistMax("(OpIncTTM *(1-(TxRate%TTM/100)) / (DbtLTQ+EqTotQ)) * 100 > 20", 260, 2) and FHistMax("SalesGr%3Y > 20", 260, 2),

which basically says: find me - not only stocks that meet the criteria, but also - stocks that met the criteria in the last 10 years (if I would have checked whether they met them every two weeks in the past).

Think that should already be a bit closer to what you are looking for.

Edit: actually, what this does is not what you are looking for. It looks for stocks that met the individual criteria at different points in time (not all three criteria at the same time).

Edit2: You want to find stocks that met the three criteria at the same time. That should be the following:

FHistMax("(Close(0)= HighVal(2500)) and ((OpIncTTM *(1-(TxRate%TTM/100)) / (DbtLTQ+EqTotQ)) * 100 > 20) and (SalesGr%3Y > 20)", 260, 2).

This is interesting approach from tax perspective by deferring CGT liabilities (excluding dividend income) if you live in a country when CGT is based on realized returrns. However, CAGR (before tax) are likely to be very disappointing in comparison to more frequent rebalancing.

The only way to accomplish this task in automated way is to:

  • download p123 data
  • create your own backtester in python (it should not be very complicated)
  • once you are happy with the parameters and historical results, then you can screen for stocks using p123 screener app.

This is getting there. Let me study what you programmed.

Much appreciated.

Hi Victor, I was able to create a large log file that contains all the buys and sells from 2010 to now.

Is there a calculated field that would allow me to get the total return (splits + dividends) for the stock that show up in the screen from the as of screen-run date to now? Thanks.

The column headed "Pct" shows that return; the price in the "Start" field is adjusted for dividends and splits.