top of page
< Back

Trading costs on the stock market in practice

Miniatura.jpg

CREATED BY

May 7, 2025

MICHAŁ ZAREMBA

Choosing a broker and transaction costs can be a real horror. I know this because I have used around 20 brokers in my career and I do not recommend the vast majority of them. At the same time, transaction costs are crucial for running a business based on algorithmic trading.

Trading costs on the stock market in practice

Fortunately, by choosing wisely, we have never had as easily accessible and cheap regulated brokerage services in the history of retail investors.


I want to clarify right away that I have no ties with the brokers mentioned in this article. I don't gain anything from referrals or sharing my views on them. My writing is purely based on personal experience and research for my own purposes.


This article comprehensively discusses the issue of transaction costs, including deep-spread research, from a practical perspective.


Ideal broker?


My expectations for the ideal broker operating in the stock market are:


  • must be regulated (FINRA)

  • my funds should be insured eg. by SPIC ($500k+ insurance)

  • should offer true 0% commission for users outside the US as well

  • uses true market spreads (no markups)

  • has low margin (borrowing money) costs

  • offers all products (stocks, ETFs) from the US

  • provides a free paper/demo account that accurately reflects real trading

  • has a well-functioning API and lightning-fast order execution in conjunction with my platform (I use Algocloud)

  • offers a user-friendly broker portal and ideal also a integration with TradingView

  • has a good manual, forum, and helpdesk (hopefully not needed at all)

In 2022, I thought that unfortunately such an ideal does not exist, working with many brokers, until ... I tried Alpaca and ... eureka! It turns out that you can meet all the above requirements at once. Since then, over the following months, I have been convinced that it was one of the best fundamental choices in my business.


Alpaca, however, also has its drawbacks

 

  • no mobile app, although I manage to handle a lot on mobile thanks to their responsive website

  • no stocks from outside the US (this is the biggest downside at the moment)


Because I like diversification, I also have several trading accounts with other brokers, including Etoro and IBKR, but for algorithmic trading Alpaca is currently my no.1. Therefore, forgive me that my research below will focus at the moment only on this broker. I recommend testing it. If you already have experience and the ability to compare, I think your opinions will be similar.


The importance of trading costs


Many novice traders — especially those outside the United States — underestimate how much costs can affect their bottom line. Even when a broker advertises “0 % commission,” real charges may appear as a wider spread (the difference between the bid and ask) padded with the broker’s own markup.


The goal of this article is to emphasize how strongly transaction costs shape trading performance. By managing these expenses consciously, you keep greater control over both capital and strategy.


Costs in algorithmic trading are of huge importance mainly due to the possible large number of transactions executed. Currently, I am executing around 10-50 trades per day on my accounts, so for example, with a commission of around $5 per trade (example costs for Tradestation users outside the USA), the monthly amounts for such operations can be quite high, and for smaller accounts, such a cost could blow up even the best short term strategies. Many experienced traders remember the times when opening and closing a stock position involved costs of even 20-100 USD, fortunately, those times are behind us and 0$ commision is a new standard.


How to limit the impact of costs


  • Choose a transparent broker. Examine the fee schedule, typical spread width, and any additional mark‑ups.

  • Trade on higher time frames. On a daily (D1) chart, the natural spread usually represents only a small fraction of the potential price move.

  • Avoid order types with unpredictable costs. Before entering the market, calculate what portion of your intended profit could be absorbed by fees, and adjust your position size or entry level to maintain a favorable risk‑to‑reward ratio.



What is the real spread on stocks and how to avoid paying it?


I had the opportunity to work for almost a year in a trading room, trading in day trading mode on stocks. During that time, I experienced how high market spreads can be on some stocks, especially in the first few minutes after the market opens. That's why I am sensitive to avoiding this unnecessary cost. Let's clarify that market spread, which is the difference between the current bid and ask prices, is a normal in the market. I am not referring to artificial spreads created by some brokers, as mentioned above.


I wouldn't be myself if I didn't delve into this topic in a more comprehensive way. In 2023, I conducted a detailed analysis of spreads using the Sierra Chart platform and NASDAQ TotalView US stock data (Level2 data) as a data source.


