wash-sale-detection
Wash Sale Detection
Detect wash sales under current US crypto tax rules (effective 2025), monitor the 61-day window around realized losses, track disallowed losses with basis adjustments, and compute safe re-entry countdowns.
Disclaimer: This skill provides informational analysis only. It is NOT tax advice. Consult a qualified tax professional or CPA for guidance on your specific situation. Tax law is complex, and the application of wash sale rules to cryptocurrency may vary based on individual circumstances, IRS guidance updates, and court rulings.
Background
Before 2025, cryptocurrency was not subject to the wash sale rule because digital assets were classified as property rather than securities. The Infrastructure Investment and Jobs Act and subsequent IRS rulemaking extended wash sale treatment to digital assets beginning January 1, 2025.
Under IRC Section 1091 (as amended for digital assets), if you sell or dispose of a cryptocurrency at a loss and acquire a substantially identical asset within a 61-day window (30 days before the sale through 30 days after), the loss is disallowed for tax purposes. The disallowed loss is added to the cost basis of the replacement position.
Key Concepts
The 61-Day Window
Day -30 ................. Day 0 ................. Day +30
|--- 30 days before ---|--- sale day ---|--- 30 days after ---|
More from agiprolabs/claude-trading-skills
pandas-ta
Technical analysis with 130+ indicators using pandas-ta for crypto market data
107risk-management
Portfolio-level risk controls, drawdown management, exposure limits, and circuit breakers for crypto trading
76feature-engineering
Feature construction from market data for ML trading models including price, volume, on-chain, and microstructure features
76trading-visualization
Professional trading charts including candlesticks, equity curves, drawdowns, correlation heatmaps, and return distributions
76signal-classification
ML trading signal classifiers using XGBoost and LightGBM with walk-forward validation, SHAP feature importance, and threshold optimization
73market-microstructure
DEX orderflow analysis, trade classification, buyer/seller pressure, and microstructure signals for Solana tokens
73