GUIDs for common Sectors
The most common use for these lists is to narrow your universe of symbols in is_symbol_qualified.
See the example code below for returning only those symbols that qualified for the GUID listed and were also between $2 and $500 and over 100,000 average volume...
@classmethod
def is_symbol_qualified(cls, symbol, md, service, account):
GUID = '8d57e928-1a4f-4c03-bae5-574ec8907d72'
# This combination of service calls returns a 1 if the current symbol is in the specified list, a zero if it is not
myList = service.symbol_list.in_list(service.symbol_list.get_handle(GUID),symbol)
return mylist and md.stat.prev_close>2 and md.stat.prev_close<500 and md.stat.avol>100000
- GUIDs are lowercase.
List | GUID |
---|---|
Basic Material | 8d57e928-1a4f-4c03-bae5-574ec8907d72 |
Capital Equipment | 5ecad242-a19b-47d7-8637-3d1e3b4f0440 |
Consumer Cyclical | 5d61afc6-bfc4-41ae-bbad-53167a1cecc8 |
Consumer Staple | 027e7005-8081-4d8d-b291-820ee12863c1 |
Energy | eb00e6d2-e037-4f87-8f55-a1a439b267b0 |
Financial | 1030bd52-50c3-4669-ae30-0a034e8408a7 |
Health Care | e2cf6180-1932-4d6e-8dd4-8e0d744aa1b3 |
Retail | a24710bd-14eb-4a87-aa0d-bd1fa4fff72f |
Technology | d18366ec-fa56-4517-8e47-3ada4475d0dd |
Transportation | e8434d5d-aab4-4d2c-91d5-06f2de0dcfad |
Utility | 27d09a87-460b-40e8-8c3e-19c9c6143823 |