Offsetting capital losses against gains for stocks
The loss for B can be used to write off the gain for A.  You will fill out a schedule 3 with cost base and proceeds of disposition.  This will give you a $0 capital gain for the year and an amount of $5 (50% of the $10 loss) you can carry forward to offset future capital gains.  You can also file a T1-a and carry the losses back up to 3 years if you're so inclined.  It can't be used to offset other income (unless you die). Your C and D trades can't be on income account except for very unusual circumstances.  It's not generally acceptable to the CRA for you to use 2 separate accounting methods.  There are some intricacies but you should probably just use capital gains.   There is one caveat that if you do short sales of Canadian listed securities, they will be on income account unless you fill out form T-123 and elect to have them all treated as capital gains. I just remembered one wrinkle in carrying forward capital losses.  They don't reduce your capital gains anymore, but they reduce your taxable income.  This means your net income won't be reduced and any benefits that are calculated from that (line 236), will not get an increase.
No such account exists as capital gains aren't realized until holdings are sold. For example: OR  Both scenarios would result in you owing the appropriate taxes on a $40 gain from the dividends.   The $100 gain or $100 loss that isn't realized (you haven't sold the stock) isn't accounted for until the year of sale. There's really not a simple yes/no answer.  It depends on whether you're doing short term trading or long term investing.  In the short term, it's not much different from sports betting (and would be almost an exact match if the bettors also got a percentage of the team's ticket sales), In the long term, though, your profit mostly comes from the growth of the company.  As a company - Apple, say, or Tesla - increases sales of iPhones or electric cars, it either pays out some of the income as dividends, or invests them in growing the company, so it becomes more valuable.  If you bought shares cheaply way back when, you profit from this increase when you sell them.  The person buying it doesn't lose, as s/he buys at today's market value in anticipation of continued growth.  Of course there's a risk that the value will go down in the future instead of up. Of course, there are also psychological factors, say when people buy Apple or Tesla because they're popular, instead of at a rational valuation.  Or when people start panic-selling, as in the '08 crash.  So then their loss is your gain - assuming you didn't panic, of course :-) "Generally if you are using FIFO (first in, first out) accounting, you will need to match the transactions based on the number of shares. In your example, at the beginning of day 6, you had two lots of shares, 100 @ 50 and 10 @ 52.  On that day you sold 50 shares, and using FIFO, you sold 50 shares of the first lot.  This leaves you with 50 @ 50 and 10 @ 52, and a taxable capital gain on the 50 shares you sold. Note that commissions incurred buying the shares increase your basis, and commissions incurred selling the shares decrease your proceeds.  So if you spent $10 per trade, your basis on the 100 @ 50 lot was $5010, and the proceeds on your 50 @ 60 sale were $2990.  In this example you sold half of the lot, so your basis for the sale was half of $5010 or $2505, so your capital gain is $2990 - 2505 = $485. The sales you describe are also ""wash sales"", in that you sold stock and bought back an equivalent stock within 30 days.  Generally this is only relevant if one of the sales was at a loss but you will need to account for this in your code.  You can look up the definition of wash sale, it starts to get complex. If you are writing code to handle this in any generic situation you will also have to handle stock splits, spin-offs, mergers, etc. which change the number of shares you own and their cost basis.  I have implemented this myself and I have written about 25-30 custom routines, one for each kind of transaction that I've encountered.  The structure of these deals is limited only by the imagination of investment bankers so I think it is impossible to write a single generic algorithm that handles them all, instead I have a framework that I update each quarter as new transactions occur." "Offset against taxable gains means that the amount - $25 million in this case - can be used to reduce another sum that the company would otherwise have to pay tax on. Suppose the company had made a profit of $100 million on some other investments. At some point, they are likely to have to pay corporation tax on that amount before being able to distribute it as a cash dividend to shareholders. However if they can offset the $25 million, then they will only have to pay tax on $75 million. This is quite normal as you usually only pay tax on the aggregate of your gains and losses. If corporation tax is about 32% that would explain the claimed saving of approximately $8 million. It sounds like the Plaintiffs want the stock to be sold on the market to get that tax saving. Presumably they believe that distributing it directly would not have the same effect because of the way the tax rules work. I don't know if the Plaintiffs are right or not, but if they are the difference would probably come about due to the stock being treated as a ""realized loss"" in the case where they sell it but not in the case where they distribute it. It's also possible - though this is all very speculative - that if the loss isn't realised when they distribute it directly, then the ""cost basis"" of the shareholders would be the price the company originally paid for the stock, rather than the value at the time they receive it. That in turn could mean a tax advantage for the shareholders." "As Dilip said, if you want actual concrete, based in tax law, answers, please add the country (and if applicable, state) where you pay income tax. Also, knowing what tax bracket you're in would help as well, although I certainly understand if you're not comfortable sharing that. So, assuming the US... If you're in the 10% or 15% tax bracket, then you're already not paying any federal tax on the $3k long term gain, so purposely taking losses is pointless, and given that there's probably a cost to taking the loss (commission, SEC fee), you'd be losing money by doing so. Also, you won't be able to buy back the loser for 31 days without having the loss postponed due to the wash sale that would result. State tax is another matter, but (going by the table in this article), even using the highest low end tax rate (Tennessee at 6%), the $50 loss would only save you $3, which is probably less than the commission to sell the loser, so again you'd be losing money. And if you're in a state with no state income tax, then the loss wouldn't save you anything on taxes at the state level, but of course you'll still be paying to be able to take the loss. On the high end, you'd be saving 20% federal tax and 13.3% state tax (using the highest high end tax state, California, and ignoring (because I don't know :-) ) whether they tax long-term capital gains at the same rate as regular income or not), you'd be saving $50 * (20% + 13.3%) = $50 * 33.3% = $16.65. So for taxes, you're looking at saving between nothing and $16.65. And then you have to subtract from that the cost to achieve the loss, so even on the high end (which means (assuming a single filer)) you're making >$1 million), you're only saving about $10, and you're probably actually losing money. So I personally don't think taking a $50 loss to try to decrease taxes makes sense. However, if you really meant $500 or $5000, then it might (although if you're in the 10-15% brackets in a no income tax state, even then it wouldn't). So the answer to your final question is, ""It depends."" The only way to say for sure is, based on the country and state you're in, calculate what it will save you (if anything). As a general rule, you want to avoid letting the tax tail wag the dog. That is, your financial goal should be to end up with the most money, not to pay the least taxes. So while looking at the tax consequences of a transaction is a good idea, don't look at just the tax consequences, look at the consequences for your overall net worth." It was not 100% clear if you have held all of these stocks for over a year.  Therefore, depending on your income tax bracket, it might make sense to hold on to the stock until you have held the individual stock for a year to only be taxed at long-term capital gains rates.  Also, you need to take into account the Net Investment Income Tax(NIIT), if your current modified adjusted income is above the current threshold.  Beyond these, I would think that you would want to apply the same methodology that caused you to buy these in the first place, as it seems to be working well for you. 2 & 3. No.  You trigger a taxable event and therefore have to pay capital gains tax on any gains.  If you have a loss in the stock and repurchase the stock within 30 days, you don't get to recognize the loss and have to add the loss to your basis in the stock (Wash Sales Rules). I am relative newbie in the financial market trading and as I understand it, the response from Victor is accurate in respect of trading CFD contracts. However, there is also the option to 'trade' through a financial spread betting platform which as its name suggests is purely a bet based upon the price of the underlying stock/asset. As such, I believe that your theory to short a stock just prior to its ex-dividend date may be worth investigating further... Apart from that, it's worthwhile mentioning that financial spread betting is officially recognised by HMRC as gambling and therefore not currently [2015/16] subject to capital gains tax. This info is given in good faith and must not be relied upon when making any investment and/or trading decision(s). I hope this helps you make a fortune - if it does; then please remember me! Here's how capital gains are totaled: Long and Short Term. Capital gains and losses are either long-term or   short-term. It depends on how long the taxpayer holds the property. If   the taxpayer holds it for one year or less, the gain or loss is   short-term. Net Capital Gain.  If a taxpayer’s long-term gains are more than their   long-term losses, the difference between the two is a net long-term   capital gain. If the net long-term capital gain is more than the net   short-term capital loss, the taxpayer has a net capital gain. So your net long-term gains (from all investments, through all brokers) are offset by any net short-term loss.  Short term gains are taxed separately at a higher rate. I'm trying to avoid realizing a long term capital gain, but at the same time trade the stock. If you close in the next year, one of two things will happen - either the stock will go down, and you'll have short-term gains on the short, or the stock will go up, and you'll have short-term losses on the short that will offset the gains on the stock.  So I don;t see how it reduces your tax liability.  At best it defers it. It depends to some extent on how you interpret the situation, so I think this is the general idea. Say you purchase one share at $50, and soon after, the price moves up, say, to $55. You now have an unrealized profit of $5. Now, you can either sell and realize that profit, or hold on to the position, expecting a further price appreciation. In either case, you will consider the price change from this traded price, which is $55, and not the price you actually bought at. Hence, if the price fell to $52 in the next trade, you have a loss of $3 on your previous profit of $5. This (even though your net P&L is calculated from the initial purchase price of $50), allows you to think in terms of your positions at the latest known prices. This is similar to a Markov process, in the sense that it doesn't matter which route the stock price (and your position's P&L) took to get to the current point; your decision should be based on the current/latest price level. My understanding is that losses are first deductible against any capital gains you may have, then against your regular income (up to $3,000 per year).  If you still have a loss after that, the loss may be carried over to offset capital gains or income in subsequent years As you suspect, a short term capital loss is deductible against short term capital gains and long term losses are deductible against long term gains.  So taking the loss now MIGHT be beneficial from a tax perspective.  I say MIGHT because there are a couple scenarios in which it either may not matter, or actually be detrimental: If you don't have any short term capital gains this year, but you have long term capital gains, you would have to use the short term loss to offset the long term gain before you could apply it to ordinary income.  So in that situation you lose out on the difference between the long term tax rate (15%) and your ordinary income rate (potentially higher). If you keep the stock, and sell it for a long term loss next year, but you only have short-term capital gains or no capital gains next year, then you may use the long term loss to offset your short-term gains (first) or your ordinary income.   Clear as mud? The whole mess is outlined in IRS Publication 550 Finally, if you still think the stock is good, but just want to take the tax loss, you can sell the stock now (to realize the loss) then re-buy it in 30 days.  This is called Tax Loss Harvesting.  The 30 day delay is an IRS requirement for being allowed to realize the loss. Purchases and sales from the same trade date will both settle on the same settlement date. They don't have to pay for their purchases until later either. Because HFT typically make many offsetting trades -- buying, selling, buying, selling, buying, selling, etc -- when the purchases and sales settle, the amount they pay for their purchases will roughly cancel with the amount they receive for their sales (the difference being their profit or loss). Margin accounts and just having extra cash around can increase their ability to have trades that do not perfectly offset. In practice, the HFT's broker will take a smaller amount of cash (e.g. $1 million) as a deposit of capital, and will then allow the HFT to trade a larger amount of stock value long or short (e.g. $10 million, for 10:1 leverage). That $1 million needs to be enough to cover the net profit/loss when the trades settle, and the broker will monitor this to ensure that deposit will be enough. "Yes. There are several downsides to this strategy: You aren't taking into account commissions. If you pay $5 each time you buy or sell a stock, you may greatly reduce or even eliminate any possible gains you would make from trading such small amounts. This next point sounds obvious, but remember that you pay a commission on every trade regardless of profit, so every trade you make that you make at a loss also costs you commissions. Even if you make trades that are profitable more often than not, if you make quite a few trades with small amounts like this, your commissions may eat away all of your profits. Commissions represent a fixed cost, so their effect on your gains decreases proportionally with the amount of money you place at risk in each trade. Since you're in the US, you're required to follow the SEC rules on pattern day trading. From that link, ""FINRA rules define a “pattern day trader” as any customer who executes four or more “day trades” within five business days, provided that the number of day trades represents more than six percent of the customer’s total trades in the margin account for that same five business day period."" If you trip this rule, you'll be required to maintain $25,000 in a margin brokerage account. If you can't maintain the balance, your account will be locked. Don't forget about capital gains taxes. Since you're holding these securities for less than a year, your gains will be taxed at your ordinary income tax rates. You can deduct your capital losses too (assuming you don't repurchase the same security within 30 days, because in that case, the wash sale rule prevents you from deducting the loss), but it's important to think about gains and losses in real terms, not nominal terms. The story is different if you make these trades in a tax-sheltered account like an IRA, but the other problems still apply. You're implicitly assuming that the stock's prices are skewed in the positive direction. Remember that you have limit orders placed at the upper and lower bounds of the range, so if the stock price decreases before it increases, your limit order at the lower bound will be triggered and you'll trade at a loss. If you're hoping to make a profit through buying low and selling high, you want a stock that hits its upper bound before hitting the lower bound the majority of the time. Unless you have data analysis (not just your intuition or a pattern you've talked yourself into from looking at a chart) to back this up, you're essentially gambling that more often than not, the stock price will increase before it decreases. It's dangerous to use any strategy that you haven't backtested extensively. Find several months or years of historical data, either intra-day or daily data, depending on the time frame you're using to trade, and simulate your strategy exactly. This helps you determine the potential profitability of your strategy, and it also forces you to decide on a plan for precisely when you want to invest. Do you invest as soon as the stock trades in a range (which algorithms can determine far better than intuition)? It also helps you figure out how to manage your risk and how much loss you're willing to accept. For risk management, using limit orders is a start, but see my point above about positively skewed prices. Limit orders aren't enough. In general, if an active investment strategy seems like a ""no-brainer"" or too good to be true, it's probably not viable. In general, as a retail investor, it's foolish to assume that no one else has thought of your simple active strategy to make easy money. I can promise you that someone has thought of it. Trading firms have quantitative researchers that are paid to think of and implement trading strategies all the time.  If it's viable at any scale, they'll probably already have utilized it and arbitraged away the potential for small traders to make significant gains. Trust me, you're not the first person who thought of using limit orders to make ""easy money"" off volatile stocks. The fact that you're asking here and doing research before implementing this strategy, however, means that you're on the right track. It's always wise to research a strategy extensively before deploying it in the wild. To answer the question in your title, since it could be interpreted a little differently than the body of the question: No, there's nothing wrong with investing in volatile stocks, indexes, etc. I certainly do, and I'm sure many others on this site do as well. It's not the investing that gets you into trouble and costs you a lot of money; it's the rapid buying and selling and attempting to time the market that proves costly, which is what you're doing when you implicitly bet that the distribution of the stock's prices is positively skewed. To address the commission fee problem, assuming a fee of $8 per trade ... and a minimum of $100 profit per sale Commissions aren't your only problem, and counting on $100 profit per sale is a significant assumption. Look at point #4 above. Through your use of limit orders, you're making the implicit assumption that, more often than not, the price will trigger your upper limit order before your lower limit order. Here's a simple example; let's assume you have limit orders placed at +2 and -2 of your purchase price, and that triggering the limit order at +2 earns you $100 profit, while triggering the limit order at -2 incurs a loss of $100. Assume your commission is $5 on each trade.  If your upper limit order is triggered, you earn a profit of 100 - 10 = 90, then set up the same set of limit orders again. If your lower limit order is triggered this time, you incur a loss of 100 + 10 = 110, so your net gain is 90 - 110 = -20. This is a perfect example of why, when taking into account transaction costs, even strategies that at first glance seem profitable mathematically can actually fail.  If you set up the same situation again and incur a loss again (100 + 10 = 110), you're now down -20 - 110 = -130. To make a profit, you need to make two profitable trades, without incurring further losses.  This is why point #4 is so important. Whenever you trade, it's critical to completely understand the risk you're taking and the bet you're actually making, not just the bet you think you're making. Also, according to my ""algorithm"" a sale only takes place once the stock rises by 1 or 2 points; otherwise the stock is held until it does. Does this mean you've removed the lower limit order? If yes, then you expose yourself to downside risk. What if the stock has traded within a range, then suddenly starts declining because of bad earnings reports or systemic risks (to name a few)? If you haven't removed the lower limit order, then point #4 still stands.  However, I never specified that the trades have to be done within the same day.  Let the investor open up 5 brokerage accounts at 5 different firms (for safeguarding against being labeled a ""Pattern Day Trader""). Each account may only hold 1 security at any time, for the span of 1 business week. How do you control how long the security is held? You're using limit orders, which will be triggered when the stock price hits a certain level, regardless of when that happens. Maybe that will happen within a week, or maybe it will happen within the same day. Once again, the bet you're actually making is different from the bet you think you're making. Can you provide some algorithms or methods that do work for generating some extra cash on the side, aside from purchasing S&P 500 type index funds and waiting? When I purchase index funds, it's not to generate extra liquid cash on the side. I don't invest nearly enough to be able to purchase an index fund and earn substantial dividends. I don't want to get into any specific strategies because I'm not in the business of making investment recommendations, and I don't want to start. Furthermore, I don't think explicit investment recommendations are welcome here (unless it's describing why something is a bad idea), and I agree with that policy. I will make a couple of points, however. Understand your goals. Are you investing for retirement or a shorter horizon, e.g. some side income? You seem to know this already, but I include it for future readers.  If a strategy seems too good to be true, it probably is. Educate yourself before designing a strategy. Research fundamental analysis, different types of orders (e.g., so you fully understand that you don't have control over when limit orders are executed), different sectors of the market if that's where your interests lie, etc. Personally, I find some sectors fascinating, so researching them thoroughly allows me to make informed investment decisions as well as learn about something that interests me. Understand your limits. How much money are you willing to risk and possibly lose? Do you have a risk management strategy in place to prevent unexpected losses? What are the costs of the risk management itself? Backtest, backtest, backtest. Ideally your backtesting and simulating should be identical to actual market conditions and incorporate all transaction costs and a wide range of historical data. Get other opinions. Evaluate those opinions with the same critical eye as I and others have evaluated your proposed strategy." Nominal. What you say is true, but I'm guessing it would be too complicated to modelate. Plus, a shareholder of a very large company would not necessarily experience said loss if he/she sells the stock in small chunks at a time. Capital losses do mirror capital gains within their holding periods. An asset or investment this is certainly held for a year into the day or less, and sold at a loss, will create a short-term capital loss. A sale of any asset held for over a year to your day, and sold at a loss, will create a loss that is long-term. When capital gains and losses are reported from the tax return, the taxpayer must first categorize all gains and losses between long and short term, and then aggregate the sum total amounts for every single regarding the four categories. Then the gains that are long-term losses are netted against each other, therefore the same is done for short-term gains and losses. Then your net gain that is long-term loss is netted against the net short-term gain or loss. This final net number is then reported on Form 1040. Example Frank has the following gains and losses from his stock trading for the year: Short-term gains - $6,000 Long-term gains - $4,000 Short-term losses - $2,000 Long-term losses - $5,000 Net short-term gain/loss - $4,000 ST gain ($6,000 ST gain - $2,000 ST loss) Net long-term gain/loss - $1,000 LT loss ($4,000 LT gain - $5,000 LT loss) Final net gain/loss - $3,000 short-term gain ($4,000 ST gain - $1,000 LT loss)   Again, Frank can only deduct $3,000 of final net short- or long-term losses against other types of income for that year and must carry forward any remaining balance. Recessions are prolonged by less spending and wages being 'sticky' downward. My currency, the 'wallark', allows a company to pay its workers in it's own scrip instead of dollars which they can use to purchase its goods, thus reducing it's labor costs and allowing prices to fall faster. While scrip in the past purposely devalued to discourage hoarding, the wallark hold's it's purchasing power. The difference is, a worker can only use it to purchase their company's good *on the date the wallark was earned or before*.  In other words, each good is labeled with a date it was put on display for sale, if  a worker earns scrip on that same day, they can trade the scrip for that good, or any good that was on the shelves on that day it was earned *or before that date*. Any good that comes onto market after the date that particular wallark was earned cannot be purchased with that wallark(which is dated), and must be purchased either with dollars or with wallark that was earned on that good's date or after. This incentivizes spending without creating inflation, and allows costs to fall which helps businesses during rough economic times.  Please feel free to read it, and comment on my site! Any feedback is welcome!