I completed a study that compared Alpaca spreads with Nasdaq stock market data. In every case I checked, the prices fully matched, showing that Alpaca does not manipulate spreads.


The second study focused on the pure market spread. It considered data for stocks belonging to the S&P500. In detailed research, I analyzed bid/ask prices of multiple tickers from this index every minute over a 30-day period in January-February 2023.


Here is an example table with recorded data:


The chart below shows the average spread for each minute over the next 30 days in the analyzed period. Here is an example spread for the IDXX ticker:


The spread behavior chart over time for most stocks looks very similar. At the beginning of the market (first 15 minutes), the spread is very high, then it decreases, only to increase significantly in the last 1-2 minutes of trading.


The size of the spread will of course vary between different stocks. For example, it will be completely different for AAPL (low relative spread) vs. BKNG (high relative spread), but the proportions of behavior over time are very similar for stocks.


Moving on to the details, the first 1.5 hours after the market opens for IDXX looks as follows:

Meanwhile, the last hour looked something like this:


I will not bore you with many examples of such spreads on different tickers. I would like it to remain in your awareness that entering a position with a market order at the beginning of the market will regularly result in catching a spread of even a few percent (!). Something like this cannot be predicted and assumed in backtests.


Practical solutions in constructing strategies


Solutions to the spread problem are very simple and effective. I use them in all of my strategies. I emphasize that these solutions apply to trading on a daily interval. I use the great features offered by Algocloud here.


  1. If you want to open a position at the beginning of the market - you can use a LIMIT order (preferably below the Open price), which will ensure that you do not pay the spread (the ASK price must reach your desired level, or you simply skip the transaction). Equally important, your backtest will be reliable in terms of entry prices (I confirmed this with a separate study using SQX).


  2. If you want to open a position with a MARKET order - pick the best the end of the market! Algocloud opens such positions about 5 minutes before the end of the session, during the period of the lowest spread throughout the day. I often prefer this type of order for liquid ETFs - although I also assume a slightly higher cost in the backtest.

  3. If you want to trade Breakout by using a STOP order (which is nothing more than triggering a MARKET order by the broker if the price reaches a certain level), then you can place your order away from the OPEN price to avoid getting caught too quickly in a market order, and thus in an unpredictable spread at the beginning of the market. This type of order in stocks is more advanced and requires higher transaction costs.

  4. When exiting positions - if they are based on rules, I only use a Market order ON BAR CLOSE. Of course, you can use SL or TP, but in this case, we are exposed to price gaps and sometimes at a high spread to the beginning of the market (more about SL and TP in stocks can be found here).


Volume vs. spread


Of course, the idea for potential defense against a high spread should be a filter that selects only stocks with high volume from the previous day. These frequently traded stocks should have a guaranteed low spread, right? I admit that I don't have reliable research in this area, but from my many observations, it seems that it's not so straightforward. I have often observed stocks with very high volumes and at the same time unnaturally high spreads. Honestly, I don't know what causes this, but it's probably more of a mix of volume and volatility rather than just volume itself. That's why I rely more on universal methods, as I write in the section above. A volume filter certainly won't hurt, but it may not be enough. However, it's always worth considering when looking for stocks outside the S&P500.



What transaction costs should I assume in backtests?


Every trader knows that transaction costs can make or break a strategy, but are you using accurate assumptions in your backtests? I analyze over 6,000 real and demo trades on Alpaca to reveal surprising insights into slippage and spreads. Plus, I share my optimized backtesting settings to ensure your strategies reflect reality. Check out the full analysis in the article.



Summary


In summary, choosing the right broker and understanding transaction costs are key elements to success in algorithmic trading. I hope my experiences in this area will be helpful to you. Remember, even the best strategy can be undermined by high fees, so I'm rooting for your good choices in this matter!


BONUS TIP! How to Make Money with Free Capital Every Night


A tip for you as a reward for reading this article to the end 🙂.


