[amibroker] Re: Walk Forward Test - How would you...
Hi Keith, this is exactly the direction I was searching for. As I understood ranking of the result is not possible, but I could create a new ratio (as you explained) and use this factor for my tests. Many thanks and kind regards, dubi --- In amibroker@yahoogroups.com, Keith McCombs kmcco...@... wrote: Dubi -- You can make up your own metric. See addcustommetric() and custom back test, CBT, in the users guide and on amibroker.com. http://www.amibroker.com/docs/ab401.html For example, say you want maximum UPI, but you also feel that you would prefer number of trades to be near 5. OptTrades = 5; MultFactor = 2 * OptTrades; Ntrades = (available via GetValue(string MetricName) MyMetric = UPI * (MultFactor * Ntrades - Ntrades^2); // just one way of many -- Keith dubi1974 wrote: Hi Howard and all, yes SPSO is the inbuild particle optimizer When I optimize for Ulcer Index I do not take everytime the best choice, as I do not do it when I optimize for %Net Perf or CAR/MDD. Eaxmple: If I have let's say 3 parameters 100x100x100 I would get 1mn options. If I optimize for %Net Perf with SPSO the list would be about 5000-7000 results. But as I do not want to choose the best %Net Perf but the highest %Net Perf with a high UPI, a high CAR/MDD, high RRR, low StDev I would decide to use the parameters for maybe the 2nd or 3rd etc. rated result. But this is not possible if I directly use the inbuild WalkForward Test of Amibroker, as the system uses always the first choice and not the best choice. If I would optimize directly for RRR, I got sometimes as first choice just 1-2 trades as the StDev was the lowest there, but I would never use this parameters. That is why I was searching for an alternative. Many thanks and kind regards, dubi --- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com, Howard B howardbandy@ wrote: Hi Bisto -- Thanks. From the original posting, I was thinking that SPSO was a metric. Dubi -- The choice of optimization method (exhaustive, cmae, ...) and metric (Ulcer Index, CAR/MDD, k-ratio, ...) are independent. The optimization portion of the walk forward will be carried out using the optimization method you request in you afl code with the OptimizerSetEngine statement. The selection of which of the alternatives tested to use for the out-of-sample run will be determined by the metric you set in the Optimization Target box on the Walk Forward tab of the AA Settings. Or did I misinterpret your question? Thanks, Howard On Fri, Nov 13, 2009 at 3:39 AM, Bisto bistoman73@ wrote: I suppose: Standard Particle Swarm Optimization Bisto --- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com amibroker%40yahoogroups.com, Howard B howardbandy@ wrote: Hi Dubi -- What is SPSO? Thanks, Howard On Wed, Nov 11, 2009 at 9:07 AM, dubi1974 gonzales74@ wrote: Hi! Is it possible to optimize a system (for e.g. best net performance %) with SPSO but then use the highest Ulcer Performance Index or CAR/MDD and use then this parameters for the out of sample test for the next period in the Walk Forward Test of Amibroker? I know I could do this in separate steps, but I would like to automize that. Or does someone know an other solution for this? Many thanks and kind regards, dubi
[amibroker] Re: Walk Forward Test - How would you...
Hi Howard and all, yes SPSO is the inbuild particle optimizer When I optimize for Ulcer Index I do not take everytime the best choice, as I do not do it when I optimize for %Net Perf or CAR/MDD. Eaxmple: If I have let's say 3 parameters 100x100x100 I would get 1mn options. If I optimize for %Net Perf with SPSO the list would be about 5000-7000 results. But as I do not want to choose the best %Net Perf but the highest %Net Perf with a high UPI, a high CAR/MDD, high RRR, low StDev I would decide to use the parameters for maybe the 2nd or 3rd etc. rated result. But this is not possible if I directly use the inbuild WalkForward Test of Amibroker, as the system uses always the first choice and not the best choice. If I would optimize directly for RRR, I got sometimes as first choice just 1-2 trades as the StDev was the lowest there, but I would never use this parameters. That is why I was searching for an alternative. Many thanks and kind regards, dubi --- In amibroker@yahoogroups.com, Howard B howardba...@... wrote: Hi Bisto -- Thanks. From the original posting, I was thinking that SPSO was a metric. Dubi -- The choice of optimization method (exhaustive, cmae, ...) and metric (Ulcer Index, CAR/MDD, k-ratio, ...) are independent. The optimization portion of the walk forward will be carried out using the optimization method you request in you afl code with the OptimizerSetEngine statement. The selection of which of the alternatives tested to use for the out-of-sample run will be determined by the metric you set in the Optimization Target box on the Walk Forward tab of the AA Settings. Or did I misinterpret your question? Thanks, Howard On Fri, Nov 13, 2009 at 3:39 AM, Bisto bistoma...@... wrote: I suppose: Standard Particle Swarm Optimization Bisto --- In amibroker@yahoogroups.com amibroker%40yahoogroups.com, Howard B howardbandy@ wrote: Hi Dubi -- What is SPSO? Thanks, Howard On Wed, Nov 11, 2009 at 9:07 AM, dubi1974 gonzales74@ wrote: Hi! Is it possible to optimize a system (for e.g. best net performance %) with SPSO but then use the highest Ulcer Performance Index or CAR/MDD and use then this parameters for the out of sample test for the next period in the Walk Forward Test of Amibroker? I know I could do this in separate steps, but I would like to automize that. Or does someone know an other solution for this? Many thanks and kind regards, dubi
Re: [amibroker] Re: Walk Forward Test - How would you...
Dubi -- You can make up your own metric. See addcustommetric() and custom back test, CBT, in the users guide and on amibroker.com. http://www.amibroker.com/docs/ab401.html For example, say you want maximum UPI, but you also feel that you would prefer number of trades to be near 5. OptTrades = 5; MultFactor = 2 * OptTrades; Ntrades = (available via GetValue(string MetricName) MyMetric = UPI * (MultFactor * Ntrades - Ntrades^2); // just one way of many -- Keith dubi1974 wrote: Hi Howard and all, yes SPSO is the inbuild particle optimizer When I optimize for Ulcer Index I do not take everytime the best choice, as I do not do it when I optimize for %Net Perf or CAR/MDD. Eaxmple: If I have let's say 3 parameters 100x100x100 I would get 1mn options. If I optimize for %Net Perf with SPSO the list would be about 5000-7000 results. But as I do not want to choose the best %Net Perf but the highest %Net Perf with a high UPI, a high CAR/MDD, high RRR, low StDev I would decide to use the parameters for maybe the 2nd or 3rd etc. rated result. But this is not possible if I directly use the inbuild WalkForward Test of Amibroker, as the system uses always the first choice and not the best choice. If I would optimize directly for RRR, I got sometimes as first choice just 1-2 trades as the StDev was the lowest there, but I would never use this parameters. That is why I was searching for an alternative. Many thanks and kind regards, dubi --- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com, Howard B howardba...@... wrote: Hi Bisto -- Thanks. From the original posting, I was thinking that SPSO was a metric. Dubi -- The choice of optimization method (exhaustive, cmae, ...) and metric (Ulcer Index, CAR/MDD, k-ratio, ...) are independent. The optimization portion of the walk forward will be carried out using the optimization method you request in you afl code with the OptimizerSetEngine statement. The selection of which of the alternatives tested to use for the out-of-sample run will be determined by the metric you set in the Optimization Target box on the Walk Forward tab of the AA Settings. Or did I misinterpret your question? Thanks, Howard On Fri, Nov 13, 2009 at 3:39 AM, Bisto bistoma...@... wrote: I suppose: Standard Particle Swarm Optimization Bisto --- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com amibroker%40yahoogroups.com, Howard B howardbandy@ wrote: Hi Dubi -- What is SPSO? Thanks, Howard On Wed, Nov 11, 2009 at 9:07 AM, dubi1974 gonzales74@ wrote: Hi! Is it possible to optimize a system (for e.g. best net performance %) with SPSO but then use the highest Ulcer Performance Index or CAR/MDD and use then this parameters for the out of sample test for the next period in the Walk Forward Test of Amibroker? I know I could do this in separate steps, but I would like to automize that. Or does someone know an other solution for this? Many thanks and kind regards, dubi
[amibroker] Re: Walk Forward Test - How would you...
I suppose: Standard Particle Swarm Optimization Bisto --- In amibroker@yahoogroups.com, Howard B howardba...@... wrote: Hi Dubi -- What is SPSO? Thanks, Howard On Wed, Nov 11, 2009 at 9:07 AM, dubi1974 gonzale...@... wrote: Hi! Is it possible to optimize a system (for e.g. best net performance %) with SPSO but then use the highest Ulcer Performance Index or CAR/MDD and use then this parameters for the out of sample test for the next period in the Walk Forward Test of Amibroker? I know I could do this in separate steps, but I would like to automize that. Or does someone know an other solution for this? Many thanks and kind regards, dubi
Re: [amibroker] Re: Walk Forward Test - How would you...
Hi Bisto -- Thanks. From the original posting, I was thinking that SPSO was a metric. Dubi -- The choice of optimization method (exhaustive, cmae, ...) and metric (Ulcer Index, CAR/MDD, k-ratio, ...) are independent. The optimization portion of the walk forward will be carried out using the optimization method you request in you afl code with the OptimizerSetEngine statement. The selection of which of the alternatives tested to use for the out-of-sample run will be determined by the metric you set in the Optimization Target box on the Walk Forward tab of the AA Settings. Or did I misinterpret your question? Thanks, Howard On Fri, Nov 13, 2009 at 3:39 AM, Bisto bistoma...@yahoo.com wrote: I suppose: Standard Particle Swarm Optimization Bisto --- In amibroker@yahoogroups.com amibroker%40yahoogroups.com, Howard B howardba...@... wrote: Hi Dubi -- What is SPSO? Thanks, Howard On Wed, Nov 11, 2009 at 9:07 AM, dubi1974 gonzale...@... wrote: Hi! Is it possible to optimize a system (for e.g. best net performance %) with SPSO but then use the highest Ulcer Performance Index or CAR/MDD and use then this parameters for the out of sample test for the next period in the Walk Forward Test of Amibroker? I know I could do this in separate steps, but I would like to automize that. Or does someone know an other solution for this? Many thanks and kind regards, dubi