go-yfinance v1.1.0 Development Progress
Last Updated: 2026-01-26
Overview
Implementation of the Price Repair system to provide data quality equivalent to Python yfinance v1.1.0.
Branch Structure
main
└── dev
└── feature/v1.1.0-update ← v1.1.0 integration branch (all phases merged)
├── feature/v1.1.0-phase1 ← ✅ Completed and merged
├── feature/v1.1.0-phase2 ← ✅ Completed and merged
├── feature/v1.1.0-phase3 ← ✅ Completed and merged
├── feature/v1.1.0-phase4 ← ✅ Completed and merged
└── feature/v1.1.0-phase5 ← ✅ Completed and merged
Phase 1: Foundation (Completed)
Goal: Create statistics package and basic structure
Tasks
| Item | Status | Notes |
|---|---|---|
Create pkg/stats/ package |
✅ Done | |
| - percentile.go | ✅ Done | Percentile, IQR, Mean, Std, Median |
| - zscore.go | ✅ Done | Z-score, Rolling Mean/Std |
| - filter.go | ✅ Done | MedianFilter, MedianFilter2D, OutlierMask |
| - stats_test.go | ✅ Done | 20+ test cases |
pkg/repair/ package structure |
✅ Done | |
| - doc.go | ✅ Done | Package documentation |
| - repair.go | ✅ Done | Repairer, Options, placeholders |
Modify models/history.go |
✅ Done | CapitalGains, Repaired, RepairOptions |
Modify ticker/history.go |
✅ Done | Capital Gains parsing |
| MkDocs documentation update | ✅ Done | advanced/price-repair.md |
| Phase 1 merge | ✅ Done | → feature/v1.1.0-update (2026-01-26) |
Changed Files
pkg/
├── stats/ ← New
│ ├── doc.go
│ ├── percentile.go
│ ├── zscore.go
│ ├── filter.go
│ └── stats_test.go
├── repair/ ← New
│ ├── doc.go
│ └── repair.go
└── models/
└── history.go ← Modified
Phase 2: Core Repair (Completed)
Goal: Implement Capital Gains and Stock-Split Repair
Tasks
| Item | Status | Notes |
|---|---|---|
repair/capital_gains.go |
✅ Done | Double-counting detection and fix |
repair/split.go |
✅ Done | IQR-based detection, split correction |
| Test fixtures | ✅ Done | 18+ test cases |
| MkDocs documentation | ✅ Done | advanced/price-repair.md |
| Phase 2 merge | ✅ Done | → feature/v1.1.0-update (2026-01-26) |
Phase 3: Advanced Repair (Completed)
Goal: Unit Mixup and Zero Value Repair
Tasks
| Item | Status | Notes |
|---|---|---|
repair/unit_mixup.go |
✅ Done | 100x currency errors ($/cents, £/pence) |
repair/zeroes.go |
✅ Done | Missing/zero value correction |
repair/unit_mixup_test.go |
✅ Done | 15+ test cases |
repair/zeroes_test.go |
✅ Done | 15+ test cases |
| Phase 3 merge | ✅ Done | → feature/v1.1.0-update (2026-01-26) |
Changed Files
pkg/repair/
├── unit_mixup.go ← New (Random mixups, Unit switch detection/fix)
├── unit_mixup_test.go ← New
├── zeroes.go ← New (Zero/NaN detection/fix)
├── zeroes_test.go ← New
└── repair.go ← Modified (placeholder removed)
Algorithm Details
Unit Mixup Repair:
- Random 100x errors: Detect ~100x values using 2D MedianFilter
- Unit Switch: IQR-based detection of sudden 100x price changes
- KWF (Kuwaiti Dinar) special handling (1000 unit)
Zero Value Repair:
- Detect zero bars where trading occurred (Volume > 0, Splits, Dividends)
- Neighbor-based interpolation (Forward fill, Backward fill)
- Partial zero correction (when only some OHLC values are zero)
Phase 4: Dividend Repair (Completed)
Goal: Implement Dividend Repair
Tasks
| Item | Status | Notes |
|---|---|---|
repair/dividend.go |
✅ Done | Dividend adjustment error correction |
repair/dividend_test.go |
✅ Done | 27+ test cases |
| Phase 4 merge | ✅ Done | → feature/v1.1.0-update (2026-01-26) |
Changed Files
pkg/repair/
├── dividend.go ← New (Dividend analysis and correction)
├── dividend_test.go ← New
└── repair.go ← Modified (placeholder removed)
Algorithm Details
Dividend Repair:
- Missing Adjustment: Detect and fix when Adj Close = Close
- Too Large (100x): Dividend currency unit error (100x too large)
- Too Small (0.01x): Dividend currency unit error (100x too small)
- Phantom Detection: Detect duplicate dividends within 7-17 days
- Window Volatility: Error determination based on surrounding price volatility
Phase 5: MIC Mapping and Finalization (Completed)
Goal: MIC code support and final cleanup
Tasks
| Item | Status | Notes |
|---|---|---|
pkg/utils/mic.go |
✅ Done | ISO 10383 MIC code mapping (60+ exchanges) |
pkg/utils/mic_test.go |
✅ Done | 10 test cases |
| Final documentation | ✅ Done | Added docs/advanced/mic-codes.md |
| v1.1.0 release notes | ✅ Done | RELEASE_NOTES_v1.1.0.md |
| Phase 5 merge | ✅ Done | → feature/v1.1.0-update (2026-01-26) |
Changed Files
Key Features
MIC Code Mapping:
- MICToYahooSuffix: ISO 10383 MIC → Yahoo Finance suffix
- YahooSuffixToMIC: Yahoo suffix → MIC (reverse mapping)
- GetYahooSuffix(mic): Look up suffix from MIC
- GetMIC(suffix): Look up MIC from suffix
- FormatYahooTicker(base, mic): "AAPL" + "XLON" → "AAPL.L"
- ParseYahooTicker(ticker): "AAPL.L" → ("AAPL", "L")
- IsUSExchange(mic): Check if US exchange
- AllMICs(): List of all supported MIC codes
- AllYahooSuffixes(): List of all supported Yahoo suffixes
Change History
| Date | Description |
|---|---|
| 2026-01-26 | Branch structure setup, Phase 1 started |
| 2026-01-26 | Phase 1 completed and merged, Phase 2 started |
| 2026-01-26 | Phase 2 completed and merged (Capital Gains, Stock Split Repair) |
| 2026-01-26 | Phase 3 completed and merged (Unit Mixup, Zero Value Repair) |
| 2026-01-26 | Phase 4 completed and merged (Dividend Repair) |
| 2026-01-26 | Phase 5 completed and merged (MIC Code Mapping) |