InvestMA

Methodology

Every formula, convention and tax rule used by the simulators. The tax rates shown below are read directly from the rules the calculations use.

Principles

InvestMA is an educational tool: it illustrates the effect of contributions, return, fees, dividends, inflation and taxation. It does not predict markets and is not advice.

All calculations run in your browser: the amounts you enter are never sent anywhere. Only an anonymous, cookieless audience measurement counts the pages visited (Vercel Analytics). Amounts are computed at full precision and rounded to the centime only for display. Simulations start on the first day of next month.

Rate conversion

An annual rate is converted to the equivalent monthly rate geometrically (not by dividing by 12), so that twelve compounded months give back exactly the annual rate:

r_monthly = (1 + r_annual)^(1/12) − 1

Example: 7% a year gives 0.5654% a month (not 0.5833%). The same conversion applies to annual fees and to the dividend yield.

Monthly sequence

Every month, the simulator applies the following steps, in this order:

  1. contribution at the start of the month, net of entry fees;
  2. the monthly price return;
  3. dividends: computed, withholding tax applied, then reinvested or paid out to a cash bucket;
  4. deduction of the monthly share of management and custody fees.

This month-by-month calculation is checked by automated tests: with no fees or dividends, it gives back exactly the closed-form future value (contributions at the start of each month), including the zero-return case.

FV = C₀ × (1 + r)^n + C × [((1 + r)^n − 1) / r] × (1 + r)

C₀: initial capital; C: monthly contribution; r: monthly rate; n: number of months. If r = 0: FV = C₀ + C × n.

Contributions

The initial capital and the first regular contribution are invested at the start of the first month. Later contributions fall at the start of each period: every month, or in months 1, 4, 7… (quarterly), 1, 7, 13… (every six months), 1, 13, 25… (yearly).

The duration is a whole number of years, at least one year.

Fees

  • Entry fees: a percentage of the contribution plus, where applicable, a fixed amount per contribution (the initial capital and the first regular contribution, invested in the same month, count as two contributions). They cannot exceed the contribution. Reinvested dividends bear none.
  • Management and custody fees: added together, converted once to a monthly rate, then applied every month to the portfolio value.
  • Exit fees: a percentage of the portfolio value at the time of sale.

monthly_fees = value × [(1 + f_management + f_custody)^(1/12) − 1]

InvestMA contains no real fee schedule: every fee is entered by the user and defaults to 0.

Dividends

The price return and the dividend yield are two separate inputs: the dividend comes on top of the price return and must not already be included in it. Dividends are computed every month on the value after the price return:

gross_dividend = value × [(1 + dividend_yield)^(1/12) − 1]

In a securities account (compte-titres), withholding tax is applied at the rate in force on each payment date (see the tax rules). The net dividend is either reinvested (it then adds to the cost basis) or paid out to a cash bucket that earns no interest.

If no rule is known for a date, the calculation stops rather than using an assumed rate.

Exit and capital gain

Capital-gains tax is computed only on sale, at the end of the simulation, never yearly on unrealised gains. The whole portfolio is sold on the first day of the month after the last period.

gain = (value − exit fees) − cost basis

cost basis = contributions (fees included) + reinvested net dividends

A loss or a zero gain is not taxed. The rate depends on the type of security and on the rule in force on the date of sale.

net amount = value − exit fees − capital-gains tax + cash

Inflation and real value

Future amounts are converted to today's MAD, period by period, with a constant assumed annual inflation:

real_value = nominal_value / (1 + inflation)^(months / 12)

amount_needed = amount_today × (1 + inflation)^(years)

The default inflation rate (2%) is a teaching assumption, and can be changed.

PEA

