It seems convenient, but I don't quite understand it. Study while writing to master it. Still writing.
The actual Quant Analyzer Analyze --Overview screen and
C:\QuantAnalyzer4\extend\Snippets\com\strategyquant\extend\OverviewTab\SQDefault.java I will guess by comparing the contents with VS Code.
d2WithPlType(stats.getXXXXX(XXXXX), combination.getPLType()) It seems to match the display format (amount, pips,%) d2WithPlType(stats.getXXXXX(XXXXX), SQConst.PL_IN_PCT) It seems that the display format is fixed to% d2(stats.getXXXXX(XXXXXXXXXX) It seems that you are looking for the second decimal place. statsConst.XXXXX I wish I could see the contents of this. If you know how the calculated value is, it seems that you can combine it in various ways.
In SQDefault.java, stats.getInt (StatsConst.NUMBER_OF_TRADES)
In SQDefault.java, d2WithPlType (stats.getDouble (dd_key), combination.getPLType ()) ANNUAL % / MAX DD %: In SQDefault.java, d2 (stats.getDouble (StatsConst.AAR_DD_RATIO))
In SQDefault.java, d2 (stats.getDouble (StatsConst.SHARPE_RATIO)) Risk (standard deviation) is a measure of excess return per unit (excess return that exceeds the return that can be obtained even with zero risk). The higher this value, the higher the excess return obtained by taking the risk ( Efficiently earned profits). This is useful when comparing different investment targets and considering which return is higher for the same risk. This Sharpe ratio is also used to evaluate the investment trust management performance as a measure of risk-adjusted returns.
In SQDefault.java, d2WithPlType (stats.getDouble (StatsConst.PCT_DRAWDOWN), SQConst.PL_IN_PCT) R EXPECTANCY: In SQDefault.java, d2WithPlType (stats.getDouble (StatsConst.R_EXPECTANCY), "R") performance metrics developed by Van Tharp, it gives you the average profit value related to average risk (R) that you can expect from a system over many trades. It seems to be how much you can benefit from the risk on average. How is it different from the Sharpe ratio?
In SQDefault.java, d2 (stats.getDouble (StatsConst.PROFIT_FACTOR)) No explanation needed
In SQDefault.java, d2WithPlType (stats.getDouble (StatsConst.AVG_PROFIT_BY_DAY), combination.getPLType ()) No explanation needed R EXPECTANCY SCORE: In SQDefault.java, d2WithPlType (stats.getDouble (StatsConst.R_EXPECTANCY_SCORE), "R") standard R-Expectancy doesn’t consider the length of testing period and number of trades produced. There is a difference when you make for example $2000 per year by making 10 trades, or by making 100 trades. R-Expectancy Score adds a score for trades frequency. It is computed as: R-Expectancy * averageTradesPerYear
RETURN / DD RATIO In SQDefault.java, d2 (stats.getDouble (StatsConst.RETURN_DD_RATIO))
In SQDefault.java, d2WithPlType (stats.getDouble (StatsConst.AVG_PROFIT_BY_MONTH), combination.getPLType ()) STR QUALITY NUMBER: In SQDefault.java, d2 (stats.getDouble (StatsConst.SQN))
In SQDefault.java, d2 (stats.getDouble (StatsConst.WINNING_PCT)) No explanation needed AVERAGE TRADE: In SQDefault.java, d2WithPlType (stats.getDouble (StatsConst.AVG_TRADE), combination.getPLType ()) SQN SCORE: In SQDefault.java, d2 (stats.getDouble (StatsConst.SQN_SCORE))
Strategy
Wins / Losses Ratio: In SQDefault.java, d2 (stats.getDouble (StatsConst.WIN_LOSS_RATIO)) Did you just express the winning percentage as a ratio? AHPR: In SQDefault.java, d2 (stats.getDouble (StatsConst.AHPR)) Refer to this site, maybe a formula like profit / loss / holding period. Expectancy In SQDefault.java, d2 (stats.getDouble (StatsConst.EXPECTANCY))
In SQDefault.java, "" + stats.getInt (StatsConst.STAGNATION_PERIOD) It is a mystery why the empty string is added.
Payout Ratio (Avg Win/Loss) In SQDefault.java, d2 (stats.getDouble (StatsConst.PAYOUT_RATIO)) Z-Score In SQDefault.java, d2 (stats.getDouble (StatsConst.Z_SCORE)) Deviation In SQDefault.java, d2WithPlType (stats.getDouble (StatsConst.STANDARD_DEV), combination.getPLType ()) There is a description of StatsConst.STANDARD_DEV, is it standard deviation?
In SQDefault.java, d2WithPlType (stats.getDouble (StatsConst.STAGNATION_PERIOD_PCT), SQConst.PL_IN_PCT)
Average # of Bars in Trade In SQDefault.java, d2 (stats.getDouble (StatsConst.AVG_BARS_TRADE)) Z-Probability In SQDefault.java, d2 (stats.getDouble (StatsConst.Z_PROBABILITY)) + "%" Exposure In SQDefault.java, d2 (stats.getDouble (StatsConst.EXPOSURE, 0)) + "%" The percentage of financial assets held that are exposed to the risk of market price fluctuations.
In SQDefault.java, d2 (Math.pow (stats.getDouble (StatsConst.STABILITY), 4)) Self-made measurement value. A coefficient of how far the "profit and loss curve" and the "straight line connecting the first and last transactions" are. It can be said that the closer the value is to 1, the more stable it is. Normally it is r ^ 2, but Quant Analyzer seems to use r ^ 4, so the difference is easy to understand. I wanted it to be easier to understand, so I chose r ^ 16.
It seems that the explanation is annoying, so I will postpone it.
No explanation needed In SQDefault.java, "" + stats.getInt (StatsConst.NUMBER_OF_PROFITS)
No explanation needed In SQDefault.java, d2WithPlType (stats.getDouble (StatsConst.GROSS_PROFIT), combination.getPLType ())
No explanation needed In SQDefault.java, d2WithPlType (stats.getDouble (StatsConst.MAX_PROFIT), combination.getPLType ())
No explanation needed In SQDefault.java, d2 (stats.getDouble (StatsConst.AVG_CONSEC_WIN))
No explanation needed In SQDefault.java, "" + stats.getInt (StatsConst.NUMBER_OF_LOSSES)
No explanation needed In SQDefault.java, d2WithPlType (stats.getDouble (StatsConst.GROSS_LOSS), combination.getPLType ())
No explanation needed In SQDefault.java, d2WithPlType (stats.getDouble (StatsConst.MAX_LOSS), combination.getPLType ())
No explanation needed In SQDefault.java, d2 (stats.getDouble (StatsConst.AVG_CONSEC_LOSS))
In SQDefault.java, ""
No explanation needed In SQDefault.java, d2WithPlType (stats.getDouble (StatsConst.AVG_WIN), combination.getPLType ())
No explanation needed In SQDefault.java, "" + stats.getInt (StatsConst.MAX_CONSEC_WINS) Avg # of Bars in Wins I think it's how many bars you straddle from the start of trading to the settlement ... (I honestly don't know) In SQDefault.java, d2 (stats.getDouble (StatsConst.AVG_BARS_WIN))
No explanation needed In SQDefault.java, "" + stats.getInt (StatsConst.NUMBER_OF_CANCELED)
No explanation needed In SQDefault.java, d2WithPlType (stats.getDouble (StatsConst.AVG_LOSS), combination.getPLType ())
No explanation needed In SQDefault.java, "" + stats.getInt (StatsConst.MAX_CONSEC_LOSS) Avg Bars in Losses I think it's how many bars you straddle from the start of trading to the settlement ... (I honestly don't know) In SQDefault.java, d2 (stats.getDouble (StatsConst.AVG_BARS_LOSS))
You may find out a lot by referring to "return stats.getDouble (StatsConst.STABILITY, 0" in "GetValue" of the file in the same folder.
QuantAnalyzer4\extend\Snippets\com\strategyquant\extend\DatabankColumns\Stability.java
@Override
public Object getValue(SQResultsGroup strategyResults, String dataType, String direction, String sampleType, String plType) throws Exception {
SQResult result = strategyResults.getResult(SQConst.SYMBOL_PORTFOLIO);
SQStats stats = result.getStats(direction, getGlobalPlType(plType), sampleType);
if(stats==null) throw new StatsMissingException();
return stats.getDouble(StatsConst.STABILITY, 0);
}
Stability
stats.getDouble(StatsConst.STABILITY, 0)
As mentioned earlier, it is the correlation coefficient (r ^ 4) between the "profit and loss curve" and the "straight line connecting the first and last transactions".
Symmetry
stats.getDouble(StatsConst.SYMMETRY)
Well I do not know!
Fittness
strategyResults.getResult(SQConst.SYMBOL_PORTFOLIO)
.getStats(SQConst.DIRECTION_ALL, SQConst.PL_IN_MONEY, SQConst.KEY_SAMPLE_ALL)
.getDouble(StatsConst.FITNESS, 0)
Well I do not know!
CalmarRatio
stats.getDouble("CalmarRatio", 12)
The Calmar ratio is a comparison of the average annual compounded rate of return and the maximum drawdown risk of commodity trading advisors and hedge funds. The lower the Calmar ratio, the worse the investment performed on a risk-adjusted basis over the specified time period; the higher the Calmar ratio, the better it performed. Generally speaking, the time period used is three years, but this can be higher or lower based on the investment in question. I write something like a risk-return ratio. How is it different from the Sharpe ratio? You can see that the higher it is, the better. Basically I see it on a 3-year basis, but it seems that it can be short or long.
It seems that there are various things in, so it may be interesting to take a look.
Recommended Posts