Pension investment limits: Botswana, Ghana, Kenya and Namibia
Pensions Africa
Checks a pension fund’s asset schedule and measures the fund against its country’s investment limits, with the exposure, headroom and status of each limit line.
From the investment rules for retirement funds in Botswana (PFR2, 2023), Ghana (NPRA guidelines, 2021), Kenya (Table G of Legal Notice 124 of 2000) and Namibia (regulation 13 and Annexure A, 2018)
- 19validation rules
- 20pipeline stages
- 98limits checked
- 3 minto build and check
See it in Quantemplate
The pipeline

The flow

The checked output

What it checks
19 rules 15 Fail 4 Warning
- Mandatory fieldsFund, country, valuation date, holding ID, issuer, asset class and market value aren’t blank 7 Fail 7
- CodesThe country is one of the four, the asset class is allowed there, Y or N flags are valid, and market caps are given where a limit depends on them 5 Fail 5
- DatesThe valuation date is a quarter end 1 Fail 1
- ValuesNo negative market values, and each holding ID appears once in each fund 2 Fail 2
- LimitsAsset class, per-issuer and combined limits aren’t exceeded, and minimums are met 0 Fail, 4 Warning 4
A rule set to Fail marks its rows as failed, and any failure blocks Auto Export if you set it up. Warnings are only reported. Validation never removes a row. Every rule is listed in plain English in pension-validations.txt in the download.
How the pipeline works
- Stage 1 Prepare Clean the asset schedule and turn values into numbers
- Stages 2–5 Classify and check Add each holding’s limits for its country and asset class, then run 15 data rules
- Stages 6–15 Exposures The fund’s total assets, and its exposure under each limit a holding counts towards
- Stages 16–17 Limit lines One line per fund and limit, with combined limits added up
- Stages 18–20 Compliance Exposure, limit, headroom and status for each line, then the 4 limit checks
What’s in the download
- The 19 rules in plain English, and the definition of every stage and rule
- Two reference tables: each asset class’s limits in each country, and every limit’s percentage
- Four fictional funds’ asset schedules, one in each country, clean and with rows built to fail and limits breached
- The 147 limit lines the clean schedule should produce, and the rows each rule should flag on the broken one
- A template file the Quantemplate build skill reads to build the pipeline and check the results
- A snapshot of the finished pipeline
Build it
- Install the Quantemplate skills, version 1.0.0 or later, if you haven’t already. Then unzip the download.
- With Claude in Chrome signed in to Quantemplate, ask Claude Code:
Build the pension investment limits pipeline from the pension-investment-limits folder. Test it with the broken and clean asset schedules and compare the results with the expected ones.
- Claude creates the two reference datasets, uploads the asset schedule, builds the 20 stages and checks both test files. This takes around 3 minutes.
The agent builds through the Quantemplate app’s own API in your browser. That API isn’t published, so if a release changes it, the build stops and tells you what went wrong. Review what the agent builds before you rely on it.
Using your own asset schedule
- Give your asset schedule the same columns as the test file, with market values in the fund’s own currency. Several funds, from any of the four countries, can share one file.
- Set Domestic to Y for assets the fund’s own rules count as domestic. Each country defines it differently: Kenya, for example, counts government securities and listed shares from across the East African Community.
- List holdings in unit trusts and other collective investment schemes as their underlying assets in Botswana, Kenya and Namibia. Ghana has a limit of its own for collective investment schemes, so list them as themselves there, with the manager as the issuer.
- Check the two reference tables against the current rules. When Botswana’s minimum for assets in Botswana rises to 50% in December 2027, change the DOMESTIC line in the limits table.
- Breaches are warnings, so they don’t block Auto Export. Set the four limit checks to Fail if a breach should stop the data going further.
Contact the Quantemplate support team, or use your AI agent, to build custom logic for your use case.
Limits
- The rules are written from the text of each country’s regulations. Review them against your own reading, and check for later changes.
- It measures the fund against each limit. It doesn’t produce the returns that go to each country’s regulator.
- Botswana’s minimum for assets in Botswana is checked at 47%, the level due by December 2026, whatever the valuation date. Shares in building societies have no asset class, and exemptions the regulator grants aren’t applied.
- Ghana’s carve-outs for green bonds, the limits for each Tier 2 constituent fund, and the 10% limits on one issue, on a company’s market cap and on a bank’s shareholders’ funds aren’t checked.
- Kenya’s limit on a single issuer’s total securities (regulation 18A(b)) isn’t checked, and debt for infrastructure and affordable housing (Table G item 15) has no percentage to check against. Government securities are checked at 90%, not the 100% allowed for schemes that receive statutory contributions.
- Namibia’s 10% cap on foreign companies’ shares counted as domestic (regulation 13(3)) isn’t applied, and other claims (Annexure A item 8) have no asset class. Standards under the Financial Institutions and Markets Act may replace these regulations.
- The funds and their holdings are made up.
- The build doesn’t set up Auto Run, Auto Export or feeds.
- The agent works through the app in your browser, so changes someone makes in the app whilst it’s working can trip it up.