Changelog
Source:NEWS.md
yahoofinancer 0.6.2
Bug Fixes
-
Ticker$valuation_measuresnow joins every metric by its own observation date. Previously values were combined by position, so reordered or missing quarters attached the wrong figure to a date (or recycled a single value across all dates); absent metrics are nowNAcolumns. -
validate()(and so ticker constructors) matches response keys case-insensitively by name, preserving dots such asVOD.LorBRK.Band returning the caller’s spelling and order. -
currency_converter()no longer recycles a truncated adjusted-close series: it warns and falls back toclose, asget_history()does. Missing quote fields giveNA, and an empty chart gives an empty tibble instead of an error. - Assigning to
Ticker$symbolno longer returns the previous symbol’s cached prices; cached metadata is keyed by symbol. The documentation now states that the cache has no time expiry. -
yf_get_market_stats()fetches metadata once per symbol and warns when it cannot be retrieved, instead of returning a row ofNA; numeric and character columns are always typed. - Full-failure results of
yf_download_prices(),yf_get_index_quotes(),yf_get_market_stats(),yf_get_financials()andTickers$get_history()are zero-row tibbles with the documented columns. - Unexpected non-object JSON responses and malformed endpoint envelopes now give a warning and
NULL; missing error descriptions use a clear fallback, and financial statements accept a plain numericreportedValueor useNAfor missing values.
Maintenance
- The default test suite is hermetic: a suite-wide blocker fails any unmocked request. Setting
YF_LIVE_TESTS=truedisables the blocker and enables the opt-in live smoke test. - Requires
testthat (>= 3.2.1)for tests;jsonliteremains in Imports becausehttr2::resp_body_json()requires it at runtime. Parser and transport diagnostics retain the full condition message. - The package maintainer address is now aravindhebbali@rsquaredacademy.com.
yahoofinancer 0.6.1
CRAN release: 2026-10-16
Bug Fixes & Architectural Improvements
-
Financial Statements Restoration: Added working
$get_income_statement(),$get_balance_sheet(), and$get_cash_flow()methods onTickerbacked by Yahoo’sfundamentals-timeseriesendpoint with support forfrequency = c("annual", "quarterly"). Updatedyf_get_financials()to return tidy tibbles with line items. (#48, #2) -
Unified HTTP Request Engine: Centralized all API communication into a unified internal
api_request()helper with automatic retry, timeout, user agent header, and structured error reporting across all endpoints. (#49) -
Standardized Failure Contracts: Multi-symbol routines (
Tickers$aggregate_data(),yf_download_prices(),yf_get_financials(),yf_get_market_stats(),yf_get_index_quotes()) consistently warn on failed symbols and return empty tibbles matching documented schemas on full failure.currency_converter(),Ticker$recommendations, andTicker$valuation_measuresunified to standard failure returns. (#50, #61) -
Batch Symbol Validation & Offline Construction:
validate()vectorizes symbol queries into a single HTTP request. Addedvalidate = TRUEoption onTickers$new(),Index$new(), andIndex$set_index()to permit offline instantiation. (#51, #5, #61) -
Date Hygiene & Lookback Limit Enforcement:
get_history()validates dates client-side and enforces intraday lookback boundaries (1m <= 7d, 5m/15m/30m <= 60d, 1h <= 730d). Fixedperiod = NULLlookback crash.currency_converter()guards against NA date inputs. (#52, #60) -
Robust Parsing & Transport Resilience: Handled transport-level network errors gracefully with informative warnings. Guarded against missing or mismatched
adj_closeseries and invalid JSON payloads. (#60, #17) -
Hermetic & Live Smoke Testing: Expanded offline mock coverage with recorded
httptest2fixtures forfundamentals-timeseriesstatements, migrated mock fixtures to short paths, and added an offline-guarded live smoke test suite. (#53, #62) -
Package Hygiene & Code Style: Declared
R (>= 4.1)floor, removed unusedhttptestSuggests, configured.lintrwith zero remaining lints, added GitHub Actions lint workflow, updated User-Agent toyahoofinancer/<version>, and drafted the fundamental screening vignette. (#54, #57)
yahoofinancer 0.6.0
Enhancements
-
Functional API: Introduced
yf_download_prices(),yf_get_market_stats(),yf_get_financials(), andyf_get_index_quotes()for pipe-friendly, tidy data analysis workflows. -
Migration to httr2: Migrated package networking from
httrtohttr2for modern, resilient HTTP operations.
yahoofinancer 0.5.0
CRAN release: 2026-05-21
Enhancements
- Multiple Tickers: Get data for multiple tickers (#19, #20)
-
Unified Object Model: Re-engineered duplicated code patterns by crafting a foundational
YahooFinanceBaseR6 parent class, modernizing object inheritance forTickerandIndexinstances. (#25) - API Lifecycle Layer: Integrated an explicit parameter deprecation infrastructure to output clean soft-deprecation warnings while preserving structural backward compatibility.
-
Hermetic Test Suite: Sealed the internal testing environment against ambient internet variables by enforcing local offline-only execution boundaries (
R_CHECK_INTERNET_AVAILABILITY=FALSE). - Mock Path Optimization: Flattened extended mock JSON directory structures beneath the 100-character POSIX threshold to guarantee absolute compatibility with CRAN tarball filters.
Other Improvements
-
Environment Masking: Appended specialized rules to
.Rbuildignoreto prevent local agent logs (.gemini/), unit metrics (coverage.html), and build directories (lib/) from leaking into release targets. - Repository Sanitation: Cleaned out empty, legacy directory paths inside the testing footprint to preserve overall repository layout health.
yahoofinancer 0.4.0
CRAN release: 2024-11-14
This is a minor release for bug fixes and other improvements.