Logo van Capital Gains Vs Business Income Classification

Capital Gains Vs Business Income Classification

Community
HimanshuJ16
capital-gains-vs-business-income-classification

Gebruik dit om een jaar aan gesloten transacties in te delen in de fiscale categorieën die een belastingdienst daadwerkelijk erkent, volgens de Indiase s.43(5) en s.2(42A), de Amerikaanse IRC s.1222, s.475(f) en s.1256, of de Canadese criteria. De categorieën verschillen per rechtsgebied, dus er is geen algemene modus.

Add to TypingMind

Overzicht

UitgeverHimanshuJ16
RepositoryAlgo-Trading-Skills
Skillnaamcapital-gains-vs-business-income-classification
Sterren
50
Forks
7
Meegeleverde bestanden
5
LicentieApache-2.0
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Meegeleverde bestanden: 5

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. De bestanden kunnen alleen worden gelezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door HimanshuJ16 op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Capital Gains Vs Business Income Classification in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/capital-gains-vs-business-income-classification
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/HimanshuJ16/Algo-Trading-Skills.git /tmp/Algo-Trading-Skills
mkdir -p .claude/skills
cp -r /tmp/Algo-Trading-Skills/skills/capital-gains-vs-business-income-classification .claude/skills/capital-gains-vs-business-income-classification
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Capital Gains Vs Business Income Classification in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Capital Gains Vs Business Income Classification automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Capital Gains Vs Business Income Classification niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

Engineering guidance, not tax advice. This skill encodes how to build and verify the bookkeeping and the checks around it; it does not determine anyone's tax position. Confirm the treatment with a qualified tax professional in the relevant jurisdiction before relying on its output for a filing.

When to Use

Use this skill when sorting a year's closed trades into the tax buckets a particular tax authority recognises — for end-of-year reporting, or for modelling net post-tax PnL in a backtest. The classification is jurisdiction-specific down to the category names, so the engine takes Jurisdiction as a required argument:

IndiaUnited StatesCanada
Business income split by speculation?Yes — speculative vs non-speculative (s.43(5))No such conceptNo such concept
Capital gains split by holding period?Yes — 12 months listed, 24 months otherwise (s.2(42A))Yes — more than one year (IRC s.1222)No — holding period is irrelevant
What makes trading income business income?Shares held as stock-in-trade (CBDT Circular 6/2016); non-delivery settlement is always speculative businessAn IRC s.475(f) mark-to-market electionIncome account under the IT-479R factors, absent an ITA s.39(4) election

When NOT to Use

  • For a jurisdiction not listed above. There is no generic mode and no default. Porting India's speculative/non-speculative split to a US or Canadian return invents categories that do not exist on those forms.
  • To compute tax payable. The engine classifies only. It applies no rates, no s.112A ₹1.25 lakh exemption, no s.111A rate, no Canadian inclusion rate, no US bracket.
  • To net losses across buckets. Bucket-level set-off rules are separate and asymmetric — an Indian speculative business loss can only be set off against speculative business income (s.73), which the aggregate output does not enforce.
  • As the s.1256 engine. US s.1256 contracts are flagged and routed out to section-1256-contract-tax-treatment-us-futures; the 60/40 split is not computed here.
  • To decide whether the taxpayer is a trader. Trader-versus-investor status, the s.475(f) election, the s.39(4) election and the stock-in-trade position are all filing positions the taxpayer takes with an adviser. They are inputs (TaxElections), never inferences the engine draws from trade frequency.

Prerequisites

  • Closed round-trip trades with acquisition and disposal timestamps. Prefer timezone-aware timestamps: the session date decides intraday classification, and a US session closing at 16:00 ET falls on the next UTC date.
  • Asset class tags, plus whether the instrument is listed on a recognised exchange (is_listed).
  • For India, a delivery flag (settled_without_delivery) per trade. The statutory test in s.43(5) is settlement without actual delivery, not the calendar.
  • The taxpayer's elections for the year, as a TaxElections object.

Workflow

  1. Fix the Jurisdiction First: Construct TaxClassificationEngine(Jurisdiction.INDIA | UNITED_STATES | CANADA, elections). There is no neutral default, because the output categories differ per jurisdiction. aggregate_pnl returns only the buckets that exist in that jurisdiction, so a caller cannot read a zero out of a bucket its tax code does not have.
  2. Supply Elections, Never Infer Them: Populate TaxElections. A high trade count does not by itself make a US trader's gains ordinary — only a timely s.475(f) election does. Note that s.39(4) is unavailable to traders and dealers under s.39(5) and cannot be rescinded once made.
  3. Normalise Timestamps: The engine converts aware timestamps to the exchange-local session timezone before taking dates, and rejects a trade whose open and close differ in timezone awareness rather than comparing them and producing a TypeError deep in the call stack.
  4. Classify: explain_trade() returns the category and the rationale naming the provision applied — keep the rationale in the ledger, because it is what makes the classification auditable a year later.
  5. Apply the Delivery Test (India): If settled_without_delivery is not supplied, the engine falls back to a same-session-date proxy and logs a warning. Treat that warning as a data-quality defect to fix, not as noise: the proxy misclassifies delivery-based same-day trades and BTST positions.
  6. Route the Buckets: Send each category to its own return line and its own set-off pool. Deduct infrastructure and data costs only against business-income buckets.

Full procedure: see references/workflows.md. Standards reference: see references/standards.md. Printable pre-flight checklist: see assets/checklist.md.

Common Pitfalls

  • Assuming the Categories Travel: "Speculative business income" is a creature of India's s.43(5). A US return has no such line; an intraday US equity round trip is an ordinary short-term capital gain absent a s.475(f) election. Canada has neither the speculative split nor a long-term/short-term split.
  • Counting 365 Days Instead of 12 Months: Both India (s.2(42A): "not more than twelve months") and the US (IRS Topic 409: "more than one year") use calendar periods and a strict threshold. A position bought 1 Jan 2024 and sold 31 Dec 2024 is 365 days but is still short-term; and one sold on the 1 Jan 2025 anniversary is also still short-term. A days >= 365 test gets both wrong.
  • Treating F&O as Business Income Everywhere: India's s.43(5) proviso (d) carve-out only reaches eligible derivative transactions on a recognised stock exchange — an OTC derivative stays speculative. In the US the same contract is likely a s.1256 contract with a 60/40 split, and in Canada IT-346R lets a speculator report futures on capital account if done consistently.
  • Deriving Session Dates from UTC: Taking .date() off a UTC timestamp turns a single US or Canadian session into a two-day hold, flipping an intraday trade into an overnight one.
  • Switching Basis Between Years: Every election here carries a consistency obligation — CBDT Circular 6/2016, IT-346R, and the irrevocable s.39(4) election alike. Flipping treatment year to year is what invites the assessment.
  • Summing a Tax Ledger in Floats: Binary float drift lands in a filed figure. The engine accumulates in Decimal and converts incoming floats via str().
  • Deducting Expenses Against Capital Gains: Server, data-feed and execution costs are deductible against business income, not against a capital gain.
  • Ignoring Wash Sale / Superficial Loss Rules: Neither is applied here — see wash-sale-rule-tracking-us.

Verification

  • Classify one trade bought 1 Jan 2024 and sold 1 Jan 2025 under Jurisdiction.UNITED_STATES: it must be SHORT_TERM_CAPITAL_GAINS, not long-term. Move the disposal to 2 Jan 2025 and confirm it flips to LONG_TERM_CAPITAL_GAINS.
  • Classify the same intraday equity trade under all three jurisdictions and confirm three different answers: SPECULATIVE_BUSINESS (India), SHORT_TERM_CAPITAL_GAINS (US), BUSINESS_INCOME (Canada, absent a s.39(4) election).
  • Classify a seven-year Canadian equity hold and confirm no LONG_TERM_CAPITAL_GAINS is ever produced.
  • Run python -m unittest discover -s skills/capital-gains-vs-business-income-classification/scripts and confirm all tests pass.

Related Skills

  • section-1256-contract-tax-treatment-us-futures
  • mark-to-market-election-for-active-traders-us
  • wash-sale-rule-tracking-us
  • fifo-vs-specific-lot-tax-accounting-methods
  • multi-jurisdiction-tax-residency-implications
  • best-execution-record-keeping-global

Meegeleverde bestanden

Zolang de skill geladen is, leest het model deze bestanden als dat nodig is. Het model kan ze alleen lezen; ze worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Capital Gains Vs Business Income Classification?

Gebruik dit om een jaar aan gesloten transacties in te delen in de fiscale categorieën die een belastingdienst daadwerkelijk erkent, volgens de Indiase s.43(5) en s.2(42A), de Amerikaanse IRC s.1222, s.475(f) en s.1256, of de Canadese criteria. De categorieën verschillen per rechtsgebied, dus er is geen algemene modus.

Waarom Capital Gains Vs Business Income Classification gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Capital Gains Vs Business Income Classification bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Capital Gains Vs Business Income Classification in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/capital-gains-vs-business-income-classification. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Capital Gains Vs Business Income Classification gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Capital Gains Vs Business Income Classification gebruiken?

Zoveel als je wilt. Je kunt Capital Gains Vs Business Income Classification gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Capital Gains Vs Business Income Classification gratis?

Ja. Deze skill is door HimanshuJ16 op GitHub gepubliceerd onder de licentie Apache-2.0. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