Request: Script to Sort a List by a Factor
aj165602
Posts: 105
Hi,
I'm enjoying learning the Cloidquant API.
So far, I understand how to select a universe of stocks using is_symbol_qualified(), and how orders in individual shares are instances of that universe.
It would be great if you could provide an example script that illustrates how to sort, for example, the Dow 30 list by yesterday's close. This could then serve as a template for more interesting factor sorts.
This is the part of the process I'm struggling with at the moment -- co-ordinating the instances at the portfolio level. Any help would be much appreciated.
Many thanks,
Antony
Tagged:
Comments
In essence, I'm thinking of the following logic:
1) The sorted list is held as a class variable. Hopefully, the list can be regenerated at various times of the day. The ranks are enumerated in some way.
2) The individual instances test for the value of their rank parameter, and use conditional logic to call algo_buy, algo_sell, or pass.
Thanks,
Antony
Managed to solve this one after reading the "CloudQuant API vs Quantopian API" thread. There's enough information there to help Quantopian users,