Tax silently nibbles at performance. Knowing the rules that apply to a Moroccan retail investor leads to better decisions — without forcing you to twist a strategy purely for tax reasons.
Capital gains on shares
When you sell a stock for more than you paid, the gain is in principle subject to a flat-rate withholding tax. The rate is set by the current finance law — it has shifted over time, so always check the rate applicable in the year of your sale. The broker withholds it automatically and remits it to the tax authority; no extra filing is needed in most cases.
Note: capital losses can usually offset gains in the same year, or carry forward, subject to local rules.
Dividends
Dividends paid by a listed company are subject to withholding at the rate set by current law. As with capital gains, the paying institution deducts the tax directly — you receive the net amount.
When comparing two stocks, reason in gross yield, then apply the same theoretical withholding: taxation does not change the relative ranking, only the final number.
OPCVMs
OPCVMs have their own regime. Gains realised inside the fund stay inside the fund (no tax on the investor while units are held). On exit, the gain on units is taxed under the applicable capital-gains regime.
This is one of the structural benefits of funds: built-in tax deferral that pushes the tax bill to the exit. On a long horizon, the compounding effect can be material.
Fees plus tax, together
Before comparing two vehicles, add fees (brokerage, management, custody) and taxes together. A 1.5 %-management OPCVM versus a 0.5 %-per-trade direct stock holding has a higher up-front cost but benefits from diversification and tax deferral. There is no universal answer; the math depends on your trading frequency.
A practical habit
At year end, ask your broker for your annual tax summary. Keep it. For complex situations (foreign tax residency, personal holding company, dismemberment), a brief conversation with an accountant or tax adviser is worth far more than its cost.
