Skip to main content

finance_query/models/screeners/
values.rs

1//! Screener-specific typed value enums.
2//!
3//! For region, sector, industry, and exchange values — which are shared with other
4//! parts of the API — use the types from `constants`:
5//!
6//! | Field | Type | Module |
7//! |-------|------|--------|
8//! | [`EquityField::Region`] | [`Region`](crate::Region) | `crate::Region` |
9//! | [`EquityField::Sector`] | [`Sector`](crate::Sector) | `crate::Sector` |
10//! | [`EquityField::Industry`] / `finance::industry()` | [`Industry`](crate::Industry) | `crate::Industry` |
11//! | [`EquityField::Exchange`] / [`FundField::Exchange`] | [`ExchangeCode`](crate::ExchangeCode) | `crate::ExchangeCode` |
12//!
13//! This module contains only the screener-specific value enums that have no counterpart
14//! elsewhere in the library:
15//!
16//! | Field | Type |
17//! |-------|------|
18//! | [`EquityField::PeerGroup`] | [`ScreenerPeerGroup`] |
19//! | [`FundField::CategoryName`] | [`ScreenerFundCategory`] |
20//!
21//! [`EquityField::Region`]: super::fields::EquityField::Region
22//! [`EquityField::Sector`]: super::fields::EquityField::Sector
23//! [`EquityField::Industry`]: super::fields::EquityField::Industry
24//! [`EquityField::Exchange`]: super::fields::EquityField::Exchange
25//! [`EquityField::PeerGroup`]: super::fields::EquityField::PeerGroup
26//! [`FundField::Exchange`]: super::fields::FundField::Exchange
27//! [`FundField::CategoryName`]: super::fields::FundField::CategoryName
28//!
29//! # Example
30//!
31//! ```
32//! use finance_query::{
33//!     EquityField, EquityScreenerQuery, FundField, FundScreenerQuery, ScreenerFieldExt,
34//!     Region, Sector, Industry, ExchangeCode,
35//!     ScreenerPeerGroup, ScreenerFundCategory,
36//! };
37//!
38//! let equity_query = EquityScreenerQuery::new()
39//!     .add_condition(EquityField::Region.eq_str(Region::UnitedStates))
40//!     .add_condition(EquityField::Sector.eq_str(Sector::Technology))
41//!     .add_condition(EquityField::Exchange.eq_str(ExchangeCode::Nms))
42//!     .add_condition(EquityField::Industry.eq_str(Industry::Semiconductors))
43//!     .add_condition(EquityField::PeerGroup.eq_str(ScreenerPeerGroup::Semiconductors));
44//!
45//! let fund_query = FundScreenerQuery::new()
46//!     .add_condition(FundField::Exchange.eq_str(ExchangeCode::Nas))
47//!     .add_condition(FundField::CategoryName.eq_str(ScreenerFundCategory::UsLargeGrowth));
48//! ```
49
50// ============================================================================
51// ScreenerPeerGroup
52// ============================================================================
53
54/// Equity peer group for screener queries.
55///
56/// Use with [`EquityField::PeerGroup`](super::fields::EquityField::PeerGroup) and
57/// [`ScreenerFieldExt::eq_str`](super::condition::ScreenerFieldExt::eq_str).
58///
59/// These are Yahoo Finance's proprietary peer group classifications used to group
60/// stocks for comparison purposes. Values are broader than [`Industry`](crate::Industry)
61/// names.
62///
63/// # Example
64///
65/// ```
66/// use finance_query::{EquityField, EquityScreenerQuery, ScreenerFieldExt, ScreenerPeerGroup};
67///
68/// let query = EquityScreenerQuery::new()
69///     .add_condition(EquityField::PeerGroup.eq_str(ScreenerPeerGroup::Semiconductors));
70/// ```
71#[non_exhaustive]
72#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
73pub enum ScreenerPeerGroup {
74    // ── Technology ───────────────────────────────────────────────────────────
75    /// "Semiconductors"
76    Semiconductors,
77    /// "Semiconductor Equipment"
78    SemiconductorEquipment,
79    /// "Software & Services"
80    SoftwareAndServices,
81    /// "Technology Hardware & Equipment"
82    TechnologyHardwareAndEquipment,
83    /// "Internet Companies"
84    InternetCompanies,
85    /// "Electronic Equipment"
86    ElectronicEquipment,
87
88    // ── Financials ───────────────────────────────────────────────────────────
89    /// "Banks"
90    Banks,
91    /// "Diversified Banks"
92    DiversifiedBanks,
93    /// "Regional Banks"
94    RegionalBanks,
95    /// "Capital Markets"
96    CapitalMarkets,
97    /// "Insurance"
98    Insurance,
99    /// "Life & Health Insurance"
100    LifeAndHealthInsurance,
101    /// "Property & Casualty Insurance"
102    PropertyAndCasualtyInsurance,
103    /// "Asset Management"
104    AssetManagement,
105    /// "Consumer Finance"
106    ConsumerFinance,
107    /// "Mortgage Finance"
108    MortgageFinance,
109    /// "Specialty Finance"
110    SpecialtyFinance,
111    /// "Diversified Financial Services"
112    DiversifiedFinancialServices,
113    /// "Investment Banking & Brokerage"
114    InvestmentBankingAndBrokerage,
115
116    // ── Healthcare ───────────────────────────────────────────────────────────
117    /// "Pharmaceuticals"
118    Pharmaceuticals,
119    /// "Biotechnology"
120    Biotechnology,
121    /// "Health Care Equipment"
122    HealthCareEquipment,
123    /// "Health Care Services"
124    HealthCareServices,
125    /// "Health Care Facilities"
126    HealthCareFacilities,
127    /// "Managed Healthcare"
128    ManagedHealthcare,
129
130    // ── Consumer ─────────────────────────────────────────────────────────────
131    /// "Automobiles"
132    Automobiles,
133    /// "Auto Components"
134    AutoComponents,
135    /// "Food Products"
136    FoodProducts,
137    /// "Packaged Foods & Meats"
138    PackagedFoodsAndMeats,
139    /// "Beverages"
140    Beverages,
141    /// "Household Products"
142    HouseholdProducts,
143    /// "Household Durables"
144    HouseholdDurables,
145    /// "Personal Products"
146    PersonalProducts,
147    /// "Apparel & Luxury Goods"
148    ApparelAndLuxuryGoods,
149    /// "Retailers"
150    Retailers,
151    /// "Food & Drug Retailing"
152    FoodAndDrugRetailing,
153    /// "General Merchandise Stores"
154    GeneralMerchandiseStores,
155    /// "Specialty Retail"
156    SpecialtyRetail,
157    /// "Leisure Products"
158    LeisureProducts,
159    /// "Hotels"
160    Hotels,
161    /// "Restaurants"
162    Restaurants,
163    /// "Media"
164    Media,
165    /// "Drug Retail"
166    DrugRetail,
167
168    // ── Energy ───────────────────────────────────────────────────────────────
169    /// "Integrated Oil & Gas"
170    IntegratedOilAndGas,
171    /// "Oil & Gas Exploration & Production"
172    OilAndGasExplorationAndProduction,
173    /// "Oil & Gas Refining & Marketing"
174    OilAndGasRefiningAndMarketing,
175    /// "Oil & Gas Storage & Transportation"
176    OilAndGasStorageAndTransportation,
177    /// "Energy Equipment & Services"
178    EnergyEquipmentAndServices,
179
180    // ── Industrials ──────────────────────────────────────────────────────────
181    /// "Aerospace & Defense"
182    AerospaceAndDefense,
183    /// "Airlines"
184    Airlines,
185    /// "Industrial Machinery"
186    IndustrialMachinery,
187    /// "Industrial Conglomerates"
188    IndustrialConglomerates,
189    /// "Industrial Gases"
190    IndustrialGases,
191    /// "Building Products"
192    BuildingProducts,
193    /// "Chemicals"
194    Chemicals,
195    /// "Specialty Chemicals"
196    SpecialtyChemicals,
197    /// "Metals & Mining"
198    MetalsAndMining,
199    /// "Paper & Forest Products"
200    PaperAndForestProducts,
201    /// "Containers & Packaging"
202    ContainersAndPackaging,
203    /// "Commercial Services & Supplies"
204    CommercialServicesAndSupplies,
205    /// "Railroads"
206    Railroads,
207    /// "Trucking"
208    Trucking,
209    /// "Research & Consulting Services"
210    ResearchAndConsultingServices,
211    /// "Human Resource & Employment Services"
212    HumanResourceAndEmploymentServices,
213    /// "Data Processing & Outsourced Services"
214    DataProcessingAndOutsourcedServices,
215    /// "IT Consulting & Other Services"
216    ItConsultingAndOtherServices,
217
218    // ── Real Estate / Utilities ───────────────────────────────────────────────
219    /// "Real Estate"
220    RealEstate,
221    /// "Retail REITs"
222    RetailReits,
223    /// "Electric Utilities"
224    ElectricUtilities,
225    /// "Gas Utilities"
226    GasUtilities,
227    /// "Water Utilities"
228    WaterUtilities,
229    /// "Multi-Utilities"
230    MultiUtilities,
231    /// "Renewable Electricity"
232    RenewableElectricity,
233
234    // ── Telecom ───────────────────────────────────────────────────────────────
235    /// "Telecom Services"
236    TelecomServices,
237    /// "Wireless Telecommunication Services"
238    WirelessTelecommunicationServices,
239
240    // ── Commodities ───────────────────────────────────────────────────────────
241    /// "Steel"
242    Steel,
243    /// "Gold"
244    Gold,
245    /// "Oil & Gas"
246    OilAndGas,
247
248    // ── Other ─────────────────────────────────────────────────────────────────
249    /// "Waste Management"
250    WasteManagement,
251    /// "Tobacco"
252    Tobacco,
253    /// "Office Electronics"
254    OfficeElectronics,
255    /// "Communications Equipment"
256    CommunicationsEquipment,
257    /// "Home Building"
258    HomeBuilding,
259    /// "Home Furnishings"
260    HomeFurnishings,
261    /// "Household Appliances"
262    HouseholdAppliances,
263    /// "Publishing"
264    Publishing,
265}
266
267impl ScreenerPeerGroup {
268    /// Returns the peer group name used by Yahoo Finance.
269    pub fn as_str(self) -> &'static str {
270        match self {
271            ScreenerPeerGroup::Semiconductors => "Semiconductors",
272            ScreenerPeerGroup::SemiconductorEquipment => "Semiconductor Equipment",
273            ScreenerPeerGroup::SoftwareAndServices => "Software & Services",
274            ScreenerPeerGroup::TechnologyHardwareAndEquipment => "Technology Hardware & Equipment",
275            ScreenerPeerGroup::InternetCompanies => "Internet Companies",
276            ScreenerPeerGroup::ElectronicEquipment => "Electronic Equipment",
277            ScreenerPeerGroup::Banks => "Banks",
278            ScreenerPeerGroup::DiversifiedBanks => "Diversified Banks",
279            ScreenerPeerGroup::RegionalBanks => "Regional Banks",
280            ScreenerPeerGroup::CapitalMarkets => "Capital Markets",
281            ScreenerPeerGroup::Insurance => "Insurance",
282            ScreenerPeerGroup::LifeAndHealthInsurance => "Life & Health Insurance",
283            ScreenerPeerGroup::PropertyAndCasualtyInsurance => "Property & Casualty Insurance",
284            ScreenerPeerGroup::AssetManagement => "Asset Management",
285            ScreenerPeerGroup::ConsumerFinance => "Consumer Finance",
286            ScreenerPeerGroup::MortgageFinance => "Mortgage Finance",
287            ScreenerPeerGroup::SpecialtyFinance => "Specialty Finance",
288            ScreenerPeerGroup::DiversifiedFinancialServices => "Diversified Financial Services",
289            ScreenerPeerGroup::InvestmentBankingAndBrokerage => "Investment Banking & Brokerage",
290            ScreenerPeerGroup::Pharmaceuticals => "Pharmaceuticals",
291            ScreenerPeerGroup::Biotechnology => "Biotechnology",
292            ScreenerPeerGroup::HealthCareEquipment => "Health Care Equipment",
293            ScreenerPeerGroup::HealthCareServices => "Health Care Services",
294            ScreenerPeerGroup::HealthCareFacilities => "Health Care Facilities",
295            ScreenerPeerGroup::ManagedHealthcare => "Managed Healthcare",
296            ScreenerPeerGroup::Automobiles => "Automobiles",
297            ScreenerPeerGroup::AutoComponents => "Auto Components",
298            ScreenerPeerGroup::FoodProducts => "Food Products",
299            ScreenerPeerGroup::PackagedFoodsAndMeats => "Packaged Foods & Meats",
300            ScreenerPeerGroup::Beverages => "Beverages",
301            ScreenerPeerGroup::HouseholdProducts => "Household Products",
302            ScreenerPeerGroup::HouseholdDurables => "Household Durables",
303            ScreenerPeerGroup::PersonalProducts => "Personal Products",
304            ScreenerPeerGroup::ApparelAndLuxuryGoods => "Apparel & Luxury Goods",
305            ScreenerPeerGroup::Retailers => "Retailers",
306            ScreenerPeerGroup::FoodAndDrugRetailing => "Food & Drug Retailing",
307            ScreenerPeerGroup::GeneralMerchandiseStores => "General Merchandise Stores",
308            ScreenerPeerGroup::SpecialtyRetail => "Specialty Retail",
309            ScreenerPeerGroup::LeisureProducts => "Leisure Products",
310            ScreenerPeerGroup::Hotels => "Hotels",
311            ScreenerPeerGroup::Restaurants => "Restaurants",
312            ScreenerPeerGroup::Media => "Media",
313            ScreenerPeerGroup::DrugRetail => "Drug Retail",
314            ScreenerPeerGroup::IntegratedOilAndGas => "Integrated Oil & Gas",
315            ScreenerPeerGroup::OilAndGasExplorationAndProduction => {
316                "Oil & Gas Exploration & Production"
317            }
318            ScreenerPeerGroup::OilAndGasRefiningAndMarketing => "Oil & Gas Refining & Marketing",
319            ScreenerPeerGroup::OilAndGasStorageAndTransportation => {
320                "Oil & Gas Storage & Transportation"
321            }
322            ScreenerPeerGroup::EnergyEquipmentAndServices => "Energy Equipment & Services",
323            ScreenerPeerGroup::AerospaceAndDefense => "Aerospace & Defense",
324            ScreenerPeerGroup::Airlines => "Airlines",
325            ScreenerPeerGroup::IndustrialMachinery => "Industrial Machinery",
326            ScreenerPeerGroup::IndustrialConglomerates => "Industrial Conglomerates",
327            ScreenerPeerGroup::IndustrialGases => "Industrial Gases",
328            ScreenerPeerGroup::BuildingProducts => "Building Products",
329            ScreenerPeerGroup::Chemicals => "Chemicals",
330            ScreenerPeerGroup::SpecialtyChemicals => "Specialty Chemicals",
331            ScreenerPeerGroup::MetalsAndMining => "Metals & Mining",
332            ScreenerPeerGroup::PaperAndForestProducts => "Paper & Forest Products",
333            ScreenerPeerGroup::ContainersAndPackaging => "Containers & Packaging",
334            ScreenerPeerGroup::CommercialServicesAndSupplies => "Commercial Services & Supplies",
335            ScreenerPeerGroup::Railroads => "Railroads",
336            ScreenerPeerGroup::Trucking => "Trucking",
337            ScreenerPeerGroup::ResearchAndConsultingServices => "Research & Consulting Services",
338            ScreenerPeerGroup::HumanResourceAndEmploymentServices => {
339                "Human Resource & Employment Services"
340            }
341            ScreenerPeerGroup::DataProcessingAndOutsourcedServices => {
342                "Data Processing & Outsourced Services"
343            }
344            ScreenerPeerGroup::ItConsultingAndOtherServices => "IT Consulting & Other Services",
345            ScreenerPeerGroup::RealEstate => "Real Estate",
346            ScreenerPeerGroup::RetailReits => "Retail REITs",
347            ScreenerPeerGroup::ElectricUtilities => "Electric Utilities",
348            ScreenerPeerGroup::GasUtilities => "Gas Utilities",
349            ScreenerPeerGroup::WaterUtilities => "Water Utilities",
350            ScreenerPeerGroup::MultiUtilities => "Multi-Utilities",
351            ScreenerPeerGroup::RenewableElectricity => "Renewable Electricity",
352            ScreenerPeerGroup::TelecomServices => "Telecom Services",
353            ScreenerPeerGroup::WirelessTelecommunicationServices => {
354                "Wireless Telecommunication Services"
355            }
356            ScreenerPeerGroup::Steel => "Steel",
357            ScreenerPeerGroup::Gold => "Gold",
358            ScreenerPeerGroup::OilAndGas => "Oil & Gas",
359            ScreenerPeerGroup::WasteManagement => "Waste Management",
360            ScreenerPeerGroup::Tobacco => "Tobacco",
361            ScreenerPeerGroup::OfficeElectronics => "Office Electronics",
362            ScreenerPeerGroup::CommunicationsEquipment => "Communications Equipment",
363            ScreenerPeerGroup::HomeBuilding => "Home Building",
364            ScreenerPeerGroup::HomeFurnishings => "Home Furnishings",
365            ScreenerPeerGroup::HouseholdAppliances => "Household Appliances",
366            ScreenerPeerGroup::Publishing => "Publishing",
367        }
368    }
369}
370
371impl From<ScreenerPeerGroup> for String {
372    fn from(v: ScreenerPeerGroup) -> Self {
373        v.as_str().to_string()
374    }
375}
376
377// ============================================================================
378// ScreenerFundCategory
379// ============================================================================
380
381/// Morningstar fund category for mutual fund screener queries.
382///
383/// Use with [`FundField::CategoryName`](super::fields::FundField::CategoryName) and
384/// [`ScreenerFieldExt::eq_str`](super::condition::ScreenerFieldExt::eq_str).
385///
386/// # Example
387///
388/// ```
389/// use finance_query::{FundField, FundScreenerQuery, ScreenerFieldExt, ScreenerFundCategory};
390///
391/// let query = FundScreenerQuery::new()
392///     .add_condition(FundField::CategoryName.eq_str(ScreenerFundCategory::UsLargeGrowth));
393/// ```
394#[non_exhaustive]
395#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
396pub enum ScreenerFundCategory {
397    // ── US Equity ─────────────────────────────────────────────────────────────
398    /// "US Fund Large Blend"
399    UsLargeBlend,
400    /// "US Fund Large Growth"
401    UsLargeGrowth,
402    /// "US Fund Large Value"
403    UsLargeValue,
404    /// "US Fund Mid-Cap Blend"
405    UsMidCapBlend,
406    /// "US Fund Mid-Cap Growth"
407    UsMidCapGrowth,
408    /// "US Fund Mid-Cap Value"
409    UsMidCapValue,
410    /// "US Fund Small Blend"
411    UsSmallBlend,
412    /// "US Fund Small Growth"
413    UsSmallGrowth,
414    /// "US Fund Small Value"
415    UsSmallValue,
416    /// "US Fund Diversified Emerging Markets"
417    UsDiversifiedEmergingMarkets,
418    /// "US Fund Foreign Large Blend"
419    UsForeignLargeBlend,
420    /// "US Fund Foreign Large Growth"
421    UsForeignLargeGrowth,
422    /// "US Fund Foreign Large Value"
423    UsForeignLargeValue,
424    /// "US Fund Foreign Small/Mid Blend"
425    UsForeignSmallMidBlend,
426    /// "US Fund Foreign Small/Mid Growth"
427    UsForeignSmallMidGrowth,
428    /// "US Fund Foreign Small/Mid Value"
429    UsForeignSmallMidValue,
430    /// "US Fund World Large-Stock Blend"
431    UsWorldLargeStockBlend,
432    /// "US Fund World Large-Stock Growth"
433    UsWorldLargeStockGrowth,
434    /// "US Fund World Small/Mid Stock"
435    UsWorldSmallMidStock,
436
437    // ── US Fixed Income ───────────────────────────────────────────────────────
438    /// "US Fund Intermediate Core Bond"
439    UsIntermediateCoreBond,
440    /// "US Fund Intermediate Core-Plus Bond"
441    UsIntermediateCorePlusBond,
442    /// "US Fund Short-Term Bond"
443    UsShortTermBond,
444    /// "US Fund Long-Term Bond"
445    UsLongTermBond,
446    /// "US Fund Corporate Bond"
447    UsCorporateBond,
448    /// "US Fund High Yield Bond"
449    UsHighYieldBond,
450    /// "US Fund Ultrashort Bond"
451    UsUltrashortBond,
452    /// "US Fund Inflation-Protected Bond"
453    UsInflationProtectedBond,
454    /// "US Fund Multisector Bond"
455    UsMultisectorBond,
456    /// "US Fund Short Government"
457    UsShortGovernment,
458    /// "US Fund Intermediate Government"
459    UsIntermediateGovernment,
460    /// "US Fund Long Government"
461    UsLongGovernment,
462    /// "US Fund Muni National Interm"
463    UsMuniNationalInterm,
464    /// "US Fund Muni National Short"
465    UsMuniNationalShort,
466    /// "US Fund Muni National Long"
467    UsMuniNationalLong,
468    /// "US Fund Money Market Taxable"
469    UsMoneyMarketTaxable,
470    /// "US Fund Money Market Tax-Free"
471    UsMoneyMarketTaxFree,
472    /// "US Fund Bank Loan"
473    UsBankLoan,
474    /// "US Fund Emerging Markets Bond"
475    UsEmergingMarketsBond,
476
477    // ── US Allocation ─────────────────────────────────────────────────────────
478    /// "US Fund Allocation--15% to 30% Equity"
479    UsAllocation15To30Equity,
480    /// "US Fund Allocation--30% to 50% Equity"
481    UsAllocation30To50Equity,
482    /// "US Fund Allocation--50% to 70% Equity"
483    UsAllocation50To70Equity,
484    /// "US Fund Allocation--70% to 85% Equity"
485    UsAllocation70To85Equity,
486    /// "US Fund Allocation--85%+ Equity"
487    UsAllocation85PlusEquity,
488
489    // ── US Sector Equity ──────────────────────────────────────────────────────
490    /// "US Fund Real Estate"
491    UsRealEstate,
492    /// "US Fund Health"
493    UsHealth,
494    /// "US Fund Technology"
495    UsTechnology,
496    /// "US Fund Natural Resources"
497    UsNaturalResources,
498    /// "US Fund Utilities"
499    UsUtilities,
500    /// "US Fund Communications"
501    UsCommunications,
502    /// "US Fund Industrials"
503    UsIndustrials,
504    /// "US Fund Financial"
505    UsFinancial,
506    /// "US Fund Consumer Defensive"
507    UsConsumerDefensive,
508    /// "US Fund Consumer Cyclical"
509    UsConsumerCyclical,
510    /// "US Fund Energy Limited Partnership"
511    UsEnergyLimitedPartnership,
512    /// "US Fund Miscellaneous Sector"
513    UsMiscellaneousSector,
514    /// "US Fund Infrastructure"
515    UsInfrastructure,
516
517    // ── US Target-Date ────────────────────────────────────────────────────────
518    /// "US Fund Target-Date 2025"
519    UsTargetDate2025,
520    /// "US Fund Target-Date 2030"
521    UsTargetDate2030,
522    /// "US Fund Target-Date 2035"
523    UsTargetDate2035,
524    /// "US Fund Target-Date 2040"
525    UsTargetDate2040,
526    /// "US Fund Target-Date 2045"
527    UsTargetDate2045,
528    /// "US Fund Target-Date 2050"
529    UsTargetDate2050,
530    /// "US Fund Target-Date 2055"
531    UsTargetDate2055,
532    /// "US Fund Target-Date 2060"
533    UsTargetDate2060,
534    /// "US Fund Target-Date 2065+"
535    UsTargetDate2065Plus,
536    /// "US Fund Target-Date Retirement"
537    UsTargetDateRetirement,
538
539    // ── US Other ──────────────────────────────────────────────────────────────
540    /// "US Fund Convertibles"
541    UsConvertibles,
542    /// "US Fund Preferred Stock"
543    UsPreferredStock,
544    /// "US Fund Multialternative"
545    UsMultialternative,
546    /// "US Fund Options-based"
547    UsOptionsBased,
548
549    // ── EAA Fund Categories ───────────────────────────────────────────────────
550    /// "EAA Fund Europe Large-Cap Blend Equity"
551    EaaEuropeLargeCapBlendEquity,
552    /// "EAA Fund Europe Large-Cap Growth Equity"
553    EaaEuropeLargeCapGrowthEquity,
554    /// "EAA Fund Europe Large-Cap Value Equity"
555    EaaEuropeLargeCapValueEquity,
556    /// "EAA Fund Global Large-Cap Blend Equity"
557    EaaGlobalLargeCapBlendEquity,
558    /// "EAA Fund Global Large-Cap Growth Equity"
559    EaaGlobalLargeCapGrowthEquity,
560    /// "EAA Fund EUR Diversified Bond"
561    EaaEurDiversifiedBond,
562    /// "EAA Fund EUR Corporate Bond"
563    EaaEurCorporateBond,
564    /// "EAA Fund USD Corporate Bond"
565    EaaUsdCorporateBond,
566    /// "EAA Fund USD High Yield Bond"
567    EaaUsdHighYieldBond,
568    /// "EAA Fund Global Bond"
569    EaaGlobalBond,
570    /// "EAA Fund USD Money Market"
571    EaaUsdMoneyMarket,
572    /// "EAA Fund EUR Money Market"
573    EaaEurMoneyMarket,
574}
575
576impl ScreenerFundCategory {
577    /// Returns the fund category name used by Yahoo Finance / Morningstar.
578    pub fn as_str(self) -> &'static str {
579        match self {
580            ScreenerFundCategory::UsLargeBlend => "US Fund Large Blend",
581            ScreenerFundCategory::UsLargeGrowth => "US Fund Large Growth",
582            ScreenerFundCategory::UsLargeValue => "US Fund Large Value",
583            ScreenerFundCategory::UsMidCapBlend => "US Fund Mid-Cap Blend",
584            ScreenerFundCategory::UsMidCapGrowth => "US Fund Mid-Cap Growth",
585            ScreenerFundCategory::UsMidCapValue => "US Fund Mid-Cap Value",
586            ScreenerFundCategory::UsSmallBlend => "US Fund Small Blend",
587            ScreenerFundCategory::UsSmallGrowth => "US Fund Small Growth",
588            ScreenerFundCategory::UsSmallValue => "US Fund Small Value",
589            ScreenerFundCategory::UsDiversifiedEmergingMarkets => {
590                "US Fund Diversified Emerging Markets"
591            }
592            ScreenerFundCategory::UsForeignLargeBlend => "US Fund Foreign Large Blend",
593            ScreenerFundCategory::UsForeignLargeGrowth => "US Fund Foreign Large Growth",
594            ScreenerFundCategory::UsForeignLargeValue => "US Fund Foreign Large Value",
595            ScreenerFundCategory::UsForeignSmallMidBlend => "US Fund Foreign Small/Mid Blend",
596            ScreenerFundCategory::UsForeignSmallMidGrowth => "US Fund Foreign Small/Mid Growth",
597            ScreenerFundCategory::UsForeignSmallMidValue => "US Fund Foreign Small/Mid Value",
598            ScreenerFundCategory::UsWorldLargeStockBlend => "US Fund World Large-Stock Blend",
599            ScreenerFundCategory::UsWorldLargeStockGrowth => "US Fund World Large-Stock Growth",
600            ScreenerFundCategory::UsWorldSmallMidStock => "US Fund World Small/Mid Stock",
601            ScreenerFundCategory::UsIntermediateCoreBond => "US Fund Intermediate Core Bond",
602            ScreenerFundCategory::UsIntermediateCorePlusBond => {
603                "US Fund Intermediate Core-Plus Bond"
604            }
605            ScreenerFundCategory::UsShortTermBond => "US Fund Short-Term Bond",
606            ScreenerFundCategory::UsLongTermBond => "US Fund Long-Term Bond",
607            ScreenerFundCategory::UsCorporateBond => "US Fund Corporate Bond",
608            ScreenerFundCategory::UsHighYieldBond => "US Fund High Yield Bond",
609            ScreenerFundCategory::UsUltrashortBond => "US Fund Ultrashort Bond",
610            ScreenerFundCategory::UsInflationProtectedBond => "US Fund Inflation-Protected Bond",
611            ScreenerFundCategory::UsMultisectorBond => "US Fund Multisector Bond",
612            ScreenerFundCategory::UsShortGovernment => "US Fund Short Government",
613            ScreenerFundCategory::UsIntermediateGovernment => "US Fund Intermediate Government",
614            ScreenerFundCategory::UsLongGovernment => "US Fund Long Government",
615            ScreenerFundCategory::UsMuniNationalInterm => "US Fund Muni National Interm",
616            ScreenerFundCategory::UsMuniNationalShort => "US Fund Muni National Short",
617            ScreenerFundCategory::UsMuniNationalLong => "US Fund Muni National Long",
618            ScreenerFundCategory::UsMoneyMarketTaxable => "US Fund Money Market Taxable",
619            ScreenerFundCategory::UsMoneyMarketTaxFree => "US Fund Money Market Tax-Free",
620            ScreenerFundCategory::UsBankLoan => "US Fund Bank Loan",
621            ScreenerFundCategory::UsEmergingMarketsBond => "US Fund Emerging Markets Bond",
622            ScreenerFundCategory::UsAllocation15To30Equity => {
623                "US Fund Allocation--15% to 30% Equity"
624            }
625            ScreenerFundCategory::UsAllocation30To50Equity => {
626                "US Fund Allocation--30% to 50% Equity"
627            }
628            ScreenerFundCategory::UsAllocation50To70Equity => {
629                "US Fund Allocation--50% to 70% Equity"
630            }
631            ScreenerFundCategory::UsAllocation70To85Equity => {
632                "US Fund Allocation--70% to 85% Equity"
633            }
634            ScreenerFundCategory::UsAllocation85PlusEquity => "US Fund Allocation--85%+ Equity",
635            ScreenerFundCategory::UsRealEstate => "US Fund Real Estate",
636            ScreenerFundCategory::UsHealth => "US Fund Health",
637            ScreenerFundCategory::UsTechnology => "US Fund Technology",
638            ScreenerFundCategory::UsNaturalResources => "US Fund Natural Resources",
639            ScreenerFundCategory::UsUtilities => "US Fund Utilities",
640            ScreenerFundCategory::UsCommunications => "US Fund Communications",
641            ScreenerFundCategory::UsIndustrials => "US Fund Industrials",
642            ScreenerFundCategory::UsFinancial => "US Fund Financial",
643            ScreenerFundCategory::UsConsumerDefensive => "US Fund Consumer Defensive",
644            ScreenerFundCategory::UsConsumerCyclical => "US Fund Consumer Cyclical",
645            ScreenerFundCategory::UsEnergyLimitedPartnership => {
646                "US Fund Energy Limited Partnership"
647            }
648            ScreenerFundCategory::UsMiscellaneousSector => "US Fund Miscellaneous Sector",
649            ScreenerFundCategory::UsInfrastructure => "US Fund Infrastructure",
650            ScreenerFundCategory::UsTargetDate2025 => "US Fund Target-Date 2025",
651            ScreenerFundCategory::UsTargetDate2030 => "US Fund Target-Date 2030",
652            ScreenerFundCategory::UsTargetDate2035 => "US Fund Target-Date 2035",
653            ScreenerFundCategory::UsTargetDate2040 => "US Fund Target-Date 2040",
654            ScreenerFundCategory::UsTargetDate2045 => "US Fund Target-Date 2045",
655            ScreenerFundCategory::UsTargetDate2050 => "US Fund Target-Date 2050",
656            ScreenerFundCategory::UsTargetDate2055 => "US Fund Target-Date 2055",
657            ScreenerFundCategory::UsTargetDate2060 => "US Fund Target-Date 2060",
658            ScreenerFundCategory::UsTargetDate2065Plus => "US Fund Target-Date 2065+",
659            ScreenerFundCategory::UsTargetDateRetirement => "US Fund Target-Date Retirement",
660            ScreenerFundCategory::UsConvertibles => "US Fund Convertibles",
661            ScreenerFundCategory::UsPreferredStock => "US Fund Preferred Stock",
662            ScreenerFundCategory::UsMultialternative => "US Fund Multialternative",
663            ScreenerFundCategory::UsOptionsBased => "US Fund Options-based",
664            ScreenerFundCategory::EaaEuropeLargeCapBlendEquity => {
665                "EAA Fund Europe Large-Cap Blend Equity"
666            }
667            ScreenerFundCategory::EaaEuropeLargeCapGrowthEquity => {
668                "EAA Fund Europe Large-Cap Growth Equity"
669            }
670            ScreenerFundCategory::EaaEuropeLargeCapValueEquity => {
671                "EAA Fund Europe Large-Cap Value Equity"
672            }
673            ScreenerFundCategory::EaaGlobalLargeCapBlendEquity => {
674                "EAA Fund Global Large-Cap Blend Equity"
675            }
676            ScreenerFundCategory::EaaGlobalLargeCapGrowthEquity => {
677                "EAA Fund Global Large-Cap Growth Equity"
678            }
679            ScreenerFundCategory::EaaEurDiversifiedBond => "EAA Fund EUR Diversified Bond",
680            ScreenerFundCategory::EaaEurCorporateBond => "EAA Fund EUR Corporate Bond",
681            ScreenerFundCategory::EaaUsdCorporateBond => "EAA Fund USD Corporate Bond",
682            ScreenerFundCategory::EaaUsdHighYieldBond => "EAA Fund USD High Yield Bond",
683            ScreenerFundCategory::EaaGlobalBond => "EAA Fund Global Bond",
684            ScreenerFundCategory::EaaUsdMoneyMarket => "EAA Fund USD Money Market",
685            ScreenerFundCategory::EaaEurMoneyMarket => "EAA Fund EUR Money Market",
686        }
687    }
688}
689
690impl From<ScreenerFundCategory> for String {
691    fn from(v: ScreenerFundCategory) -> Self {
692        v.as_str().to_string()
693    }
694}