Impact of wash sale tax rule on Algo Day trading

I recently learned about wash sale tax rule.

And I am bit confuse, so can someone clarify if I have to pay tax on all profit trades or net profit?
To simplify my question, let say I buy and sell 100 stocks 10 times in a day.
All LONG, 10 entry 10 exit alternately.
Start of the day I have 0 stock, and end of the day I have 0 stock.
Out of these 10 trades, 5 trades are profitable and 5 are not. Let say I made 10$ in each profitable trade and lost 5$ in each non-profitable trade.
Profit only trade profit = 5*10 = 50$
Non-profit trade loss = 5*5 = 25$

Net profit= 50 - 25 = 25$
Will I pay tax on net profit 25$ or on 50$?

@Dan_Whitnable_Alpaca is there someone who can answer this question?

@Angelo_Mendonca taxes are paid on net profit. More specifically, the capital gain/loss is calculated as below:

Capital_Gain/Loss = Gross_Proceeds (Sale_Price) - Selling_Cost - Cost_Basis

Selling costs would be commissions (if you pay them) and any regulatory fees. Cost basis can be a bit involved, but it is essentially anything you paid minus any buying costs. Alpaca uses two calculations for cost basis. Weighted Average is used for intraday positions (positions from intraday trades). Compressed FIFO is used for the end-of-day positions (positions from previous trading days). There is an in-depth article on how Alpaca calculates cost basis here in the docs.

Since the original title of this post asked about the “impact of wash sale tax rule”, I’ll explain a bit about that.

A wash sale is an IRS rule that disallows a tax deduction for a loss on the sale of a stock if you buy a “substantially identical” asset within 30 days. This only applies to losses. If you always have a profit you don’t need to worry about wash sales. However, if your capital gain is negative (ie a loss) and within 30 days you open another position in the same or “substantially” the same stock, then that loss will be disallowed for now, but you effectively get it back later. Maybe do a web search for “wash sale” to find out more. Note that this is separate and different from a “wash trade”.

1 Like

@Dan_Whitnable_Alpaca thank you for that link. I got it…