Why are the two lists different? pipeline Q500US vs fundamentals.

Newbie question. I have a profitable algorithm using fundamentals API. But when I switch to pipeline the profits disappear. I tried to check if they both return same securities and am having trouble. Could someone help identify why both APIs return different securities?

5
Notebook previews are currently unavailable.
2 responses

Hi Pravin,

I took a look and I think your get_fundamentals filters are a little bit different than what's used in the Q500US. Here's the definition of the Q500US from the help docs:

A default universe containing approximately 500 US equities each day.

Constituents are chosen at the start of each calendar month by selecting the top 500 “tradeable” stocks by 200-day average dollar volume, capped at 30% of equities allocated to any single sector

A stock is considered “tradeable” if it meets the following criteria:

The stock must be the primary share class for its company.
The company issuing the stock must have known market capitalization.
The stock must not be a depository receipt.
The stock must not be traded over the counter (OTC).
The stock must not be for a limited partnership.
The stock must have a known previous-day close price.
The stock must have had nonzero volume on the previous trading day.


Note the dollar volume and sector balancing components of the definition.

Also, in the cell where you are sorting newstyle and getting the stocks in it, sort_values is not sorting the DataFrame in place. You can sort it in place by passing an inplace=True argument to sort_values. I did it a bit differently to show the similarities/differences between the two universe setting approaches.

I hope this helps.

0