|
Kiran
2015-04-29 13:10:35
|
|
I have a ranking system of 2 factors with parameters (e.g. sharpe(close, per) where per needs to be optimized from (10,70,10).
If i define it through the Ranking System Manager and include it through the Ranking menu in the Trading System control, it doesn't let me specify the per as a optimizable parameter.
- is there a way to do this without writing Strategy script?
If not, here's the Strategy script i wrote - challenge is it's very slow to optimize (each backtest takes >10minutes) as it has to calculate 3 different composite functions and each function has a BuyRule (60 different combinations)?
Is there a more performant way of implementing this? I've seen the PBIL breeze through this level of complexity when there's no ranking function involved.
// 95 symbols, intraday 10-minute period test running for 3 months
// buyRule - one of a list of 60 different buy rules
// pick Entry rules
ct = ApplyRule("", "LongEntry_concise", -1); // Return number of rules
Optimize("a", 0, ct - 1, 1); // Optimize variable "a" from 0 to Number of rules -1
buyRule = ApplyRule("", "LongEntry_concise", a);
// Ranking system of 2 factors
Optimize("sharpePer",10,70,20);
Optimize("rsiPer",3,12,3);
sharpeRank = comp(sharpe(close,sharpePer),"rank",1,buyRule);
rsiRank = comp((rsi(rsiPer)+rsi(2*rsiPer)+rsi(3*rsiPer)+rsi(4*rsiPer))/4,"rank",1,buyRule);
avgRank = comp((sharpeRank+rsiRank)/2,"rank",1,1);
|
|