Ea Analyzer v4 – Calmar Ratio

8 replies

jaukb

Subscriber, 42 replies.

Visit profile

8 years ago #113699

Hi Mark,

 

First of all, I take this opportunity to say thank you for this great tool and give you my encourage to carry on with your work. I bought a pro licence of analyzer and this version is great as well. Just a small request, could you please add the Calmar Ratio to the statistic? It’s a good measure of performance that most of us use.

 

On the other hand, keep on with portfolio master tool. I believe this feature will rock!

 

Thanks again!

 

Regards

 

ie: I added this topic here cos I couldn’t do it in analyzer section (add topic button is not enabled)

 

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

8 years ago #130470

Hello,

 

I’ll look at it, I’d like to make it as an article – a sample how to extend the program and add your own statistical value.

It will take me some time though, I’m on vacation whole next week. But it should be ready with final version of EA Analyzer 4.

Mark
StrategyQuant architect

0

mikeyc

Customer, bbp_participant, community, 877 replies.

Visit profile

8 years ago #130478

There’s loads of these measures:

 

http://www.investopedia.com/terms/m/mar-ratio.asp

http://www.investopedia.com/terms/s/sortinoratio.asp

http://www.quantshare.com/item-1450-megan-ratio-maximum-exponential-growth-annualized

https://www.evestment.com/resources/investment-statistics-guide/omega-ratio

 

Not sure which one is important or that interesting, so implement one as a snippet in SQ4 and hopefully we can add others as people ask for them.

0

jaukb

Subscriber, 42 replies.

Visit profile

8 years ago #130578

Hi Mike,
 
Thanks for that. It would be nice such an article because some of us are programmers too and maybe we can help with this type of requests if we would have a guide to do it. Regarding ratios, there a lot of different measures but Calmar ratio and specially VaR (Value at risk) are the most commonly used. Regarding Var, it would be nice if it will be present it final version as well but I understand this would be difficult but I think it’s something that most of us are looking for to buy a tool like Ea Analizer (Not me, I already bought it :-)).
 
On the other hand, I am really looking forward to have the final version in my hands to see genetic portfolio builder Mike. You really don’t imagine what can I do with a tool like that… 
 
Btw, enjoy your holidays!!
 
Regards

0

mikeyc

Customer, bbp_participant, community, 877 replies.

Visit profile

8 years ago #131924

Hello,

 

I’ll look at it, I’d like to make it as an article – a sample how to extend the program and add your own statistical value.

It will take me some time though, I’m on vacation whole next week. But it should be ready with final version of EA Analyzer 4.

 

Hi Mark,

 

Any chance of an article on extending QA4 with new ways of ranking the Portfolio Master, so that we can create custom fitness functions?  For example how to combine calculations such as stability, profit factor and RT/DD into a ranking function?

 

Thanks,

 

Mike

0

clonex / Ivan Hudec

Customer, bbp_participant, community, sq-ultimate, contributor, author, editor, 271 replies.

Visit profile

8 years ago #131947

Correct me if im wrong. This is just first skatch

Just create new fitness function delete everything and  copy this. Then only choose CalmAr

/*
 * Copyright (c) 2015, StrategyQuant – All rights reserved.
 *
 * Code in this file was made in a good faith that it is correct and does what it should.
 * If you found a bug in this code OR you have an improvement suggestion OR you want to include
 * your own code snippet into our standard library please contact us at:
 *
 * This code can be used only within StrategyQuant products.
 * Every owner of valid (free, trial or commercial) license of any StrategyQuant product
 * is allowed to freely use, copy, modify or make derivative work of this code without limitations,
 * to be used in all StrategyQuant products and share his/her modifications or derivative work
 * with the StrategyQuant community.
 *
 * THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES
 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 */
package com.strategyquant.extend.FitnessFunctions;
import com.strategyquant.lib.fitness.FitnessFunction;
import com.strategyquant.lib.results.SQResultsGroup;
import com.strategyquant.lib.results.SQStats;
import com.strategyquant.lib.results.StatsConst;
import com.strategyquant.lib.settings.SQConst;
import com.strategyquant.lib.utils.SQUtils;
public class CalmarRatio extends FitnessFunction {
   public CalmarRatio() {
      super();
      name = “Calmar”;
      type = FitnessFunction.MAXIMIZE;
   }
   @Override
   public double computeFitness(SQResultsGroup resultsGroup) throws Exception {
      SQStats stats = resultsGroup.getResult(SQConst.SYMBOL_PORTFOLIO).getStats(SQConst.DIRECTION_ALL, SQConst.PL_IN_MONEY, SQConst.KEY_SAMPLE_ALL);
      double fitness = SQUtils.safeDivide(stats.getDouble(StatsConst.CAGR), stats.getDouble(StatsConst.DRAWDOWN));
      return fitness;
   }
}

0

clonex / Ivan Hudec

Customer, bbp_participant, community, sq-ultimate, contributor, author, editor, 271 replies.

Visit profile

8 years ago #131948

Hi Mark,

 

Any chance of an article on extending QA4 with new ways of ranking the Portfolio Master, so that we can create custom fitness functions?  For example how to combine calculations such as stability, profit factor and RT/DD into a ranking function?

 

Thanks,

 

Mike

Mikey . Again. Correct me if im wrong.

 

You can set your fitness very easy 

 

  @Override
   public double computeFitness(SQResultsGroup resultsGroup) throws Exception {
      SQStats stats = resultsGroup.getResult(SQConst.SYMBOL_PORTFOLIO).getStats(SQConst.DIRECTION_ALL, SQConst.PL_IN_MONEY, SQConst.KEY_SAMPLE_ALL);
 
      double stability = stats.getDouble(StatsConst.STABILITY);
      double profitfactor  = stats.getDouble(StatsConst.PROFIT_FACTOR);
      double fitness  = stability*profitfactor;
      
     
      
      return fitness;
 
Dont forget to create new stat value for confirmation ….

0

Juan Carlos del Carmen Garcia

Subscriber, bbp_participant, customer, community, 7 replies.

Visit profile

4 years ago #247419

Hi good afternoon

By following the instructions you have provided in this posted I do not know yet why I am getting a compilation error in line 36 and column 25 which it states illegal character “\ufffd” and as a result it states that the compilation failed (i.e. screen shot attached)

How should I proceed?

Thank you in advanced for your prompt response

 

Attachments:
You must be logged in to view attached files.

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

4 years ago #247421

Hi, can you attach the Java code (zipped) or send to [email protected]? I can check

0

Viewing 8 replies - 1 through 8 (of 8 total)