[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Converting "WorstRankHeld" option to "WorstPercentileHeld"



PureBytes Links

Trading Reference Links

When using ENABLEROTATIONALTRADING() I would like to specify the "WorstRankHeld" option as a "WorstPercentileHeld".

The reason for this is because when using a Watchlist such as the Fidelity Select Funds, the number of funds changes from a quantity of 7 in the 1980s to a quantity of 42 today. Therefore, specifying an "ordinal" rank does not work the same over all time periods (ie, WorstRankHeld = 5 may make perfect sense when the universe contains 42 funds, but not when it holds just 7).

Conceptually, I know that I would code it as:

   SetOption("WorstRankHeld", WorstPercentileHeld * UniverseCount);


However, I do not know how to calculate a UniverseCount.   My initial thought is to use the approach described in the AddToComposite example in the User's Guide.   Does anyone know if this will work?

Additionally, the Back Tester would have to recalculate the WorstRank Held option on each iteration for this to work. Otherwise, it would just calculate it once and then use it far all dates.

Any help or insight would be appreciated.

__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___