My Buy and Sell Rules

Good morning Dan:

I’m rebalancing my portfolio and got a Sell on one of the stocks. The reason: Buy/Sell Difference. The rebalance didn’t replace thios sell order with a corresponding buy.

Any thoughts.

Judy G

judyg@mechanicalwoman.com

Hi Denny,

I would like to ask how to search for higher values of “Gain/Stk/Day” in Sims/Ports ?

Happy Trading
isam

Hi Isam,

The answer you require is contained on page 1 of this thread, in Denny’s post. Re-read his post and put your thinking cap on; and there, as far as I understand your question, you will likely find the answer.

:slight_smile:

Isam,

There is no way to search the public Sims or Ports for high values of Gain/Stock/Day.
You can narrow your search by adding a high value of Sortino Ratio such as 4.0 to your search criteria. Sims and Ports that have a high Gain/Stock/Day inevitably also have a high Sortino Ratio. Then you can calculate the Gain/Stock/Day from the Statistics; Trading page.

I have a Feature request to add the Gain/Stk/Day calculation to the Summery page. You can vote for it here:

http://www.portfolio123.com/feature_request.jsp?poll=249

Denny :sunglasses:

Hi Denny & jtbaccarat,

Thanks a lot for your highlight.

isam

Bumping this thread for beliving it can be extremely useful. Thank you very much for sharing!

Denny:

 Thanks for sharing so much. It's appreciated.

Best,

Bill

16 Years later… Thank you Denny.

Thank you, Mr. @AndorraInvestor , sir, for bringing this thread to the present and thus to my attention. I had been getting discouraged over the months because of my lack of progress and had considered leaving Portfolio 123. But in the past few weeks a lot of things have happened to make me think there is hope for me yet!

Thanks, again!

Cary

Thank you for sharing!!
It would be interesting if you could publish some screenshots of the strategy from the simulator, just to see how it does in terms of turnover, overall winners and annual returns?
And do you sometimes run into problems with your buy when using “AvgDailyTot(20)"? I see that sometimes stocks -that are almost non-buyable- can have very high volumes for short periods of time. How about Mediandailytot(120)>( 70* 1000) and StaleStmt = 0

I added the buy and sell rules indiscriminately in my test system with United States (Primary), but it did not give much better results in the period 06-22:


Could bee to much into cash:

Buy : Rank > 98 and Price > 1 and MktCap > 50 & MktCap < 500 and AvgDailyTot(20) > 100000 and Pr4W%ChgInd > 0
Sell : Rank < 99 or PctFromHi < -15 and GainPct < BenchPct & NoDays > 30 or Pr4W%Chg /20 < 0.1 & NoDays > 20

Original system, but with the buy AvgDailyTot(20) > 100000 and sell Rank < 99

I will keep on testing different settings :slight_smile: And again, thank you for sharing!

Thanks for sharing @Whycliffes !!
Seeing the very high annual turnover from your screenshots, wouldn’t it be more realistic to generate the simulation with VARIABLE SLIPPAGE?

I would be careful with too many rules. As you can see from your own backtests, it increases the annual turnover.
Also, rules like PctFromHi < -15 don’t make much sense in a small- to micro-cap universe as these stocks are very volatile and you might miss an upward trend following a 15-20% drawdown.
Most of my models only have one main sell rule (Rank < 98) and that allows me to keep the turnover to less than 400% per year.
hth,
Florian

Ive generally never backtested a successful stop loss strategy in terms of maximizing returns, but that said I’m of a firm belief that this game is as much about behavior as it is modeling. Being able to stomach volatility is as much of a gift in this game as any computational insights. So I do see value in getting out of a losing position if helps you put it behind you and stick to your model. I don’t have stop losses systematically enforced in my model, but I would be lying if I said I didn’t lose hope on a few in a 30% drawdown that seemed like lost causes along the way of a multi-year journey. The good news is there’s generally always a new stock with a 99+ ranking to get into that could be the next triple bagger. It’s become like adhering to a diet for me. I allow myself some cheat days here and there for the greater good of sticking to the diet over the long term.

Thanks! Yes, I completely agree. Unfortunately, until now I haven’t found much rules that give better results for the simulations I’ve run, besides rank<x

Are you already using PiotFScore > 1 ?

Hey @DennyHalwes!
I was just curious if after 16 years from your post you are still using the same Gain/Stock/Day metric, or you had evolved it or perfected another one. And If you could share a bit on your conclusions.

THANKS, and please excuse my cheeky curiosity.

All,

I may be a bit too late to post my own findings to the DennyHakwes’s buy and sell rules found in post #1, as I had to go out of town for a week. But here is I learned:

I decided to backtest his rules for 01/02/2002 (the earliest I can) to 01/01/2007 using the Core:Value ranking system (as it performs better with tighter Rank sell rules). Here is what I found:

But when I ran the simulation from 01/-2/2002 to present (12/13/2022) I got quite a bit different story:

So if my test was valid, then this is a prime example of a trading system that lost whatever edge it may have had.

Comments?

Cary

Thanks for posting Cary.

On the sims you shared, there are very few positions. In my experience, 5 position sims can test well (and live) for brief periods, but over the long term can fall apart. That said, I understand Denny did quite well with these back in the day.

Another test would be to check the Core: Value system without the buy/sell rules and compare performance, then you can see the impact of the buy/sell rules. I would also test with say 15-25 stocks as well. Could be the rules are better suited to growth, or quality. Or try a more balanced ranking system such as “Core: Combination”.

FWIW, I played with some of these buy/sell rules in my own sims and ports, but couldn’t find any notable improvement. That said, the concept of return/stock/day is interesting, I’ll need to delve into this further.

Cheers,
Ryan

Thank you, Mr. @rtelford, sir for your comments!

Regarding the number of stocks in the sim, back when I first started and was using only 5 stocks in my sim tests, you folks kindly pointed out the problem with using only 5 stocks in a sim, in that it can provide misleading results and that it would be better to use at least 25 stocks and maybe even 50 or 100 stocks. I learned my lesson and now I often use 25 minimum and often 50 stocks in a sim. In this case I was using 25 stocks in the sim. The reason that only 5 or 6 stocks were in the sim at the conclusion of each test was entirely due to the buy and sell rules.

Regarding your proposal to try the sim without the buy and sell rules, and with the Core : Combination ranking system, here are my results:

Core : Value with NO buy or sell rules, 25 stock portfolio, Easy-to-trade US universe, first for 01/01/2002 - 01/01/2007"

Now for 01/01/2002 - 12/13/2022:

Not great, no worse and even better than with all of the rules.

Now for the Core : Combination ranking system with the rules back on. First. 01/01/2007. Results worse than Core:Value:

Now for 01/01/2002 - 12/13/2022:

Results are similar to Core : Value in poor performance, but less volatile.

So unless @DennyHalwes has a special ranking system, it would seem that the rules he derived and posted on Oct 16, 2006 have not aged well. And from what I understand, that can happen.

If anyone else has any comments, please post them. I am still learning!

Cary

Interesting Cary. Yes, rules/systems etc can lose their edge over time, depending on how the models were trained/what regimes etc.

My only other suggestion would be to find some of Denny’s old public ranking systems/sims in the search. Maybe the rules work with his specific factors.

Otherwise, good discussions and concepts!

Cheers,
Ryan