Is there any effect in which day of the week you buy or sell? (WeekDay = )

Whycliffes,

This is an interesting article that discuss the best time of the day and best time of the week to buy and sell stocks.

Regards
James

I tried the recommendations to sell Friday and buy Monday. But that did not seem to improve the results.

The results went from 64 til 53.

The rules are:
Buy: MedianDailyTot(91)>( 150* 1000) and WeekDay = 2

Sell: RankPos>50 and WeekDay = 6

Whycliffes,

I think buy on Mon and sell on Fri (that is recommended in the article) is just a general rule that probably works in a lof of cases.

This is not an exact science and the final performance depends on a lof of other factors that are used in the individual strategy.

It is good to know that you tested it out and Mon rebalancing works better for you.

Regards
James

If you buy or sell Friday based on over-the-night updated fundamentals in P123’s database, can you backtest that?

So in the sim someone might backtest trading Friday based on Monday’s ranking data (which is what is available in a sim), when in real life you would have an overnight update Friday morning for a live port— including any announcements or analyst updates. And someone might conclude that Monday is best day to trade at P123 based on that sim? Assume the having fresh data might not be a factor.?

Just trying to understand what conclusions anyone is drawing based on the sim or if I am missing something.

For me personally trading Friday based on over- the- night updates wins hands down over any other day for live ports.

What would really happen on a Friday rebalance is something that I did not think could be tested at P123 using a sim. If I am wrong I would love to be shown that I am wrong and would love to learn how to do that.

Jim

In reality, if you are dealing with low liquidity stocks, you will be buying and selling several days each week. As I have mentioned before, I use the excellent built in P123/Interactive Broker, VWAP, semi-auto link. It keeps track of unfilled orders, which has become more numerous as I put more money into it. As a result I find myself trading 2 or 3 days a week, which is to say I push a few buttons in the P123 interface 2 or 3 times a week. Its glorious if you want to do other things besides sitting in front of a computer all day. It also means my portfolio will not be exactly like my sim, which always trades on Monday.

Some time ago, I suggested an option for P123 sims to buy at the open, and sell at the close, which would better enable this Monday buy and Friday sell idea, but it was never implemented…

Do I understand correctly that you only buy and sell on Friday?

Is there a reason to buy Friday, or have you backtested this approach in any way?

What surprised me was that on every simulation I ran, it seemed that Monday always ended up being the best day. This may indicate that the system is to optimised or that there is something wrong with the rules.

The rules are:
Buy: MedianDailyTot(91)>( 150* 1000) and WeekDay = 2
Sell: RankPos>50 and WeekDay = 6

TL;DR: it seems I am doing is better with my style and my ports compared to just rebalancing on Monday each week. By that i mean, rebalancing each day (including Friday) rather than continuing to buy or sell during the week on Monday’s data gives me better returns. I think that is mathematically provable with my ports. And it makes sense that it might work that way as one might rationally consider that more recent data could help at times.

My point is my Friday sim does poorly because it uses Monday’s data for the rebalance (5 day old data) and not Friday’s data. The Monday sim has the advantage of using data that would have been uploaded into P123 the night before.

My Friday sim doing poorly (and my Friday sim does indeed perform poorly) due to that fact that it is using 5-day-old data and has nothing to say about the day-of-the-week-effect. My Friday sim does portly while my port does well.

I only buy and sell on Friday for my Friday live port, yes.

But I also have a Monday port (rebalanced only on Mondays) and Tuesday port (rebalanced on Tuesdays only ) a Wednesday port (rebalanced on Wednesdays only) a Thursdays port (rebalanced only on Thursdays only), I have already discussed my Friday port rebalances.

My Friday live port is nothing like my sim (with regard to holdings or returns). The sim is not an accurate backtest of my port for the reasons In my first post and above in this post.

For me Friday is the best port of all them (while the sim does poorly). One reason that when the AI/ML is full rolled out I would like to be able to rebalance on Fridays easily.

One way to deal with liquidity problems like that would be to run 5 ports that are 1/5th the size of the a larger port that takes several days to rebalance because of liquidity concerns. The five ports would spaced out over the week (a port for each day of the trading week).

Personally, I would finish the rebalance each day by the close. Hopeing the next day would be better (assuming the rebalance the next day even includes that stock after a large price movement that made it difficult tp fill the entire order). But there would be other rational ways to dea with that (none quite as good in my opinion).

Not only is each buy-order 1/5 the size allowing you to move in or out of a position gradually, but you are no longer chasing a stock that had a bad announcement, a change in analysis opinions or had a price change large enough to have a significant effect on the value factors. A large price change would probably affect every value factor wouldn’t it?

BTW, a designer (P123) could run the same port 5 days a week and ethically increase the number of subscribers allowed (without liquidity concerns) by a factor, perhaps, of 3, 4 or even 5.