If at the end of the day you have some free capital and 3 minutes to manually execute a buy or sell operation, you can successfully buy BIL overnight for a free amount. BIL is an ETF that practically accrues interest on treasury bonds daily (at the time of writing the article, it was 5.3% annually). The next day, the purchase of new shares will be financed from the broker's free margin, and by the end of the day, you can potentially sell BIL to balance the lack of cash.


This buy/sell operation requires a few minutes once a day. Personally, I set an alarm 5 minutes before the market closes and take a quick look at the results and the operation on BIL. Certain profits generated from such a "deposit" can successfully cover the costs of the margin and other fees for platforms like Algocloud. I hope that in the future, Algocloud will allow for the automation of this operation.


BIL chart (taking into account dividends paid out once a month):

Attention! Don't be surprised that on the first day of each new month, the price of BIL drops by the amount of interest paid to you a few days later as a dividend.


Therefore, the chart of BIL without considering dividends looks like this:

Leverage this simple yet effective strategy to enhance your investment portfolio and make the most of your free capital every night.

BEST STRATEGIES

average rating is 4.7 out of 5

Volta Strategy

The Volta strategy uses a volume-based indicator as its foundation, which distinguishes the strategy profile from most typical reversal strategies. It is a mean reversion strategy that waits for a quick pullback in an uptrend.

average rating is 4.6 out of 5

Stock Monthly Mover Strategy

The strategy is based on a monthly pattern that has been occurring in stocks for several decades. A great advantage of it is the low capital commitment (on average around 13% of real exposure), which allows for simultaneous use of capital in other strategies.

average rating is 4.5 out of 5

R2 Turbo Strategy

The R2 Turbo strategy is inspired by Larry Connors' experiences. It uses the Relative Strength Index (RSI) indicator in a unique way, along with filters to boost its effectiveness. This trend reversal strategy waits for a specific pullback during an uptrend.

average rating is 4.5 out of 5

Triple B Strategy

The Triple B strategy combines three indicators that support each other. The basis of the strategy is the %B indicator based on Bollinger Bands.

average rating is 4.5 out of 5

Week Explorer Strategy

For last 40 years, the best day of the week on the US stock market has been Tuesday. The next day with the highest return is Wednesday. We present a strategy that skillfully exploits this market behavior by opening positions only on Mondays and cashing in profits in almost 70% of cases over the following days.

average rating is 4.4 out of 5

IBS Master Strategy

IBS Master draws inspiration from the experiences of Linda Raschke described in the book Street Smarts: High Probability Short-Term Trading.

average rating is 4.4 out of 5

RSI Range Rider Strategy

If J. Welles Wilder knew that the indicator he described in 1978 was still performing so well, he would be very proud. It is a matter of matching a powerful indicator to the nature of the instrument, that is US stocks.

average rating is 4.3 out of 5

KO Christmas Rally Strategy

The seasonal holiday pattern on Coca-Cola is one fantastic example of how seasons affect stocks. The pattern has a logical justification, which is the association of the brand with holidays built over decades. This consequently influenced consumer and investor behavior before this period.

average rating is 4.3 out of 5

BBIQ Strategy

The BB IQ strategy utilizes the Momentum effect by purchasing stocks that are in the Exponential Move phase and those that are among the strongest in the index.

average rating is 4.3 out of 5

Momentum IBS 3xETF Strategy

Momentum IBS focuses on three ETFs, rarely engages capital, but is a valuable addition to most portfolios due to the stability of profits and excellent risk-reward ratio. It offers a 71% win rate and a different profile compared to typical reversal strategies.

average rating is 4.2 out of 5

BKNG Winter Travel Strategy

Winter is one of the two best seasons for Booking.com. This is also true for the company's stock. The winter strategy will show you how holding the stock for just 25 days in January and February could yield results similar to holding the index for the entire year.

average rating is 4.1 out of 5

BA Flight to Growth Strategy

Each year, the shares of the aerospace giant The Boeing Company (BA) statistically see an increase from the end of October to the beginning of January. What might drive this trend? Increased air traffic during the holiday season, which reminds investors of the company? Or perhaps government purchases at the end of the year cause Boeing's shares to gain strength?

bottom of page