Ranking all tickers in a DB by volume

Hi!

I want to rank all the symbols in the current database by volume. The idea is to get around the issue of historical constitues of the indexes. SP500 stocks would be approxmiated by the 500 highest ranked stocks by monthly volume etc.

It looks like StaticVarGenarateRanks would do the job, but I just can't figure out how to produce an array of all current symbols? I guess I could write a csv and read from that, but that wouldn't work very well if I changed DBs.

Can someone give me a hint on how this can be done? Or if there is any other neat trick to do the job of ranking all stocks by volume?

Thanks!

Users Guide provides answers:
https://www.amibroker.com/guide/h_ranking.html

Bizarre...I tried to post a link from the Amibroker KB and I get an error "Sorry, you cannot post a link to that host".

So, Google "Amibroker Sector Rotation", and find the link ending in "2016/01/30/separate-ranks-for-categories-that-can-be-used-in-backtesting/"

You may find the information and code in that link to also be helpful.

1 Like

Thank you very much! That link provided much help.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.