This is a concept
that I can not recall ever being discussed. Perhaps it has been and I just
missed it or did not recognize it.
It is just a concept
and I have been thinking about how to start, and frankly, have few ideas.
Admittedly, my skills with the custom backtester are limited, and I am sure the
approach lies somewhere within the custom backtester.
I would like to rank
each of say 5 watchlists, each of which is grouped by the type of
security.
I would like to
sort/rank and specify buying say the top stock or fund in each
group.
I would like to add
this top ranked stock/fund to a portfolio.
After a period of
time, the five lists would be ranked again.
If a new top
stock/fund appears, the stock previously purchased from this same watchlist
would be sold and then new top ranked fund would be bought.
And so forth down
the same 5 watchlists.
And backtest it
all.
Might it
be:
Set up a loop and
loop through 5 watchlists
Within the
loop, extract the symbols.
Within another loop, rank the list of symbols
against some metric.
Sort the list (perhaps using the recently
published code by FredT for getting ordinal values for members of a
watchlist)
Save the top symbol to a
StaticVariable
Complete the
loop.
Retrieve the symbols
from the Variables
Buy equal
amounts
Where I bog
down: how to do another ranking pass say 1 month later, and make buy and
sell decisions based on new rankings?
Again, as I said,
this is just a concept. Has anyone done this and can you comment on the
general approach?
Is this a useful
concept to discuss?
Thanks for any
ideas.
Ken
__._,_.___
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
__,_._,___
|