gadicc / node-yahoo-finance2

Unofficial API for Yahoo Finance
https://www.npmjs.com/package/yahoo-finance2
MIT License
353 stars 58 forks source link

Failed validation: #/definitions/QuoteSummaryResult #744

Closed cstange closed 3 months ago

cstange commented 3 months ago

Validation Error

Minimal Reproduction

await yF.quoteSummary('SPY', { modules: ['fundPerformance'] });

Symbol(s) that it happened for

Error Message

The following result did not validate with schema: #/definitions/QuoteSummaryResult
[
  {
    instancePath: '/fundPerformance/riskOverviewStatisticsCat/riskStatisticsCat/0',
    schemaPath: '#/definitions/FundPerformanceRiskOverviewStatsRow/required',
    keyword: 'required',
    params: { missingProperty: 'stdDev' },
    message: "must have required property 'stdDev'",
    data: {
      year: '5y',
      alpha: -1.12,
      beta: 0.98,
      meanAnnualReturn: 1.18,
      rSquared: 94.98,
      sharpeRatio: 0.65,
      treynorRatio: 11.32
    }
  },
  {
    instancePath: '/fundPerformance/riskOverviewStatisticsCat/riskStatisticsCat/1',
    schemaPath: '#/definitions/FundPerformanceRiskOverviewStatsRow/required',
    keyword: 'required',
    params: { missingProperty: 'stdDev' },
    message: "must have required property 'stdDev'",
    data: {
      year: '3y',
      alpha: -1.08,
      beta: 0.96,
      meanAnnualReturn: 0.94,
      rSquared: 94.11,
      sharpeRatio: 0.49,
      treynorRatio: 7.87
    }
  },
  {
    instancePath: '/fundPerformance/riskOverviewStatisticsCat/riskStatisticsCat/2',
    schemaPath: '#/definitions/FundPerformanceRiskOverviewStatsRow/required',
    keyword: 'required',
    params: { missingProperty: 'stdDev' },
    message: "must have required property 'stdDev'",
    data: {
      year: '10y',
      alpha: -1.25,
      beta: 0.99,
      meanAnnualReturn: 0.98,
      rSquared: 94.95,
      sharpeRatio: 0.68,
      treynorRatio: 9.85
    }
  }
]

Environment

Browser or Node: node Node version (if applicable): v16.15.0 Npm version: Browser version (if applicable): Library version (e.g. 1.10.1): v2.9.1

Additional Context

gadicc commented 3 months ago

Thanks, @cstange, for the report. This has been fixed and will be in the next release. There'll be an automatic message here when that happens.

gadicc commented 3 months ago

:tada: This issue has been resolved in version 2.9.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: