Aller au contenu

Méthodes de Coût de Base

Méthodes prises en charge

MéthodeIDConforme IRSNotes
First In, First OutFIFO✅ Par défautLes lots les plus anciens vendus en premier
Last In, First OutLIFO⚠️ Specific IDDoit choisir Specific ID
Highest In, First OutHIFO⚠️ Specific IDDoit choisir Specific ID
Specific IDSPECIFIC_IDSélection manuelle des lots
Germany FIFOGERMANY_FIFO🇩🇪§23 EStG, détention 1 an
PMPAPMPA🇨🇦 🇦🇺Adjusted Cost Base
Total AverageTOTAL_AVERAGE🌍Coût de base moyen
UK Share PoolingUK_SHARE_POOLING🇬🇧Section 104 pool + règle des 30 jours

Note IRS

L’IRS autorise FIFO et Specific Identification pour les cryptos (Rev. Rul. 2023-14). LIFO et HIFO sont techniquement des stratégies Specific ID — vous devez tenir des registres par lot et appliquer votre méthode de manière cohérente.

Utilisation

import { computeGains, compareAllMethods } from '@dtax/tax-engine';
// Single method
const result = computeGains(transactions, {
method: 'FIFO',
taxYear: 2024,
});
// Compare all 7 comparable methods (excludes SPECIFIC_ID)
const comparison = compareAllMethods(transactions, 2024);
comparison.forEach(({ method, totalGain, recommendation }) => {
console.log(`${method}: $${totalGain} ${recommendation ? '← recommended' : ''}`);
});

Structure du résultat

interface GainResult {
shortTermGain: number;
longTermGain: number;
totalGain: number;
disposals: Disposal[];
unrealizedGain?: number;
}