取引会計と複式簿記
取引業務における複式簿記を、総勘定元帳管理、損益計算書、貸借対照表、キャッシュフロー計算書作成と合わせて行い、企業の財務状況を把握・分析するSkill。
📜 元の英語説明(参考)
Double-entry bookkeeping for trading operations with ledger management, P&L statements, balance sheets, and cash flow reporting
🇯🇵 日本人クリエイター向け解説
取引業務における複式簿記を、総勘定元帳管理、損益計算書、貸借対照表、キャッシュフロー計算書作成と合わせて行い、企業の財務状況を把握・分析するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o trade-accounting.zip https://jpskill.com/download/10447.zip && unzip -o trade-accounting.zip && rm trade-accounting.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/10447.zip -OutFile "$d\trade-accounting.zip"; Expand-Archive "$d\trade-accounting.zip" -DestinationPath $d -Force; ri "$d\trade-accounting.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
trade-accounting.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
trade-accountingフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
貿易会計
あなたのトレーディング業務をビジネスのように運営しましょう。費やされたすべての SOL、取得されたすべてのトークン、支払われたすべての手数料、実現されたすべての利益を、複式簿記で追跡することで、常に帳簿のバランスが保たれます。個人のウォレットであろうと LLC であろうと、適切な会計処理は混乱を明瞭さに変えます。
中核となる原則: すべての取引は、少なくとも2つの勘定科目に影響を与えます。トークンを購入しますか?現金は減少し、トークンの保有量は増加します — 同じ金額だけ。この複式簿記の制約により、エラーが自動的に検出されます。借方と貸方が一致しない場合、何かが間違っています。
トレーダーが会計を必要とする理由
ほとんどのトレーダーは、損益を大まかに追跡しています — 「50 SOL から始めて、今は 62 SOL になった」など。これでは、次のことについて何もわかりません。
- 実現した取引と未実現ポジションからどれだけの金額が得られたか
- 累積手数料(ガス代、優先手数料、スワップ手数料)としていくら支払ったか
- ステーキングと LP の収入が運営費をカバーしているかどうか
- 各保有資産の実際の原価(税金にとって非常に重要)
- キャッシュフローのタイミング — 収益性はあるが流動性がないか?
適切な会計処理は、これらすべてに答えます。また、トレーディング損益(時価評価、戦略評価に役立つ)と税務上の損益(特定の原価計算方法を使用した実現利益、コンプライアンスに必要)を分離します。
勘定科目の種類
トレーディング業務では、標準的な会計処理に従って、次の4つの勘定科目を使用します。
| カテゴリ | 通常残高 | 例 |
|---|---|---|
| 資産 | 借方 | 現金(SOL/USDC)、トークン保有、LP ポジション、ステーキング預金、売掛金 |
| 負債 | 貸方 | 証拠金借り入れ、未払税金 |
| 収入 | 貸方 | 実現トレーディング利益、ステーキング報酬、エアドロップ収入、LP 手数料収入 |
| 費用 | 借方 | トレーディング手数料、ガス/優先手数料、サブスクリプション費用、データフィード |
| 資本 | 貸方 | オーナー資本拠出、繰越利益、引き出し(控除) |
勘定科目表
完全な勘定科目表については、references/planned_features.md を参照してください。最小限のセットアップ:
1000 資産
1010 現金 – SOL
1020 現金 – USDC
1100 トークン保有(トークンごとに1つの補助勘定)
1200 LP ポジション
1300 ステーキング預金
3000 収入
3010 実現トレーディング利益
3020 ステーキング報酬
3030 エアドロップ収入
3040 LP 手数料収入
4000 費用
4010 トレーディング手数料(DEX スワップ手数料)
4020 ガス & 優先手数料
4030 スリッページコスト
5000 資本
5010 オーナー資本
5020 繰越利益
5030 オーナー引き出し(資本控除)
複式簿記
すべての取引は、同額の借方と貸方を記録します。借方は資産と費用の勘定科目を増加させ、貸方は負債、収入、および資本の勘定科目を増加させます。
仕訳の例
1000 BONK を 0.5 SOL で購入(0.001 SOL のガス代):
| 勘定科目 | 借方 | 貸方 |
|---|---|---|
| トークン保有 – BONK | 0.501 SOL | |
| 現金 – SOL | 0.501 SOL |
または、手数料を明示的に分割した場合:
| 勘定科目 | 借方 | 貸方 |
|---|---|---|
| トークン保有 – BONK | 0.5 SOL | |
| ガス & 優先手数料 | 0.001 SOL | |
| 現金 – SOL | 0.501 SOL |
1000 BONK を 0.8 SOL で売却(原価は 0.5 SOL、ガス代 0.001 SOL):
| 勘定科目 | 借方 | 貸方 |
|---|---|---|
| 現金 – SOL | 0.799 SOL | |
| ガス & 優先手数料 | 0.001 SOL | |
| トークン保有 – BONK | 0.5 SOL | |
| 実現トレーディング利益 | 0.3 SOL |
0.05 SOL のステーキング報酬を受け取る:
| 勘定科目 | 借方 | 貸方 |
|---|---|---|
| 現金 – SOL | 0.05 SOL | |
| ステーキング報酬 | 0.05 SOL |
5000 JUP のエアドロップを受け取る(受領時の評価額は 2.1 SOL):
| 勘定科目 | 借方 | 貸方 |
|---|---|---|
| トークン保有 – JUP | 2.1 SOL | |
| エアドロップ収入 | 2.1 SOL |
0.03 SOL の LP 手数料を徴収する:
| 勘定科目 | 借方 | 貸方 |
|---|---|---|
| 現金 – SOL | 0.03 SOL | |
| LP 手数料収入 | 0.03 SOL |
一部決済 — ポジションの半分を売却:
2000 BONK を原価 1.0 SOL で保有し、1000 を 0.7 SOL で売却する場合:
| 勘定科目 | 借方 | 貸方 |
|---|---|---|
| 現金 – SOL | 0.699 SOL | |
| ガス & 優先手数料 | 0.001 SOL | |
| トークン保有 – BONK | 0.5 SOL | |
| 実現トレーディング利益 | 0.2 SOL |
売却された部分の原価(0.5 SOL = 1.0 SOL の半分)は、資産勘定から削除されます。
取引の種類
元帳は、次のトレーディングフローを処理します。
| フロー | 影響を受ける勘定科目 |
|---|---|
| 口座への入金 | 現金(借方)、オーナー資本(貸方) |
| 資金の引き出し | オーナー引き出し(借方)、現金(貸方) |
| トークンの購入 | トークン保有(借方)、現金(貸方)、ガス費用(借方) |
| トークンの売却 | 現金(借方)、トークン保有(貸方)、実現利益(貸方または損失の場合は借方)、ガス費用(借方) |
| 一部決済 | 売却と同様、比例配分された原価 |
| トークンとトークンの交換 | トークン B(借方)、トークン A(貸方)、手数料 |
| ステーキング預金 | ステーキング預金(借方)、現金(貸方) |
| ステーキング報酬 | 現金(借方)、ステーキング報酬(貸方) |
| エアドロップの受領 | トークン保有(借方)、エアドロップ収入(貸方) |
| LP 手数料の徴収 | 現金(借方)、LP 手数料収入(貸方) |
| トレーディング手数料 | トレーディング手数料(借方)、現金(貸方) |
| ガス/優先手数料 | ガス & 優先手数料(借方)、現金(貸方) |
レポート
損益計算書
期間の収入から費用を引いたものを示します。
═══════════════════════════════════════════
損益計算書:2026-02-01 から 2026-02-28
═══════════════════════════════════════════
収入
実現トレーディング利益 ........ 4.200 SOL
ステーキング報酬 ............... 0.150 SOL
エアドロップ収入 ................ 2.100 SOL
LP 手数料収入 ................. 0.090 SOL
─────────
総収入 6.540 SOL
費用
トレーディング手数料 .................. 0.120 SOL
ガス & 優先手数料 ........... 0.045 SOL
スリッページコスト ................. 0.030 SOL
─────────
総費用 0.195 SOL
═══════════════════════════════════════════
純利益 6 📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Trade Accounting
Run your trading operation like a business. Every SOL spent, every token acquired, every fee paid, every gain realized — tracked with double-entry bookkeeping so your books always balance. Whether you trade through a personal wallet or an LLC, proper accounting turns chaos into clarity.
Core principle: Every transaction touches at least two accounts. Buy a token? Cash goes down, token holdings go up — by the same amount. This double-entry constraint catches errors automatically: if debits do not equal credits, something is wrong.
Why Traders Need Accounting
Most traders track P&L loosely — "I started with 50 SOL and now I have 62 SOL." That tells you nothing about:
- How much came from realized trades vs unrealized positions
- What you paid in cumulative fees (gas, priority fees, swap fees)
- Whether your staking and LP income covers your operating costs
- Your actual cost basis for each holding (critical for taxes)
- Cash flow timing — are you profitable but illiquid?
Proper accounting answers all of these. It also separates trading P&L (mark-to-market, useful for strategy evaluation) from tax P&L (realized gains using a specific cost basis method, required for compliance).
Account Types
A trading operation uses four account categories following standard accounting:
| Category | Normal Balance | Examples |
|---|---|---|
| Assets | Debit | Cash (SOL/USDC), token holdings, LP positions, staking deposits, receivables |
| Liabilities | Credit | Margin borrowing, accrued taxes payable |
| Income | Credit | Realized trading gains, staking rewards, airdrop income, LP fee income |
| Expenses | Debit | Trading fees, gas/priority fees, subscription costs, data feeds |
| Equity | Credit | Owner capital contributions, retained earnings, withdrawals (contra) |
Chart of Accounts
See references/planned_features.md for a full chart of accounts. A minimal setup:
1000 Assets
1010 Cash – SOL
1020 Cash – USDC
1100 Token Holdings (one sub-account per token)
1200 LP Positions
1300 Staking Deposits
3000 Income
3010 Realized Trading Gains
3020 Staking Rewards
3030 Airdrop Income
3040 LP Fee Income
4000 Expenses
4010 Trading Fees (DEX swap fees)
4020 Gas & Priority Fees
4030 Slippage Cost
5000 Equity
5010 Owner Capital
5020 Retained Earnings
5030 Owner Withdrawals (contra-equity)
Double-Entry Bookkeeping
Every transaction records equal debits and credits. Debits increase asset and expense accounts; credits increase liability, income, and equity accounts.
Entry Examples
Buy 1000 BONK for 0.5 SOL (0.001 SOL gas fee):
| Account | Debit | Credit |
|---|---|---|
| Token Holdings – BONK | 0.501 SOL | |
| Cash – SOL | 0.501 SOL |
Or with the fee broken out explicitly:
| Account | Debit | Credit |
|---|---|---|
| Token Holdings – BONK | 0.5 SOL | |
| Gas & Priority Fees | 0.001 SOL | |
| Cash – SOL | 0.501 SOL |
Sell 1000 BONK for 0.8 SOL (cost basis was 0.5 SOL, 0.001 SOL gas):
| Account | Debit | Credit |
|---|---|---|
| Cash – SOL | 0.799 SOL | |
| Gas & Priority Fees | 0.001 SOL | |
| Token Holdings – BONK | 0.5 SOL | |
| Realized Trading Gains | 0.3 SOL |
Receive staking rewards of 0.05 SOL:
| Account | Debit | Credit |
|---|---|---|
| Cash – SOL | 0.05 SOL | |
| Staking Rewards | 0.05 SOL |
Receive airdrop of 5000 JUP (valued at 2.1 SOL at receipt):
| Account | Debit | Credit |
|---|---|---|
| Token Holdings – JUP | 2.1 SOL | |
| Airdrop Income | 2.1 SOL |
Collect LP fees of 0.03 SOL:
| Account | Debit | Credit |
|---|---|---|
| Cash – SOL | 0.03 SOL | |
| LP Fee Income | 0.03 SOL |
Partial close — sell half a position:
If you hold 2000 BONK at cost basis 1.0 SOL and sell 1000 for 0.7 SOL:
| Account | Debit | Credit |
|---|---|---|
| Cash – SOL | 0.699 SOL | |
| Gas & Priority Fees | 0.001 SOL | |
| Token Holdings – BONK | 0.5 SOL | |
| Realized Trading Gains | 0.2 SOL |
The cost basis of the sold portion (0.5 SOL = half of 1.0 SOL) is removed from the asset account.
Transaction Types
The ledger handles these trading flows:
| Flow | Accounts Touched |
|---|---|
| Fund account | Cash (debit), Owner Capital (credit) |
| Withdraw funds | Owner Withdrawals (debit), Cash (credit) |
| Buy token | Token Holdings (debit), Cash (credit), Gas Expense (debit) |
| Sell token | Cash (debit), Token Holdings (credit), Realized Gains (credit or debit for loss), Gas Expense (debit) |
| Partial close | Same as sell, pro-rated cost basis |
| Swap token for token | Token B (debit), Token A (credit), fees |
| Staking deposit | Staking Deposits (debit), Cash (credit) |
| Staking reward | Cash (debit), Staking Rewards (credit) |
| Airdrop received | Token Holdings (debit), Airdrop Income (credit) |
| LP fee collected | Cash (debit), LP Fee Income (credit) |
| Trading fee | Trading Fees (debit), Cash (credit) |
| Gas/priority fee | Gas & Priority Fees (debit), Cash (credit) |
Reports
Profit & Loss Statement
Shows income minus expenses for a period:
═══════════════════════════════════════════
P&L Statement: 2026-02-01 to 2026-02-28
═══════════════════════════════════════════
INCOME
Realized Trading Gains ........ 4.200 SOL
Staking Rewards ............... 0.150 SOL
Airdrop Income ................ 2.100 SOL
LP Fee Income ................. 0.090 SOL
─────────
Total Income 6.540 SOL
EXPENSES
Trading Fees .................. 0.120 SOL
Gas & Priority Fees ........... 0.045 SOL
Slippage Cost ................. 0.030 SOL
─────────
Total Expenses 0.195 SOL
═══════════════════════════════════════════
NET INCOME 6.345 SOL
═══════════════════════════════════════════
Balance Sheet
Shows the accounting equation: Assets = Liabilities + Equity.
═══════════════════════════════════════════
Balance Sheet: 2026-02-28
═══════════════════════════════════════════
ASSETS
Cash – SOL .................... 32.450 SOL
Cash – USDC ................... 0.000 SOL
Token Holdings ................ 12.300 SOL
LP Positions .................. 5.000 SOL
Staking Deposits .............. 10.000 SOL
─────────
Total Assets 59.750 SOL
EQUITY
Owner Capital ................. 50.000 SOL
Retained Earnings ............. 3.405 SOL
Net Income (current period) ... 6.345 SOL
─────────
Total Equity 59.750 SOL
═══════════════════════════════════════════
Assets - Equity = 0.000 SOL ✓ Balanced
═══════════════════════════════════════════
Cash Flow Statement
Tracks where cash came from and where it went:
═══════════════════════════════════════════
Cash Flow: 2026-02-01 to 2026-02-28
═══════════════════════════════════════════
OPERATING ACTIVITIES
Trading proceeds .............. 8.500 SOL
Token purchases ............... (4.300) SOL
Fees paid ..................... (0.195) SOL
Staking rewards received ...... 0.150 SOL
LP fees received .............. 0.090 SOL
─────────
Net Operating Cash Flow 4.245 SOL
INVESTING ACTIVITIES
LP deposits ................... (5.000) SOL
Staking deposits .............. (2.000) SOL
─────────
Net Investing Cash Flow (7.000) SOL
FINANCING ACTIVITIES
Capital contributions ......... 10.000 SOL
Withdrawals ................... (1.000) SOL
─────────
Net Financing Cash Flow 9.000 SOL
═══════════════════════════════════════════
Net Change in Cash 6.245 SOL
Beginning Cash Balance 26.205 SOL
Ending Cash Balance 32.450 SOL
═══════════════════════════════════════════
Trading P&L vs Tax P&L
These are different numbers and serve different purposes:
| Aspect | Trading P&L | Tax P&L |
|---|---|---|
| Purpose | Strategy evaluation | Compliance, filing |
| Unrealized gains | Included (mark-to-market) | Excluded (until realized) |
| Cost basis method | Average cost (simple) | FIFO, LIFO, or specific ID (jurisdiction-dependent) |
| Timing | Real-time | At disposal event |
| Airdrops | Valued at receipt | Ordinary income at FMV on receipt |
| LP IL | Tracked as unrealized loss | Not a taxable event until withdrawal |
The ledger in scripts/trading_ledger.py tracks realized gains using FIFO by default. For trading P&L, you can overlay mark-to-market valuations on open positions.
See references/planned_features.md for detailed worked examples of how the same trades produce different P&L under FIFO vs average cost.
Entity Considerations
Traders operating through an LLC or S-Corp should track additional accounts:
- Management fees — if the entity charges a management fee
- Distributions — payments from entity to owner (not the same as withdrawals from a trading account)
- Payroll expenses — S-Corp officer salary
- Tax provisions — estimated quarterly tax payments
The accounting principles are identical; the chart of accounts simply expands. The scripts in this skill focus on the trading-level ledger, which is the foundation for entity-level reporting.
Quick Start
from trading_ledger import Ledger, Amount
ledger = Ledger(base_currency="SOL")
# Fund the account
ledger.record_funding(amount=50.0, memo="Initial capital")
# Buy a token
ledger.record_buy(
token="BONK",
quantity=100_000,
cost_sol=0.5,
fee_sol=0.001,
memo="Entry on volume spike"
)
# Sell for profit
ledger.record_sell(
token="BONK",
quantity=100_000,
proceeds_sol=0.8,
fee_sol=0.001,
memo="Target hit"
)
# Record staking reward
ledger.record_income(
income_type="staking",
amount_sol=0.05,
memo="Epoch 580 rewards"
)
# Generate reports
ledger.print_pnl(start="2026-02-01", end="2026-02-28")
ledger.print_balance_sheet(as_of="2026-02-28")
Run the demo script to see a full month of trading activity with all report types:
python scripts/trading_ledger.py --demo
Use Cases
- Track real P&L — Know exactly how much you made after all fees, not just entry/exit prices
- Tax preparation — Hand your accountant a clean ledger with cost basis and realized gains
- Fee analysis — Discover that gas and priority fees are eating 3% of your gross profits
- Strategy comparison — Compare net P&L across strategies, not just win rates
- Cash flow planning — Know if you have enough liquid SOL for the next trade
- Audit trail — Every number traces back to a dated, memo-tagged journal entry
Prerequisites
- Python 3.10+
- No external dependencies (the ledger uses only the standard library)
Files
| File | Description |
|---|---|
references/planned_features.md |
Chart of accounts, double-entry examples, report formats, trading vs tax P&L |
scripts/trading_ledger.py |
Double-entry ledger with P&L, balance sheet, and demo mode |
Disclaimer: This skill provides accounting structure and calculations for informational and organizational purposes only. It is not tax advice, legal advice, or financial advice. Consult a qualified tax professional or CPA for guidance on your specific tax obligations. Cryptocurrency tax treatment varies by jurisdiction and changes frequently.