Wash Sales and Day Trading
Great question! It can be a confusing for sure -- but here's a great example I've adapted to your scenario: As a Day Trader, you buy 100 shares of LMNO at $100, then after a large drop the same day, you sell all 10 shares at $90 for a loss of $1,000. Later in the afternoon, you bought another 100 shares at $92 and resold them an hour later at $97 (a $500 profit), closing out your position for the day. The second trade had a profit of $500, so you had a net loss of $500 (the $1,000 loss plus the $500 profit).  Here’s how this works out tax-wise: The IRS first disallows the $1,000 loss and lets you show only a profit of $500 for the first trade (since it was a wash). But it lets you add the $1,000 loss to the basis of your replacement shares. So instead of spending $9,200 (100 shares times $92), for tax purposes, you spent $10,200 ($9,200 plus $1,000), which means that the second trade is what caused you to lose the $500 that you added back (100 x $97 = $9,700 minus the 100 x $102 = $10,200, netting $500 loss). On a net basis, you get to record your loss, it just gets recorded on the second trade. The basis addition lets you work off your wash-sale losses eventually, and in your case, on Day 3 you would recognize a $500 final net loss for tax purposes since you EXITED your position. Caveat: UNLESS you re-enter LMNO within 30 days later (at which point it would be another wash and the basis would shift again). Source: http://www.dummies.com/personal-finance/investing/day-trading/understand-the-irs-wash-sale-rule-when-day-trading/ You are correct. She cannot claim the initial loss of $1,000 on her taxes, she can only report the $500 profit. However, the IRS does allow her to add the $1,000 loss to the basis cost of her replacement shares. e.g. Yes, an overall $500 loss on the stock can be claimed. Since the day trader sold both lots she acquired, the Wash Sale rule has no net impact on her taxes. The Wash Sale rule would come into play if within thirty days of second sale, she purchased the stock a third time. Then she would have to amend her taxes because claiming the $500 loss would no longer be a valid under the Wash Sale rule. It would have to be added to the cost basis of the most recent purchase.
"According to Wikipedia this is still a wash sale: In the USA wash sale rules are codified in ""26 USC § 1091 - Loss from   wash sales of stock or securities."" Under Section 1091, a wash sale occurs when a taxpayer sells or trades   stock or securities at a loss, and within 30 days before or after the   sale:" I was not able to find any authority for the opinion you suggest. Wash sale rules should, IMHO, apply. According to the regulations, you attribute the newly purchased shares to the oldest sold shares for the purposes of the calculation of the disallowed loss and cost basis. (c) Where the amount of stock or securities acquired within the 61-day period is less than the amount of stock or securities sold or   otherwise disposed of, then the particular shares of stock or   securities the loss from the sale or other disposition of which is not   deductible shall be those with which the stock or securities acquired   are matched in accordance with the following rule: The stock or   securities acquired will be matched in accordance with the order of   their acquisition (beginning with the earliest acquisition) with an   equal number of the shares of stock or securities sold or otherwise   disposed of. You can resort to the claim that you have not, in fact, entered into the contract within 30 days, but when you gave the instructions to reinvest dividends. I don't know if such a claim will hold, but to me it sounds reasonable. This is similar to the rules re short sales (in (g) there). In this case, wash sale rules will not apply (unless you instructed to reinvest dividends within the 30 days prior to the sale). But I'd ask a tax professional if such a claim would hold, talk to a EA/CPA licensed in your state. "Edited: Pub 550 says 30 days before or after so the example is ok - but still a gain by average share basis.  On sale your basis is likely defaulted to ""average price"" (in the example 9.67 so there was a gain selling at 10), but can be named shares at your election to your brokerage,  and supported by record keeping. A Pub 550 wash might be buy 2000 @ 10 with basis 20000, sell 1000 @9 (nominally a loss of 1000 for now and remaining basis 10000), buy 1000 @ 8 within 30 days.   Because of the wash sale rule the basis is 10000+8000 paid + 1000 disallowed loss from wash sale with a final position of 2000 shares at 19000 basis.  I think I have the link at the example:  http://www.irs.gov/publications/p550/ch04.html#en_US_2014_publink100010601" "But I don't see how it's any different than buying a stock at a low price and holding on to it for some months. Based on your question, I would say the difference is time. Day trading by its nature is a 6-hour endeavor. If you buy low and are planning to sell high, then you only have a few hours to make this happen. As a previous poster mentioned, there is a lot of ""white noise"" that occurs on a weekly/daily/hourly/min basis. Long-term investors have the time to wait it out. Although, as a side note, if you were a buy-and-hold investor from the 1960s-early 1980s, then buy and hold was not very good. Is it just the psychological/addictive aspect of it? This is the biggest reason. Day trading is stressful and stress can cause financially destructive decisions such as over-leveraging, over-trading, etc. Why is day trading stressful? Because you are managing hundreds to thousands of trades a year. When combined with the lack of time in a day to make moves, it becomes stressful. Also, many day traders do it full time. Which adds to the pressure to be correct and to be incredible at money managment. A lot of buy-and-hold investors have full time jobs and may only check their positions every month or so." Note that the rules around wash sales vary depending on where you live. For the U.S., the wash sale rules say that you cannot buy a substantially identical stock or security within 30 days (before or after) your sale. So, you could sell your stock today to lock in the capital losses. However, you would then have to wait at least 30 days before purchasing it back. If you bought it back within 30 days, you would disqualify the capital loss event. The risk, of course, is that the stock's price goes up substantially while you are waiting for the wash sale period. It's up to you to determine if the risk outweighs the benefit of locking in your capital losses. Note that this applies regardless of whether you sell SOME or ALL of the stock. Or indeed, if we are talking about securities other than stocks. "When there is a trade the shares were both bought and sold. In any trade on the secondary market there has to be both a buyer and a seller for the trade to take place. So in ""lasttradesize"" a buyer has bought the shares from a seller." "For restricted stock, I think the vesting date meets the requirements of the second wash sale trigger from IRS Pub 550: Wash Sales: Acquire substantially identical stock or securities in a fully taxable trade I base this on these two quotes from IRS Pub 525: Restricted Property: any income from the property, or the right to use the property, is included in your income as additional compensation in the year you receive the income or have the right to use the property. - Until the property becomes substantially vested, it is owned by the person who makes the transfer to you, usually your employer.  So on the vest date: The transfer is taxable Ownership is transferred to you That seems close enough to ""a fully taxable trade"" for me.  Maybe this changes if you pay the tax on the stock on the grant date. See Pub 525: Restricted Property: Choosing to include in income for year of transfer. Obviously, if this is important you should consult your tax advisor.  Technicalities aside, I don't think it passes the sniff test. You're getting salable shares when the restricted stock vests. If you're selling other shares at a loss within 30 days of the vesting date, that smells like a wash sale to me." Machine learning is definitely applied to trading, but I have not tried it myself. For now I've been focused on figuring out the platforms and how they work; I have not been trying out other strategies besides a SMAC strategy. The most machine learning-like application I've attempted was cross-validation by walk-forward analysis (I'm publishing that post on Monday).  I know nothing about TensorFlow other than it's used for deep learning and that it doesn't work on Windows and thus would not work on my more powerful gaming computer, and like I said above, I have not been exploring machine learning right now. Neural networks are on my radar, on the list of things I need to read, but there was a topic on r/algotrading recently where most users said that deep learning has not demonstrated better performance than more traditional ML techniques and looks like a fad. I want to convince myself of that first, though.  I'm glad you enjoyed the post and my site! Thank you! A couple ways, but its not a guarantee.  You have to have special charts. Instead of each tick being 1 min, 5 min, or whatever, it is a set number of trades. Say 2000. Since retail investors only buy and sell in small amounts, there will be small volume per tick. An institutional investor, however, would have a much much higher trade lot size, even if using an algo. Thus, large volume spikes in such a chart would signal institutional activity over retail. Similarly, daily charts showing average trade size can help you pick out when institutional activity is highest, as they have much larger trade sizes. You could also learn how the algos work and look for evidence one is being used. ie every time price hits VWAP a large sell order goes through would indicate an institutional investor is selling, especially if it happens multiple times in a row. Disallowed losses due to the wash sale rule are added to the basis of the repurchased shares.  In your example, on day two you paid $0.70 per share. Then the disallowed $0.30 loss from the previous day gets added to the basis, making your total basis $1.00 per share. When you sell at the end of the day for $1.00 per share, your net gain/loss is zero. Furthermore, you can recapture disallowed losses by selling the last lot of ABC, completely divesting yourself of all holdings in ABC for at least 31 days. Even if that last lot was a loss, when taking into account the increased basis from previously disallowed wash sale losses, you can claim the loss fully on this last, non-wash sale. Not sure where you got the 296 crores figure. The data on the sheet shows activity by category of investors. In the end NET of all BUY and SELL across all categories will always be Zero. It has no bearing on whether the stock market goes up or goes down. If you compare only activity by certain category, say FII then there could be more SELL compared to BUY or vice-versa. Looks like there are no specific rule in India to prevent Wash sales. See the link below.  http://economictimes.indiatimes.com/wealth/personal-finance-news/investors-can-rejig-portfolio-book-short-term-loss-to-save-tax/articleshow/7812788.cms?intenttarget=no Thanks for your reply. I’m not familiar with the term “Held-For-Trading Security”. My securities are generally held as collateral against my shorts. To clarify, I am just trying to track the “money in” and “money out” entries in my account for the shorts I write. The transaction is relatively straight forward, except there is a ton of information attached! In simple terms, for the ticker CSR and short contract CSRUQ8, the relevant entries look something like this: There are no entries for expiries. I need to ensure that funds are available for future margin calls and assignments. The sale side using covered calls is as involved. The last column in the source data is volume (the number of stocks that was exchanged during the day), and it also has a value of zero for that day, meaning that nobody bought or sold the stocks on that day. And since the prices are prices of transactions (the first and the last one on a particular day, and the ones with the highest/lowest price), the prices cannot be established, and are irrelevant as there was not a single transaction on that day. Only the close price is assumed equal to its previous day counterpart because this is the most important value serving as a basis to determine the daily price change (and we assume no change in this case). Continuous-line charts also use this single value. Bar and candle charts usually display a blank space for a day where no trade occurred. "Of course, which is why you need to have a scoring function / utility function for the ""filters"", i.e. Are you going to value it by rate of accuracy hor by a metric where wins = +2, losses = -1, such that it uses a criteria like that to decide whether or not a filter adds value, (some even use a compound effect i.e. wins = 2+e^(1+w) where w is the consecutive wins).  A metric like the above would capture the trade off between predictive power and profit. Also some traders watch their Max DD very carefully so they may be very risk averse."