Does it really matter whether you percentile the measures? If all you are concerned about is relative ordering, then there is no need for percentile and you can do it all in one pass using AB.
firstMeasure = ...; secondMeasure = ...; PositionScore = x * firstMeasure + y * secondMeasure; The backtester will favor the highest ranks first, regardless of the distribution of the rank values. If for whatever reason you find that you must use percentile (e.g. if creating an oscillator), then it can still be done in AB, but would take more than one pass. Mike --- In [email protected], Nick de Peyster <nickdepeys...@...> wrote: > > I have this model that I would like to recreate, if possible, in AB. It > would be a variant on positionscore. > > Imagine several different measures (e.g., ROC, RSI, whatever) for a groups of > stocks. Each day I calculate the different measures for each stock. > > I then want to combine the factors. I do it this way: > > 1. For each date, I isolate the stocks for which I have measures for that > date alone. > 2. Iterating through each factor, I rank-order them and then percentile so > that each measure is scaled comparably to the others > 3. I then combine (sum,average,weighted average, whatever) the different > measures into a composite score > 4. I percentile the composite scores so that each stock for that date has a > score from 1 to 100. If there are fewer than 100 stocks, they will be spaced > appropriately such that the highest has a score of 100 and the lowest 1. > > > > >
