Jump to content


Photo

Quant Editor article: Add new statistical value - comments


  • Please log in to reply
3 replies to this topic

#1 AC1962

AC1962

    Advanced Member

  • Customers
  • 84 posts
  • LocationUK

Posted 01 March 2017 - 08:36 AM

Hi Mark
 
I am a complete novice at writing code and using Quant Editor, but I've today worked through QE article 'Add new statistical value' and have the following comments:
 
1. Strictly following Section 3 results in a compilation error. Suggested VRatio() code is cause of error:
   setName(L.t("VRatio"));
   setTooltip(L.t("VRatio"));
Whereas using default code of:
   setName("VRatio");
   setTooltip("VRatio"); 
results in successful compilation. Is this change in code correct?
 
2. Strictly following Section 3 results in a compilation error. Suggested getValue() code of 'getCorrectPlType(plType)' is cause of error. Looking at other files, they all appear to use 'getGlobalPlType(plType)' instead. This allows for successful compilation. Is this change in code correct?
 
3. Where can I obtain full listing of 'StatsConst' values that can be defined, so that I can attempt to define my own ratios?
 
Otherwise using QE worked well for me.
 
Thanks 
AC1962


#2 AC1962

AC1962

    Advanced Member

  • Customers
  • 84 posts
  • LocationUK

Posted 04 March 2017 - 05:08 AM

Hi Mark

 

Further to my post above: Item 3. I have subsequently found the listing of available 'class constants' on web page: http://www.strategyq...-constants.html

 

One of the listed class constants I wish to use is: DEGREES_OF_FREEDOM. However, this class constant currently returns '0' value for all my strategies loaded into QA, although within SQ a non-zero value for statistic 'Degrees Of Freedom' is given for each strategy. Please can you investigate and confirm what has gone wrong and why QA is currently returning '0' value for DEGREES_OF_FREEDOM?

 

Thanks

AC1962



#3 Mark Fric

Mark Fric

    Administrator

  • Administrators
  • 2,985 posts

Posted 09 March 2017 - 11:37 AM

Hello,

 

there were some minor updates in the program, so it might be that my older examples have to be tweaked to make them compile.

 

As for DEGREES_OF_FREEDOM - this is a measure computed from strategy complexity, not from its history results, so it is zero in QA. It is because QA doesn't have access to the strategy properties, it loads only trading history.

Degrees of freedom basically tells you how complicated the strategy is and how many parameters it uses, smaller number means the strategy uses less parameters which is usually better.


Mark
StrategyQuant architect

#4 AC1962

AC1962

    Advanced Member

  • Customers
  • 84 posts
  • LocationUK

Posted 09 March 2017 - 09:32 PM

Hi Mark

 

Thanks. So am I correct is assuming that the DEGREES_OF_FREEDOM constant will be accessible as a calculated non-zero value for use within an SQ4 snippet, but not in QA?

 

If so, this is fine as I eventually wish to access the DEGREES_OF_FREEDOM constant in SQ4 to create a user defined ratio to filter on.

 

Thanks

AC1962






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users