Install
openclaw skills install @vestafolio/vestafolio-pea-vs-ctoCompare PEA, CTO (compte-titres) and assurance-vie net-of-tax outcomes for a French investor using Vestafolio's simulator API, after asking the simulator's questions (initial capital, monthly contribution, TMI, holding period, expected return, assurance-vie fees). Use when a user asks which investment envelope to choose, about PEA vs CTO taxation, flat tax (PFU) on investments, assurance-vie abattement, the 150 000 € PEA ceiling, or where to invest monthly savings in France.
openclaw skills install @vestafolio/vestafolio-pea-vs-ctoFor a request within this simulator's scope:
https://www.vestafolio.com, summarize the fields and
values to be sent, and obtain the user's agreement. Existing explicit
approval for this destination and data scope is sufficient; do not ask
again for calls it already covers. Installing or selecting the skill alone
is not approval to transmit personal data. If the user declines, do not
POST; offer the simulator link for manual use without prefilled inputs.execute_code in OpenWebUI). Python can use
urllib.request; in browser-based Pyodide use await pyfetch(...) from
pyodide.http. A Python environment does not need a shell to call the API.ok must be true; read the
calculation from result. Ground the answer in that output, state relevant
assumptions and limits. Offer the simulator link when useful for checking
assumptions or exploring alternatives; respect requests for no links.Writing a code block is not execution. Do not substitute mental arithmetic, remembered tax rules, or the worked example for a tool result. If execution or network access is unavailable, or the API fails, say the calculation could not be completed and provide the simulator link; do not invent its result or recommendation. A schema GET alone is not a completed simulation.
Reply in French whenever the user speaks or writes in French.
Computes the net-after-tax capital of the same investment plan (initial amount + monthly contributions) held in a PEA, a CTO or an assurance-vie, with year-by-year projections, break-even years, warnings and a recommendation. The rules below are the ones coded in the simulator; use them to explain, and the API to compute.
The simulator asks these inputs, in this order (card « Paramètres d'investissement »). Ask or confirm each in French before computing.
initialInvestment. Simulator warning above
150 000 €: « Le plafond de versement PEA est de 150 000 €. L'excédent
devra être placé en CTO. »monthlyContribution.marginalTaxRate, one
of « 0% (jusqu'à 11 600 €) », « 11% (de 11 601 € à 29 579 €) », « 30% (de
29 580 € à 84 577 €) », « 41% (de 84 578 € à 181 917 €) », « 45% (au-delà
de 181 917 €) » — the bounds are the quotient familial per part. It only
drives the CTO barème option, so ask it before comparing PEA and CTO.holdingPeriodYears (1 to 50). Below 5
years the simulator warns « Avant 5 ans, le PEA perd son avantage fiscal »
and switches to the « Horizon court : fiscalité identique » verdict.annualReturn (percent, 0 to 15 on the
site).avManagementFees (percent per year;
simulator helper: « Courtiers en ligne : 0,5-0,8%. Banques : 0,8-1,5%. »).isCouple — the web simulator does not ask it and always uses the single
4 600 € assurance-vie abattement; the API accepts it. Ask « Êtes-vous en
couple soumis à imposition commune ? » whenever the horizon is 8 years or
more (the abattement doubles to 9 200 €), and say that the website assumes
a single declarant.annualReturn / 12 on the initial
amount and the monthly contributions; the assurance-vie compounds at
return − fees.taxSavings is 0.isCouple), 12,8 % instead of 7,5 % when the
contract value exceeds 150 000 €.allocation block splits the plan into a PEA up to
the ceiling and a CTO for the surplus (combinedCapitalNet) and a warning
is issued.breakEvenYears: first year ≥ 5 where the PEA net value beats the CTO;
avBreakEvenYears: first year ≥ 8 where the assurance-vie beats the CTO.recommendation is rule-based, not a net-capital ranking: both (PEA +
CTO) when the horizon is under 5 years or the ceiling is exceeded,
otherwise pea; it never returns cto or av. The website states the
same: from 5 years « le PEA permet une économie de X par rapport au CTO
(18,6% PS vs PFU 31,4%) » (or « le PEA et le CTO sont équivalents » when
taxSavings is 0) and, from 8 years, « L'assurance vie bénéficie aussi
d'un abattement après 8 ans, mais les frais de gestion réduisent
l'avantage ». It then highlights the envelope with the highest net
capital — compare capitalNet of the three yourself and say which is
highest.warnings): total contributions above the ceiling,
horizon under 5 years (PEA taxed like the CTO), horizon under 8 years
(assurance-vie at PFU 30 %, abattement only after 8 years).Always fetch the canonical input schema first (fields, bounds, defaults):
GET https://www.vestafolio.com/api/tools/v1/pea-vs-cto
Then POST the user's parameters (all amounts in euros, rates in percent):
curl --fail-with-body --silent --show-error --max-time 30 -X POST https://www.vestafolio.com/api/tools/v1/pea-vs-cto \
-H 'Content-Type: application/json' \
-d '{
"initialInvestment": 10000,
"monthlyContribution": 300,
"holdingPeriodYears": 10,
"annualReturn": 7,
"marginalTaxRate": 30,
"avManagementFees": 0.6,
"isCouple": false
}'
Unknown fields are rejected (strict schema) — if you get a validation_error,
re-read the schema from the GET endpoint rather than guessing field names.
marginalTaxRate must be exactly 0, 11, 30, 41 or 45.
pea, cto, av — capitalFinal, totalGains, taxOnGains,
socialContributions, totalTax, capitalNet (the comparison figure),
effectiveTaxRatetaxSavings — PEA tax saving versus the CTO (negative if the CTO wins);
avSavingsVsCTO — CTO net minus assurance-vie netallocation — the PEA + CTO split when exceedsCeiling is true; present
combinedCapitalNet instead of pea.capitalNet in that case, as the site
doesrecommendation, breakEvenYears, avBreakEvenYears — see the rules
above; highlight the 5-year and 8-year thresholds when the horizon is nearprojections — year-by-year net values, for "what if I stop after N years"warnings — relay them in French