Attached is my crude (and messy) attempt at trying to recreate the QTSUS based on it's description in the Q Help Docs. Helps me a bit to slowly get my head around Python, Numpy, Pandas, DataFrames, CustomFactor, Functions, Methods, etc.
Since the upcoming new global markets won't have any built-in Q-universe filter available on day-1, my hope is that this might help in creating a decent 'TradableUniverse' once the FactSet dataset is available for each new market. Though maybe there will be better and simpler ways, depending on what data fields are available? For example, just selecting all common stocks (if they call them that in the new market) and sort/filter by top market cap and [xxx]-day average daily volume?
A lot of this is taken/amended from other people's dynamic universe filters. Note also that I don't always know how to 'mask' the second and third pass with the previous passes. I also don't know (tried and failed) how to select the 'most traded' (in the 2nd pass) based on 200 day Average Daily Volume, for stocks with multiple symbols, so I just picked the 'primary' one. I believe the universe is not 100% accurate mostly because of these two reasons.
If anyone would like to help to make the universe more accurately reflect the real QTSUS, I'd be very grateful! I'd also appreciate any other feedback, especially if I've made any clear mistakes.