Bad fills? Buy close and sell open?

I saw this: Transaction Costs Of Trading Stocks: A Primer For Retail Investors | Seeking Alpha and this:

«I also make a practice of letting a trade go if the price moves away from me by a huge amount. I sometimes place the order again the next day. But I don’t think this is a wise move if you’re not going to reconsider making the trade in the first place.” -… “But I’d be grateful for tips if anyone can show that they can consistently get good fills.”

I did a test with 25 stocks on United States (Primary), 15 years, and with MedianDailyTot(120)>( 70*1000) and StaleStmt = 0

Witch gave me with:

“Previos close”:
image

«Next close»:
image

«Next open»:
image

”Next high low”:
image

I don’t know if this confirms:

«Lastly, some studies have suggested that buy orders should be placed near the end of the trading day and sell orders near the beginning. I have not come to a firm conclusion about this, but given that overnight returns dwarf the returns during the trading day, it makes sense to me.”

What I see is that bad fills can hurt returns reasonably hard.

Does anyone have a recommendation on how to get better fills?

Is there any way of testing sell at the open and buy at the close?

https://www.quantifiedstrategies.com/what-trading-hour-is-the-best/
https://www.quantifiedstrategies.com/overnight-trading/#Is_day_trading_worth_it

I do not know about much of this.

But one theory about the weekend effect says it happens because the shorts close out some of their positions near or at the close on Fridays.

I think, specifically on Friday, if you have cash in your account or you are trading on margin you want to buy at the open and sell at the close (when the shorts are closing positions and giving a bit of a short squeeze).

Jim

I do not recommend using the settings “previous close” or “next open” with simulations. It is very difficult to actually buy and sell stocks at those prices. Simulations using those settings are not very realistic. Even a “market on open” order is subject to partial fills and will create some market impact.

As far as testing sell at the open and buy at the close, it’s not easy. Here’s a suggestion. Run two very high-turnover simulations, one using market open and one using market close, with exactly the same transactions. Use WeekDay = 5 in all your buy and sell rules to avoid the immediacy of Monday open prices. Download the transaction records for both simulations. If you add up the buy transactions and sell transactions for each, is one better than the other? Do this with a number of different simulations, and maybe you’ll have an answer.

Thank you! I will try to run a test. But how do I force the system to “exactly the same transactions”?

Found a solution. :slight_smile:

I did a test with my ranking system on the Easy US universe and my own European universe. It yielded around 44,000 transactions in 15 years.
On average, the price between “next open” and “next close” actually rises, in almost half of the sell transactions or half of the buy transactions.
Surprisingly, the price from “previous close” will actually be higher either then “next close” or “next open” in 14323 out of a total of 22025 purchase transactions.
There is clearly an overnight effect between the previous close and the next open, especially in Europe.

Conclusion: 1. There is a clear overnight effect 2. There is nothing to suggest that on average you get a much better price when “Sell on Open” and “buy on Close” 3. It also appears that in over half of purchase transactions, “Previous Close” is higher than “Next Close” or “Next Open”.

I’ll attach the spreadsheet if someone wants to test hypotheses or check the numbers

EU:
image

US (easy to trade)

image

It may be that the question fits better in this thread. I also posed it here: The empire strikes back! - #80 by Whycliffes

But is it possible with the same method as above (or another method), to find the probability that a limit order placed on the day of the signal will be filled the following week 1-5% lower? Can I download the hig+low price for the next 5 days after the buy signal, just to check if i can get a better fill?