Feature/add support for ETF sector data in YahooFinanceDataEnhancer (#4258)

* Add support for ETF sector data in YahooFinanceDataEnhancer

* Update changelog
pull/4263/head
Guillermo Tomás Fernández Martín 3 months ago committed by GitHub
parent 582355ecb5
commit d4f28e2759
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Added a new static portfolio analysis rule: _Regional Market Cluster Risk_ (North America)
- Added support for ETF sector data in the _Yahoo Finance_ data enhancer
### Changed

@ -197,7 +197,7 @@ export class YahooFinanceDataEnhancerService implements DataEnhancerInterface {
assetProfile.price.symbol
);
if (assetSubClass === AssetSubClass.MUTUALFUND) {
if (['ETF', 'MUTUALFUND'].includes(assetSubClass)) {
response.sectors = [];
for (const sectorWeighting of assetProfile.topHoldings
@ -207,7 +207,7 @@ export class YahooFinanceDataEnhancerService implements DataEnhancerInterface {
}
}
} else if (
assetSubClass === AssetSubClass.STOCK &&
assetSubClass === 'STOCK' &&
assetProfile.summaryProfile?.country
) {
// Add country if asset is stock and country available

Loading…
Cancel
Save