Logo Capital Gains Vs Business Income Classification

Capital Gains Vs Business Income Classification

Cộng đồng
HimanshuJ16
capital-gains-vs-business-income-classification

Dùng khi phân loại các giao dịch đã đóng trong một năm vào đúng nhóm thuế được cơ quan thuế liên quan công nhận, theo mục 43(5) và 2(42A) của luật Ấn Độ, mục 1222, 475(f) và 1256 của IRC Hoa Kỳ hoặc các tiêu chí của Canada. Các nhóm khác nhau tùy theo khu vực pháp lý, nên không có chế độ chung.

Add to TypingMind

Tổng quan

Nhà phát hànhHimanshuJ16
Kho mãAlgo-Trading-Skills
Tên kỹ năngcapital-gains-vs-business-income-classification
Sao
50
Bản fork
7
Tệp đi kèm
5
Giấy phépApache-2.0
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 5 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được HimanshuJ16 công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Capital Gains Vs Business Income Classification trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/capital-gains-vs-business-income-classification
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

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
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Capital Gains Vs Business Income Classification trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Capital Gains Vs Business Income Classification ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Capital Gains Vs Business Income Classification với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

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

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Capital Gains Vs Business Income Classification làm được gì?

Dùng khi phân loại các giao dịch đã đóng trong một năm vào đúng nhóm thuế được cơ quan thuế liên quan công nhận, theo mục 43(5) và 2(42A) của luật Ấn Độ, mục 1222, 475(f) và 1256 của IRC Hoa Kỳ hoặc các tiêu chí của Canada. Các nhóm khác nhau tùy theo khu vực pháp lý, nên không có chế độ chung.

Vì sao nên dùng Capital Gains Vs Business Income Classification trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Capital Gains Vs Business Income Classification là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Capital Gains Vs Business Income Classification trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/capital-gains-vs-business-income-classification. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Capital Gains Vs Business Income Classification?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Capital Gains Vs Business Income Classification với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Capital Gains Vs Business Income Classification với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Capital Gains Vs Business Income Classification có miễn phí không?

Có. Kỹ năng này được HimanshuJ16 phát hành trên GitHub theo giấy phép Apache-2.0. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