The QM in me still wants the lazy F$@#&*s out of the portfolio and back on the street, going back to their old job.....looking for a new one!
Joking BTW....just for the record.
The QM in me still wants the lazy F$@#&*s out of the portfolio and back on the street, going back to their old job.....looking for a new one!
Guys, what is considered the best metric for optimization robustness? Thanks.
Hi GB --
The most important criteria is that you have confidence that the order you prefer for the alternatives that are examined during the optimization is the same order that the objective function puts them in. That is, you should have confidence that the alternative with the highest objective value score is the one you would pick given knowledge of all of them. Or, at very least, that you are confident that the highest ranked result is adequate for your purposes.
Best regards,
Howard
Hi GB --
Say there are 3 variables, each with 10 values, tested -- 1000 alternatives in total. If you printed out the stats of all 1000, laid them out on the floor and moved them around, you would subjectively rank them -- prefer some over others. The objective function should give scores that agree with your subjective ranking.
At a minimum, each test period -- in-sample and out-of-sample -- must be long enough to, on average, have several completed trades. In general the periods should be as short as possible to give frequent resychronizations to keep the model tuned to the data, but long enough to give stability and not be fitting too complex a model to too few data points. There is no general rule. You will need to do some testing to see what works best.
Best regards,
Howard
Future leak-
Just playing around with some code I found online and the system in question has a future leak identified in ABs code check function.
I narrowed it down to this line of code and I am curious if someone could tell me why this line would generate a future leak.
AddToComposite(Normaliser, "~atr_"+Name(), "C", 1+2+8);
Thanks in advance.
Future leak-
Just playing around with some code I found online and the system in question has a future leak identified in ABs code check function.
I narrowed it down to this line of code and I am curious if someone could tell me why this line would generate a future leak.
AddToComposite(Normaliser, "~atr_"+Name(), "C", 1+2+8);
Thanks in advance.
What's a 'future' leak and how does it manifest itself here ?
Thanks again. My subjective rating would be the steepest equity curve with the smallest draw down. So I guess that just means as the objective measure I should use CAR/MDD or maybe Sharpe, yes?
Hi GB --
I recommend that two objective functions be used.
The first is during development -- looking for the best rules and parameters. It is important that there be no position sizing, not even compounding. Allowing any position sizing introduces an unfavorable bias that overestimates profit and underestimates risk. You may not have too much choice for your objective function. If possible, do not include a term that attempts to minimize drawdown. Drawdown is very path dependent. Minimizing drawdown rewards a specific path that is certain to be above the mean and introduces another unfavorable bias. The emphasis during development should be on accurate recognition of the trades that you are looking for -- so emphasize metrics related to the trades themselves. Minimizing root mean square of MAE (Maximum Adverse Excursion) is good, because it is the number and magnitude of losing trades that limit position size, which in turn limits profit potential. Also include terms that have the trading frequency and / or holding period you prefer. And percentage winning trades you want. Definitely insist on a positive geometric gain per trade.
The second is during trading. Now you Do want to minimize drawdown. But don't rely on a single value such as average drawdown or maximum drawdown -- look at the entire distribution of drawdowns -- the Cumulative Distribution Function (CDF). Pay attention to the tail of risk -- the part of the distribution that is above the 95th percentile -- that is the LTCM / black swan area. I recommend using the "best estimate" set of trades and the technique I describe in my Modeling book to estimate risk, determine the highest safe position size, estimate profit potential, and decide whether the system is worth trading. After every trade, update the best estimate set and rerun the risk analysis, position size, and trade / no trade decision. (This repeated updating of the set of trades and re-estimating of risk and position size is an empirical Bayesian process, if it matters what the formal name for it is.)
Both CAR/MDD and Sharpe reward low drawdown. They are both good for the trading portion. See what other objective functions are available to you during development. CAR/MDD may be the best of a poor selection, in which case, use it. But be prepared for the bias -- which will cause out-of-sample performance to be lower than in-sample performance.
Best regards,
Howard
Hi Howard,
You've exposed quite a few gaps in my knowledge!
AB doesn't seem to have the root mean square of the MAE as an optimization parameter. Is this a custom calculation? Also, how do I best insist upon a positive geometric gain per trade?
Thanks again.
AddToComposite just creates a symbol called ~atr "+ name().
It is probably the normaliser variable. How does that one look like?
Thanks for that, the normaliser variable is
Normaliser = ATR(20);
But when I double slash...... //AddToComposite(Normaliser, "~atr_"+Name(), "C", 1+2+8);
The system runs fine and the code check doesnt identify any future leaks.
So..a couple more questions please, if Amibroker doesnt identify any future leaks, does that mean there isnt any?
And if thats so and the system performs really well in walk-forward testing consistently over various watch lists and many different tests does that mean the system is robust and a good candidate for trading?
Thanks for your time.
Hate to be a pain but also....
How many times can you run a walk forward test over the same time frame, does it matter as long as you save fresh data for final testing?
Cheers.
Ok thanks Trash, I have a long way to go with .afl so wont even pretend to understand that yet and will take your word for it.
But back to the future leak, if Amibroker doesnt detect a future leak in code check, does that mean that there isnt one? And if so, and the system performs well consistently in walk forward testing then its robust and a candidate to trade?
Thanks.
Hello and welcome to Aussie Stock Forums!
To gain full access you must register. Registration is free and takes only a few seconds to complete.
Already a member? Log in here.