Optimization of 3 or more parameters

Discussion in 'Strategy Building' started by ehbeehefak, Aug 10, 2015.

  1. Yes, I want to run a strategy for every fast-sma,slow-sma,stoploss-distance and takeprofit-distance value. Plotting the strategy results of fast-sma and slow-sma is achievable, but as you said, what if I add the stoploss-distance to the mix?

    Sharpe ratio was just an example, it can just as be Net Profit, Net Profit/Max Drawdown and the similar statistics.
     
    #11     Aug 10, 2015
  2. You need first to formalise your problem in a "math" way

    fast-sma ( valuei) = fast-sma + increment_fastsma
    Fsma(i) = Fsma0 + i*coeffF
    Ssma(j)= Ssma0 +j*coeffS
    stops(k)= stops0 + k*coeffK

    For each you get the profit = Function ( i,j,k).
    Now, you want to maximise the profit, while minimizing k, this on the "field" (i,,j).

    Is this what you want to do?
     
    #12     Aug 10, 2015
  3. Actually, I am using R, I found that image on google just to clarify what I meant.
     
    #13     Aug 10, 2015
  4. Yes, kind of. Minimizing k is not needed though. Stops can be far away if that is the most optimal. Also, maximizing function(i,j,k) is not adequate, as it might return me parameters that might represent a "peak" value (which means the parameter combination is very sensitive to market changes). I want to choose "plateau" values (parameter combination is more robust compared to "peak" combination). Here is a picture to explain further:
    http://www.multicharts.com/img/8323_3d_graf.png
     
    #14     Aug 10, 2015
  5. In that case, your could plot a set of 3D "wires"
    i,j, stop values curve ( the chart named profitvaluek)
     
    #15     Aug 10, 2015
  6. That can results in hundreds of plots, but seems it is the only way to do this.
     
    #16     Aug 10, 2015
  7. No : you plot the different "wires" on the same 3D plot.
    You can start with 5 profits values , all on the same chart.
     
    #17     Aug 10, 2015
  8. Oh, ok I see. So I will plot 5 of these (https://www.wavemetrics.com/products/igorpro/creatinggraphs/3dandvolume/surfacepix/wireframe1.jpg). Seems it is going to be too cluttered, but giving them different colors might improve it a little. Thanks.

    Also, although this solves the problem for 3-parameter strategies, it won't work with 4-parameter strategies.
     
    #18     Aug 10, 2015
  9. Try with one profit target. And plot its wire of stops on (i,j).
    Different wire colors is a very good way to highlight it.

    Actually, do you mind putting such a 3D plot for a 50 and 100sma,
    20 and 50 sma, as well as 100sma and 200 sma.
    I am curious to check how different these are.
     
    #19     Aug 10, 2015
  10. I don't have any experience with wireframe plots in R but will try to do that for you. I have only done heatmaps in R, but look into it when I get home from university.
     
    #20     Aug 10, 2015