TL;DR: I think this is an accurate analogy that should simplify this discussion. When making a decision as to whether to enter an intersect it dose not hurt, at least, to have live information on the traffic light (red or green) or the traffic patterns (what other cars are doing). I am not sure how old the information can be to work for me at a traffic light but I suggest there is a limit. A limit for all information really including stock information.

For gaming microsecond latencies are an extremely serious problem addressed by programmers. If the latency reaches a second (for headphones or with another player in a remotet location) the game is useless. If there is some game/theory and high-frequency trading none of this should be anything to not consider seriously. Each port will have its own latency beyond which it is useless.

This is a real problem Apple has accessed with gaming on its computers. Decreasing the latency with AirPods and acknowledging that Beats headphones are seldom adequate for gaming. For casual-gaming a latency of 100 -150 milliseconds is adequate but hardcore games demand better. It was also a consideration in updrading to the Bluetooth 5.0 standard.

Anyway, it is my believe that 5 days is not so good for some stock ports but this is not a new problem. High-frequency traders even put servers next to the exchange using fiber-optics to mitigate the limits of the speed of light (and electric currents).

None of this should be new or controversial to anyone

Jim

Dear all,

Since Jim mentioned high frequency trading (HFT) in his post, I thought it maybe a good idea to provide this link (including high,mid and low frequency trading) in layman terms for reference.

Regards
James

Is it your point that the latest and most complete data that is available is the one from Saturday, “full load”?

For SIMS yes. Absolutely. For the sim, no doubt about it. A sim is different than a port and a Friday port cannot be backtested AS A SIM. Full stop.

Your screen-shot is for a LIVE PORT rebalance today correct? Which is different than what a sim is doing is my only point. You cannot test what a Friday port would have done with a sim using the data P123 provides now.

I would hope @marco, @Riki37 or @yuvaltaylor would correct me if I am wrong and help you if I am right. I think it makes a SERIOUS difference with real investing and real money either way.

Jim

I did not actually know that the simulation only had access to Monday’s data and the live portfolio to the daily data.

What about screener?

1 Like

I think I found the answer here: How does daily rebalancing on a screen backtest work? - #2 by Jrinne

1 Like

This is not quite correct. Both the simulation and the live strategy have access to daily data. Buy and sell rules will work with both. The difference is in ranking. Ranking in backtesting is only done once a week, not daily. So Monday’s trades will reflect the weekend ranking, but so will trades for the rest of the week. Friday’s trades will reflect Friday’s buy and sell rules but the previous weekend’s ranks. For example, let’s say you have the following sell rule: rank < 95 or pr4w%chg > 50. On Friday, the first part of that rule will look at the rank five days ago and the second will look at Thursday’s closing price. The same thing applies to the screener. On the other hand, if you’re trading live, whether you use a screen or a live strategy, you can access the current ranking at any time, and it will be up-to-date.

2 Likes

Thank you. Very clear.

Is there any demand at Portfolio123 to update the ranking daily?

The reason I ask is that I’ve experienced the effects that Whycliffes explained where in SIM, Mondays always perform better, and I believe in my systems is due in part to short-term (e.g., 5-day) pullbacks which are updated over the weekend, ensuring that Monday is the best trading day.

What would be interesting is to see if short term mean reversion daily could be captured within a Ranking System. I would very much appreciate it if someone has played around with this concept and experienced success and could list that here, ranking daily for short-term mean reversion.

Thoughts?

You could set up a screen backtest using FRank for some short-term mean reversion work and run it with a daily rebalance. You could also use a simulation with buy and sell rules that are not based on the ranking system, allowing it to more or less bypass ranking, and then run that with a daily rebalance. It’s not a perfect solution, but it might provide you with some clues about the effectiveness of using short-term mean reversion on a daily basis. Remember that simulations and screen backtests that are rebalanced daily still follow buy and sell rules every day. The only thing that runs weekly is ranking.

Well I’m flabbergasted. I pulled short-term MR out of my Ranking System … and the performance… Improved?!?.. ::Sigh::… I then played around with your second suggestion of applying short-term MR into the SS rule sets (daily) in the buy and sell with many different combinations. I never did better than the original ranking system… so out with short term MR I guess…

However, the system still did better on Mondays than on any other day of the week, but evaluating daily did better than weekly for rebalance. Hence, something else in the ranking system (e.g., Price Momentum or Volume) is making some sort of difference daily. But I’m still lost as to why Mondays…

I'm just making sure I'm 100% clear. So the fundamental data used for ranking is available daily, but only in the screener and a live rebalance request. Otherwise It's a weekend update.

thx

The fundamental data is available and up to date even on a weekday. If you run a ranking system today it'll reflect the latest fundamentals.

The ranking in backtests is performed only on the weekends. Other than ranking, backtests use daily values for prices and weekly values for fundamentals. Fundamentals are weekly historically and daily on the current date.

1 Like