Add new comment
New backtester function: MAXEQUAL
Added a new function named MAXEQUAL to the backtester today which people have asked for. Typical usage is:
Define {Gentle_Screamers}
Uses [SI Price] [SI Market Cap Q1] [SI Volume--Average Daily 10d] ...
Deblank [SI Price] [SI Market Cap Q1] [SI Volume--Average Daily 10d] ...
Keep :[SI Price]>5
Keep :[SI Market Cap Q1]>100
Keep :[SI Volume--Average Daily 10d]>10
Keep :[SI Price]>0.9*[SI Price--high 52 week]
Keep :[SI Volume--Average Daily 10d]>0.05*[SI Volume--Average Monthly 3m]
Keep :AND([SI Price/FCFPS]>0,[SI Price/FCFPS]<[SI Ind Price/FCFPS])
Keep :[SI Price Change 52 week]>50
Sort Descending [SI Price Change 4 week]
Keep :MAXEQUAL(1,[SI Industry])
End
The first parameter to MAXEQUAL is the number of equal values allowed. In the example above, the backtester would make sure that only 1 stock from each industry was selected (instant diversification). The second parameter is the expression that needs to be unique.