Browse Source
			
			
			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
					
					9 months ago
					
						
							committed by
							
								
								GitHub
							
						 
					
				 
				
			 
		 
		
			
				
					
					No known key found for this signature in database
					
						
							GPG Key ID: B5690EEEBB952194
						
					
				
			
		
		
		
	
		
			
				 2 changed files with 
3 additions and 
2 deletions
			 
			
		 
		
			
				- 
					
					
					 
					CHANGELOG.md
				
 
			
				- 
					
					
					 
					apps/api/src/services/data-provider/data-enhancer/yahoo-finance/yahoo-finance.service.ts
				
 
			
		
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -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
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |