Skip to content

go-yfinance v1.3.0 Development Progress

Last Updated: 2026-04-25

Overview

Implementation of Python yfinance changes after v1.2.0 through v1.3.0. This includes the v1.2.1 and v1.2.2 patch releases plus v1.3.0 minor features.

Branch Structure

main
 └── feature/v1.3.0-parity

Changes from Python yfinance v1.2.0 -> v1.3.0

Python Release Upstream Change Go Status
1.2.1 Preserve currency in dividends Added dividend currency fields while keeping dividend amounts numeric; action helpers now parse event payloads directly
1.2.1 Improve download() thread-safety Already structurally safe in Go multi package; no shared global DataFrame map
1.2.1 Force curl_cffi>=0.15 Python-only dependency/security update; not applicable to Go
1.2.2 Add currency to analysis data Added currency fields to earnings, revenue, EPS trend, and EPS revision models
1.2.2 Fix history() nil/malformed responses Existing Go chart parsing already returns typed errors for missing result/error payloads
1.2.2 QueryBase typed operator refactor Existing Go API already uses string constants and typed constructors
1.3.0 Add valuation measures table Added Ticker.Valuation() / Ticker.ValuationMeasures()
1.3.0 Add ETFQuery Added models.ETFQuery, validation maps, and 4 ETF predefined screeners
1.3.0 Fix Ticker.dividends type regression Go dividends remain numeric with currency carried separately
1.3.0 Preserve action event series Added direct event parsing for dividends, splits, and capital gains plus Ticker.CapitalGains()

Implementation Summary

New Files

File Description
pkg/models/valuation.go Valuation table model and lookup helper
pkg/ticker/valuation.go Key-statistics HTML table fetch and parser
pkg/ticker/valuation_test.go Parser tests matching Python v1.3.0 fixture shape
pkg/ticker/history_test.go Action event parser tests for dividends, splits, and capital gains

Modified Areas

Area Changes
Screener models Added ETFQuery, ETF validation fields/values, ETF quote type
Predefined screeners Added top_etfs_us, top_performing_etfs, technology_etfs, bond_etfs
Analysis models Added currency fields to estimate/trend/revision models
History models Added dividend currency preservation, direct action event parsing, and capital gain action model
Docs README, MkDocs nav, development progress, release notes, generated API docs

Feature Details

ETFQuery

  • models.NewETFQuery(operator string, operands []any) (*ETFQuery, error)
  • ETFQuery.QuoteType() returns "ETF"
  • ETFQuery.ToDict() uses the same IS-IN expansion behavior as EquityQuery/FundQuery
  • Validation maps are ported from Python ETF_SCREENER_EQ_MAP and ETF_SCREENER_FIELDS

Valuation Measures

  • Ticker.Valuation() fetches https://finance.yahoo.com/quote/{symbol}/key-statistics
  • The first HTML table is parsed into models.ValuationMeasures
  • ValuationMeasures.Value(rowName, columnName) provides direct row/column lookup
  • Ticker.ValuationMeasures() is an alias

Currency Preservation

  • Analysis estimate models now include Currency
  • Dividend events now preserve Currency separately from numeric Amount
  • models.Bar includes DividendCurrency for history results that include actions

Action Event Series

  • Ticker.Dividends() and Ticker.Splits() now parse Yahoo chart action events directly instead of deriving only from OHLC bars
  • Ticker.CapitalGains() returns ETF/mutual fund capital gain distributions
  • Ticker.Actions() returns dividends, splits, and capital gains from a single chart payload

Verification

Check Result
go test ./... PASS
make test (go test -v -race ./...) PASS
golangci-lint run --timeout=5m ./... PASS, 0 issues
make docs PASS

Change History

Date Description
2026-04-25 Branch created and Python v1.2.0..v1.3.0 diff analyzed
2026-04-25 ETFQuery, valuation measures, analysis currency, dividend currency implemented
2026-04-25 Rechecked synced Python upstream; post-v1.3.0 changes were metadata-only, then tightened Go action event parity