Thinking global, living local

How to use india-forex-analysis: read, check and stress-test a 2020-2027 view of India's external account

October 27, 2026

A markdown-only study of India's trade deficit, foreign-exchange reserves and government borrowing. This guide shows how to read it, how to check its arithmetic yourself, and where the numbers do not hold together. The repository is archived and read-only. Macro analysis, not investment advice.

Open-Source Tools · How-To · Policy analysis

How to use india-forex-analysis: read, check and stress-test a 2020-2027 view of India's external account

Skip to article content
Text Size

Revised · v1.0.0 · what changed

US$ 691.11 bnFX reserves, March 2026 (as stated)
10.8 monthsimport cover (as stated)
9 + indexmarkdown analysis documents
2xapparent export double-count we found

Code: github.com/herrrickshaw/india-forex-analysis

Watch the walkthrough

Watch on YouTube: youtu.be/2yPEcJLO08s

Why it is useful

  • Who benefits: students and policy readers who want one worked narrative on reserves, the trade balance and debt service, with the working shown in plain markdown tables.
  • What it replaces: stitching together RBI reserve tables, Budget annexes and TradeStat extracts by hand for a first-pass picture.
  • Evidence from our read: the reserve table adds up (552.28 + 115.40 + 18.62 + 4.81 = 691.11) and the tax-share percentages recompute correctly.
  • Evidence of a problem: the stated 2023 exports of US$875.4 bn are exactly twice the 437.7 bn total row in the sibling india-trade-export-analysis data, so the headline deficit looks unreliable.
  • Treat it as a worked example to audit, not a source to cite.

What it is for

The repository is nine numbered markdown documents plus an index. They cover export growth 2020-2023, import and export analysis, RBI reserves versus the trade deficit, a reconciliation of Budget 2026-27 tax revenue, debt and borrowing trends, a five-year post-pandemic comparison, year-on-year deterioration, multi-source integration and an executive summary. There is no code to run.

It rates the situation an 'amber alert' and gives scenario probabilities. Those ratings and probabilities are the author's judgement, not outputs of a documented model. This is economic commentary for learning, not investment, trading or policy advice. The repository is archived (read-only).

Who it is for

  • Students of macroeconomics practising how to audit a report
  • Journalists who want a checklist of numbers to verify before quoting
  • Analysts looking for a structure to rebuild with sourced data
Not for.
  • Investment, trading or currency decisions
  • Quoting the trade-deficit headline (US$567 bn for 2023, US$769.5 bn for 2026) without re-checking it
  • Real-time reserve monitoring: the figures are dated March 2026 and some are projections

What you need

RequirementWhyHow to get it
A web browser or any markdown readerto read the documents on GitHubnothing to install
Python 3 (optional)to re-run the arithmetic checks in this poststandard library only, no packages
Not neededno API key, database or GPUthe repository contains no code

Get the code and an AI assistant

You do not have to be a programmer. Get the repository, give it to an AI assistant, and ask in plain language. Any of these routes works:

ToolWhat you needBest for
GitHubFree account to fork or star; git to clone, or the green Code button, then Download ZIP, or open in CodespacesGetting the code and keeping up with updates
Claude CodeClaude subscription or API key; run claude inside the cloned folderLetting the AI read and run the whole repo
Gemini CLIGoogle account; run gemini inside the cloned folderThe same hands-on workflow with Gemini
Claude.ai, Gemini or ChatGPT in the browserA chat account; upload README.md and the files you care about (or paste the output of git ls-files)Understanding the project and asking questions without installing anything
Other tools (Copilot Chat, Cursor, Codex CLI)Open the cloned folder in the tool and point it at README.md firstEditing and extending the code
git clone https://github.com/herrrickshaw/india-forex-analysis.git
cd india-forex-analysis
claude      # or: gemini

Install

  1. Get the documents
    git clone https://github.com/herrrickshaw/india-forex-analysis.git
    cd india-forex-analysis
  2. List what is there
    ls *.md

Quick start: commands and what you should see

Start with the index and README, then the reserves document

less README.md
less 3_RBI_RESERVES_vs_TRADE_DEFICIT_ANALYSIS.md

You see the executive summary, the amber-alert framing and the reserve composition table.

Re-compute the stated figures

python3 -I check.py   # a short script that re-adds the tables you copy from the documents

Five lines of arithmetic checks, shown in the sample outputs below. Our check script is not part of the repository.

Search for a number across all documents

grep -n "875.4" *.md

The same figure appears in several documents, which makes a single error spread.

Sample outputs

Real output from a run on the date shown in the sources line; trimmed to fit.

Arithmetic checks on figures the documents state

python3 -I check.py
reserve components sum: 691.11 (stated 691.11)
Sep-2025 to Mar-2026 change: -8.98 bn (-1.28%)
trade deficit monthly drain: 2023 47.2, 2026 64.1 bn
2026 deficit / 2019-20 deficit: 7.33x (stated 7.3x)
tax shares: Corp 27.9%, Income 33.3%, GST 23.1%, Excise 8.8%, Customs 6.2%, Other 0.6%

These pass: reserve components, the six-month change, the monthly-drain division and the tax shares are internally consistent.

Where the export figure goes wrong

