Optimization (Beta version)

09 Sep 2014, 13:00Optimization (Beta version)#1
cTrader Teamposts: 3396since: 23 Sep 2013

Dear Traders,

We are glad to announce that beta version of Optimization is available in Spotware cAlgo. We decided to publish a beta version, because we believe that our community will provide a valuable feedback.

cAlgo advanced optimization functionality lets you find the optimal set of parameters for your cBot. Optimization runs multiple backtest procedures and compares their performance.

How to start Optimization

  1. Build your cBot

     
  2. Add an Instance
    |
     
  3. Click the Optimization tab

     
  4. Click the Parameters button and select parameters to be optimized

     
  5. Define your time period by using the dropdown menus or by dragging the slider
  6. Click Play

     

Optimization results

Optimization may take a long time to complete. You can see the remaining time estimate next to “Remaining time” label.

 

Optimization process runs backtesting multiple times. Once backtesting for specific set of parameters passed, new row is added to the Passes grid.

 

Passes grid contains the following columns:

  • Pass - number of pass in current Optimization session

  • Fitness - shows how well current pass fits the Optimization Criteria

  • Equity - value of equity at the end of backtesting

  • Balance - value of balance at the end of backtesting

  • Net Profit - the difference between ending balance and starting balance

  • Trades - amount of closed positions

  • Profit factor - total profit divided by total loss

  • Equity drawdown - the maximum amount of equity drawdown

  • Parameters - by pressing Apply button in the parameters column you can apply parameters of the pass to the current cBot instance

Bottom part of optimization window shows details of selected pass.

 

After you find a pass that shows desired performance, you can press Apply button next to it to apply parameters to current cBot instance.

Settings

All optimization settings are splitted to 5 groups:

  1. Backtesting Settings group allows to specify Starting Capital, Commission, Data mode settings

     
  2. cBot Parameters group provides an ability to select parameters to be optimized. For every selected parameter you must specify set of values to be used during optimization.

     
  3. Optimization Criteria group provides an ability to specify the criteria to be used during optimization. For every pass fitness value will be calculated based on selected criteria. Fitness value is used to compare backtesting results. The higher the value, the better.

     
  4. Optimization Method. Two options are available: Grid that simply backtests each possible set of parameters and Genetic Algorithm that finds the optimal parameters faster.

     
  5. Resources group provides an ability to allocate CPU resources for optimization. The more resources you allocate, the faster optimization will be done. CPU resources can be adjusted during optimization.

 


TRADERS FIRST™ Vote for your favorite features: http://vote.spotware.com/
09 Sep 2014, 18:40#2
Elogosposts: 71since: 23 Jan 2014

I have been waiting for this for a while now.

My own libraries do exactly the same, however I will not longer need to macro the back-test button in cAlgo.

12 Sep 2014, 11:58#3
cTrader Teamposts: 3396since: 23 Sep 2013

Custom optimzation criterion has been added:

If Custom criterion is chosen you need to override GetFitness method in your cBot and provide a fitness values based on GetFitnessArgs. The higher fitness the value, the better.

Example 1:

protected override double GetFitness(GetFitnessArgs args)
{
        return args.WinningTrades / args.LosingTrades;//maximize count of winning trades and minimize count of losing trades
}

Example 2: 

protected override double GetFitness(GetFitnessArgs args)
{
        return Math.Pow(args.WinningTrades, 2) / args.LosingTrades;//count of winning trades is more important than count of losing trades
}

 


TRADERS FIRST™ Vote for your favorite features: http://vote.spotware.com/
12 Sep 2014, 22:09#4
Researcherposts: 21since: 06 Aug 2013

Super-cool feature, now it's possible to trade with cAlgo :)

15 Sep 2014, 10:23#5
portocristoposts: 2since: 15 Sep 2014

The optimization process takes a lot of time in my computer. I'm going to get a new one. But I don't know what's better to look at in processor performance: more number of cores or higher frequency? 

15 Sep 2014, 11:21#6
cTrader Teamposts: 3396since: 23 Sep 2013

Number of cores is more important. Please also make sure that Resource slider is set to 100%:


TRADERS FIRST™ Vote for your favorite features: http://vote.spotware.com/
16 Sep 2014, 18:33#7
mijo212posts: 40since: 12 Oct 2013

Hello Spotware,

it is possible to incorporate feature selection as the other versions ?

Example: broker (FxPro) does not allow test version for live accounts and thus we must have more cAlgo or cTrader platforms open at once.

thx Mijo.

17 Sep 2014, 14:16RE:#8
cTrader Teamposts: 3396since: 23 Sep 2013

mijo212 said:

Hello Spotware,

it is possible to incorporate feature selection as the other versions ?

Example: broker (FxPro) does not allow test version for live accounts and thus we must have more cAlgo or cTrader platforms open at once.

thx Mijo.

While Optimization functionality is in beta stage, it is available for Spotware cAlgo only. We will release Optimization as soon as we decide that this feature is ready.


TRADERS FIRST™ Vote for your favorite features: http://vote.spotware.com/
19 Sep 2014, 04:54Small wordi#9
RV13posts: 7since: 29 Aug 2014

Dear Sportware,

Small suggestion for wording change in the new Beta optimizer (which looks great btw!)

GA selection box: Genetic Algorithm: "The emulation of the biological process of evolution"

Would suggest changing this to:

Genetic Algorithm: "The emulation of a biological development process"

To avoid reference to "evolution" - which by some can be read as "evolution theory", and this is for many people (including myself) an invalid theory.

Thanks!

19 Sep 2014, 10:18RE: Small wordi#10
cTrader Teamposts: 3396since: 23 Sep 2013

RV13 said:

Dear Sportware,

Small suggestion for wording change in the new Beta optimizer (which looks great btw!)

GA selection box: Genetic Algorithm: "The emulation of the biological process of evolution"

Would suggest changing this to:

Genetic Algorithm: "The emulation of a biological development process"

To avoid reference to "evolution" - which by some can be read as "evolution theory", and this is for many people (including myself) an invalid theory.

Thanks!

Thank you for your suggestion, we will consider it.


TRADERS FIRST™ Vote for your favorite features: http://vote.spotware.com/