The PEA (Plan d'Épargne en Actions) is Morocco's equity savings plan.

  • The PEA is opened on the start date and closed in full at the end of the simulation. Inside the plan, dividends are credited without withholding and reinvested.
  • Held for at least 5 years (same day, five years later): dividends and gains are exempt. 4 years and 11 months is not enough.
  • Closed before 5 years: ordinary taxation, that is capital-gains tax plus withholding on the dividends received in the plan, recomputed at the rate in force on each payment date. The exact recapture terms are to be verified; the result is flagged as an estimate.
  • Ceiling: it applies to cumulative contributions, not to the plan's value, and depends on the opening date: 600,000 MAD for plans opened before 01/01/2020, 2,000,000 MAD since. A simulation that exceeds it is blocked.
  • Securities: listed shares of Moroccan companies and equity OPCVM are eligible; other OPCVM are not (not calculated). An OPCVM counts as "equity" if it is permanently invested at least 60% in shares: its regulatory classification matters, not its name, and the simulator reminds you to check it. Paying dividends out of the plan is not simulated.

The estimated tax saving from the PEA is defined as:

saving = PEA net amount − securities account net amount

It includes the taxes avoided and the compounding of the dividends that are not taxed. The taxes avoided are also shown separately.

Savings goal

The goal planner uses the same conventions (contributions at the start of each month, geometric monthly rate) with a return net of fees and taxes entered by the user; it computes neither fees nor taxes.

contribution = [goal − C₀ × (1 + r)^n] / {[((1 + r)^n − 1) / r] × (1 + r)}

If the goal is expressed in today's MAD, it is first raised by inflation up to the deadline. The completion date is the first month-end at which the value reaches the goal, searched over 100 years at most.

Market scenarios

The simulator can run 1,000 scenarios in which only the price return varies from one month to the next; contributions, dividends, fees and tax follow the same rules as the main calculation. Each month, the growth factor follows a lognormal distribution calibrated so that the average annual return equals the return entered:

1 + R_month = exp(μ + σ_m × Z), σ_m = σ / √12, μ = ln(1 + r) / 12 − σ_m² / 2

σ is the annual volatility of log returns, r the average return, Z a standard normal variable. The draws are reproducible: the same assumptions always give the same scenarios. The results shown are the final net amounts (after fees and taxes) reached by 10%, 50% and 90% of scenarios, and the share of scenarios that end below the total paid in.

With ups and downs, the median scenario usually ends below the fixed-return result, even with the same average return: a 20% fall needs a 25% rise to recover.

Default volatility: 15% for listed shares, an illustrative assumption rounded from the MASI average volatility published for 2025. No default is offered for OPCVM or for bond, money-market or mixed investments: the user enters their own assumption. The MASI observations below can be chosen as a reference; they are average volatilities published by the authorities, not recomputed by InvestMA from daily prices.

PeriodPublished average volatilitySource
01/01/2022 – 31/12/202210.36%Bank Al-Maghrib, Rapport sur la stabilité financière 2024
01/01/2023 – 31/12/202311.04%Bank Al-Maghrib, Rapport sur la stabilité financière 2024
01/01/2024 – 31/12/20248.27%Bank Al-Maghrib, Rapport sur la stabilité financière 2024 ; AMMC, communiqué sur la stabilité financière, juillet 2025
01/01/2025 – 31/12/202514.63%CCSRS (Comité de coordination et de surveillance des risques systémiques), communiqué du 7 juillet 2026
01/01/2026 – 30/06/2026Incomplete period21.50%CCSRS (Comité de coordination et de surveillance des risques systémiques), communiqué du 7 juillet 2026

Limitations: months independent of each other, no prolonged crisis or extreme shocks beyond the normal distribution, return and volatility constant over the whole duration. Past volatility does not guarantee how markets will behave.

Tax rules

The rules apply to resident individuals. Each rule has a validity period: the calculation uses the one in force on the date of the event (dividend payment, sale, or plan opening for the PEA). Each rule shows the date it was verified; a rule not yet verified against the Code Général des Impôts (Moroccan tax code) would be marked "rule to be verified" and its results would be indicative. Capital-gains rates are on file from 01/01/2010; earlier periods are not covered. Legal references are given in French, as published.

CategoryRatePeriodReferenceStatus
Dividends (withholding tax)12.50%From 01/01/2025 to 31/12/2025CGI 2026, article 247-XXXVII-C (modifié par la Loi de Finances 2025)verified on 22/10/2026
Dividends (withholding tax)11.25%From 01/01/2026 to 31/12/2026CGI 2026, article 247-XXXVII-C (modifié par la Loi de Finances 2025)verified on 22/10/2026
Dividends (withholding tax)10.00%From 01/01/2027CGI 2026, article 247-XXXVII-C (modifié par la Loi de Finances 2025)verified on 22/10/2026
Dividends (withholding tax)15.00%Distributions from 01/01/2023 to 31/12/2024By the fiscal year the profits come from: until 31/12/2022CGI, article 247-XXXVII-C (Loi de Finances 2023) ; DGI, Note circulaire n° 733verified on 22/10/2026
Dividends (withholding tax)13.75%Distributions from 01/01/2023 to 31/12/2024By the fiscal year the profits come from: from 01/01/2023 to 31/12/2023CGI, article 247-XXXVII-C (Loi de Finances 2023) ; DGI, Note circulaire n° 733verified on 22/10/2026
Dividends (withholding tax)12.50%Distributions from 01/01/2023 to 31/12/2024By the fiscal year the profits come from: from 01/01/2024 to 31/12/2024CGI, article 247-XXXVII-C (Loi de Finances 2023) ; DGI, Note circulaire n° 733verified on 22/10/2026
Gains on listed shares15.00%From 01/01/2010CGI 2026, article 73-II-C-1°-averified on 24/10/2026
Gains on equity OPCVM15.00%From 01/01/2010CGI 2026, article 73-II-C-1°-bverified on 24/10/2026
Gains on non-equity OPCVM20.00%From 01/01/2010CGI 2026, article 73-II-F-2°verified on 24/10/2026
Equity savings plan (PEA)Exemption, after 5 years of holding, ceiling 600,000 MADUntil 31/12/2019CGI, article 68-VII (Loi de Finances 2011) ; DGI, Note circulaire n° 730verified on 24/10/2026
Equity savings plan (PEA)Exemption, after 5 years of holding, ceiling 2,000,000 MADFrom 01/01/2020CGI 2026, article 68-VII (modifié par la Loi de Finances 2020) ; DGI, Note circulaire n° 730 ; AMMC — Plan d'Épargne en Actionsverified on 24/10/2026

Withholding on dividends distributed in 2023 and 2024 depends on the fiscal year the profits come from; without that information, no rate is applied. Special exemptions, tax treaties and other investor classes are not modelled.

Return assumptions

The types of investment offered are teaching assumptions, not market data or forecasts. Every value can be changed.

Type of investmentAssumed price returnDefault tax category
Money market3.00% / yearOther OPCVM (bond, money market, mixed)
Bonds4.00% / yearOther OPCVM (bond, money market, mixed)
Mixed5.00% / yearOther OPCVM (bond, money market, mixed)
Equity OPCVM7.00% / yearEquity OPCVM (at least 60% in shares)
Listed shares8.00% / yearListed shares

CSV and PDF exports

The simulator export has one row per month (contribution, fees, return, dividends, withholding, end-of-month values, cost basis), dated with the start and end of the month, followed by a summary computed from the same figures as the screen. Format on the English site: "," separator, decimal point, DD/MM/YYYY dates, UTF-8 encoding. The French site uses a ";" separator and a decimal comma, for spreadsheets set to French.

The PDF reports (simulator and comparison) fit on one page: assumptions, results and chart, built from the same figures and labels as the screen.

Limitations

  • Constant return, dividend and inflation in the main calculation; the market scenarios only vary the price return.
  • Dividends spread monthly rather than paid on a fixed date.
  • No partial withdrawal: everything is sold at the end of the simulation.
  • No market data, no real fee schedule.
  • Taxation limited to resident individuals and to the categories listed above.