grep -n '875.4' 2_IMPORT_EXPORT_ANALYSIS_2025_26.md; then read the 'India's Total Export' row of the sibling repo CSV
2_IMPORT_EXPORT_ANALYSIS_2025_26.md:13:- **Exports**: $875.4B
2_IMPORT_EXPORT_ANALYSIS_2025_26.md:79:Export Growth (2020-2023):       +44% ($583.6B → $875.4B) ✓ Strong
total row 2020: 291808.48  2023: 437704.58 (USD mn)   <- india-trade-export-analysis CSV
2 x total row: 583616.96  875409.16

US$875.4 bn is 2 x 437.7 bn. The sibling data has one 'India's Total Export' row plus the commodity rows, so adding both appears to have double-counted. The imports figure may have the same problem, which we did not check, so the stated deficit cannot be trusted in either direction until it is re-derived.

Reserve composition as stated (March 2026)

grep -n -A7 'Asset Class' 3_RBI_RESERVES_vs_TRADE_DEFICIT_ANALYSIS.md
| Asset Class | Value ($B) | % of Total |
| Foreign Currency Assets | 552.28 | 79.9% |
| Gold (880.52 MT) | 115.40 | 16.7% |
| SDRs | 18.62 | 2.7% |
| IMF Reserve Position | 4.81 | 0.7% |
| TOTAL | 691.11 | 100% |

Quoted from the repository; we did not check it against the RBI release.

Ways to use it

MethodHow it works
Audit exerciseRe-add every table and recompute every ratio. Note which figures are inputs, which are derived and which are projections.
Template for your own briefReuse the structure (reserves, trade, debt, scenarios) with data you source and cite yourself.
Ask an AI assistant to cross-checkGive it two documents and ask where figures disagree, then verify each claim against the primary source.

Sample prompts for your AI assistant

Copy, paste and edit the parts in [brackets].

  • Read README.md and 2_IMPORT_EXPORT_ANALYSIS_2025_26.md in this repo and list every number that cannot be derived from another number in the repo.
  • Recompute the reserve composition percentages in 3_RBI_RESERVES_vs_TRADE_DEFICIT_ANALYSIS.md and tell me if any do not add up.
  • The repo says exports were US$875.4 bn in 2023. Compare with [the official figure from the Commerce Ministry] and explain the gap.
  • Rewrite the executive summary so every claim states its source and whether it is actual, estimated or projected.
  • List the assumptions behind the scenario probabilities (25/60/15) and say what evidence would be needed to justify them.

Limits and honest caveats

  • The 2023 export total (US$875.4 bn) and the 2020 total (US$583.6 bn) are exactly twice the totals in the sibling trade data, which points to double counting; the 2023 deficit headline therefore needs re-deriving.
  • Scenario probabilities and 'confidence before and after PDFs' percentages are stated without a method.
  • Many 2026-27 figures are projections; the 'amber alert' is a judgement.
  • The analysis is not independently validated and the data-quality line in the README says HIGH without evidence.
  • Not investment, trading or policy advice. The repository is archived and will not be corrected.

Sources: Repository herrrickshaw/india-forex-analysis (archived, read on 2026-10-23); cross-check against herrrickshaw/india-trade-export-analysis EXTENDED_ANALYSIS_2020_2026.csv; arithmetic run with Python 3 standard library on 2026-10-23. Not run: nothing else (no code in repo).

Revision history.
  • v1.0.0 — 23 October 2026 — first published.

About this article: Researched, written and edited by Umashankar Triplicane Dwarakanathan, with AI research assistance; every figure is meant to trace to the primary source cited. See the Editorial Policy for how sourcing, AI use and corrections work.

Umashankar Triplicane Dwarakanathan
Contact Us
Umashankar Triplicane Dwarakanathan
Investment Promotion & Energy-Sector Leader · Chennai, Tamil Nadu, India
LinkedIn → GitHub → Email +91 78273 81696
How this site works

Data-led analysis of India's trade, currency and industrial policy. Every article is built from primary official sources, and every figure links back to the release, table or filing it came from.

Sources. DGCI&S TradeStat (imports/exports, HSN-wise) · PIB (government press releases, January 2017 to today, refreshed daily) · RBI (circulars, balance of payments) · MoSPI (CPI/WPI, IIP) · PARIVESH (environmental clearances) · CCIL (bond yields) · BIS (policy rates) · SEBI, NSE/BSE and SEC filings for company data.

Interpretation. Figures carry their vintage and retrieval date; estimates and press-reported numbers are labelled as such; where sources disagree, both are shown. Corrections are made visibly, never silently. Articles are written with AI assistance from the cited sources — AI-generated text can misstate figures even when working from real material, so verify any number that matters to a decision against the linked primary source.

footer

Browse all articles by topic

Every piece on this blog, grouped. Or read the full index.

Agriculture & FertilisersAI ToolsChemicalsClimate & CarbonEnergy & FuelsGas & LNGImport SubstitutionIndustrial PolicyMarkets & FinanceMobility & EVPrices & InflationTextilesTrade & Tariffs

Each topic is a live archive page that updates itself as pieces are labelled. It replaces a hand-kept list that had fallen 18 articles behind.