StrategyQuant
Assistant IA QAlgoCloudQuantAnalyzerQuantDataManager
Cours gratuitEntreprise
BlogDocumentationForumContactez-nous
BlogMarketplace
Se connecter
Créer un compte gratuit

Produit

  • Tarifs & licences
  • Formations
  • Place de marché
  • Commencer l'essai gratuit

Mentions légales

  • Conditions d'utilisation
  • Politique de confidentialité
  • Cookies

Contact

[email protected]

Société

StrategyQuant s.r.o.

Korunní 2569/108, Vinohrady, 101 00 Praha 10, République tchèque, UE

IČ : 04000498

DIČ : CZ04000498

Réseaux sociaux

  • Mentions légales | TRAITEMENT ET PROTECTION DES DONNÉES PERSONNELLES

    Les performances passées ne constituent pas une garantie de succès futur. Toutes les informations doivent être considérées à des fins pédagogiques uniquement

    Avertissement des ÉTATS-UNIS requis par le gouvernement - La Commodity Futures Trading Commission précise : Le trading sur les contrats à terme et les options présente d'importantes opportunités de gains, mais implique également un risque potentiel élevé. Vous devez être conscient des risques et être prêt à les accepter afin d'investir sur les marchés des contrats à terme et des options. Ne tradez pas avec de l'argent que vous ne pouvez pas vous permettre de perdre. Ceci ne constitue ni une sollicitation ni une offre d'achat/de vente de contrats à terme, d'actions ou d'options sur ces mêmes instruments. Aucune déclaration n'est faite garantissant qu'un compte réalisera ou est susceptible de réaliser des profits ou des pertes similaires à ceux présentés dans ce document. Les performances passées de tout système ou méthode de trading ne sont pas nécessairement représentatives des résultats futurs.

    RÈGLE CFTC 4.41 - LES RÉSULTATS DE PERFORMANCE HYPOTHÉTIQUES OU SIMULÉS COMPORTENT CERTAINES LIMITES. CONTRAIREMENT AUX RÉSULTATS DE PERFORMANCE RÉELS, LES RÉSULTATS SIMULÉS NE REPRÉSENTENT PAS DES OPÉRATIONS DE TRADING RÉELLES. DE PLUS, DANS LA MESURE OÙ LES TRANSACTIONS N'ONT PAS ÉTÉ EXÉCUTÉES, LES RÉSULTATS ONT PU COMPENSER L'IMPACT DE CERTAINS FACTEURS DE MARCHÉ, LE CAS ÉCHÉANT, TELS QUE LE MANQUE DE LIQUIDITÉ. LES PROGRAMMES DE TRADING SIMULÉ EN GÉNÉRAL SONT ÉGALEMENT SUJETS AU FAIT QU'ILS SONT CONÇUS EN BÉNÉFICIANT D'UN RECUL HISTORIQUE. AUCUNE DÉCLARATION N'EST FAITE GARANTISSANT QU'UN COMPTE RÉALISERA OU EST SUSCEPTIBLE DE RÉALISER DES PROFITS OU DES PERTES SIMILAIRES À CEUX INDIQUÉS.

    AUCUNE DÉCLARATION N'EST FAITE GARANTISSANT QU'UN COMPTE RÉALISERA, OU EST SUSCEPTIBLE DE RÉALISER, DES PROFITS OU DES PERTES SIMILAIRES À CEUX ÉVOQUÉS SUR CE SITE. SI VOUS DÉCIDEZ D'INVESTIR DE L'ARGENT RÉEL, TOUTES LES DÉCISIONS DE TRADING SUR LES MARCHÉS FINANCIERS VOUS APPARTIENNENT.

    © StrategyQuant 2026

    Propulsé par Klaudie.ai

    Retour au marketplaceDIGITAL

    Number of trades from WF Matrix

    StrategyQuantPlugins
    Number of trades from WF Matrix

    Colonne de databank qui calcule le nombre de transactions sur l'ensemble des combinaisons de résultats de la Walk Forward Matrix, très pratique pour analyser la fréquence des transactions et la robustesse de la stratégie à travers les paramètres.

    Remarque – il existe une version mise à jour pour SQX Build 140 et versions ultérieures – voir le snippet joint.

    Ce snippet Java ajoute une nouvelle fonctionnalité de colonne de databank et vous permet de calculer le nombre de transactions de toutes les combinaisons d'une matrice WF.

    /*
     * Copyright (c) 2017-2018, 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:
     * https://roadmap.strategyquant.com
     *
     * 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 SQ.Columns.Databanks;
    import com.strategyquant.lib.L;
    import com.strategyquant.tradinglib.DatabankColumn;
    import com.strategyquant.tradinglib.ResultsGroup;
    import com.strategyquant.tradinglib.SettingsKeys;
    import com.strategyquant.tradinglib.ValueTypes;
    import com.strategyquant.tradinglib.WalkForwardResult;
    import com.strategyquant.tradinglib.optimization.WalkForwardMatrixResult;
    public class NumberOfTradeWF extends DatabankColumn {
    	public NumberOfTradeWF() {
    		super(L.tsq("# of trades WF"), DatabankColumn.Integer, ValueTypes.Aproximate, 0, 0, 100);
    		setWidth(70);
    		setTooltip(L.tsq("Number of trades WF"));
    		// this means that value depends on number of trading days 
    		// and has to be normalized by days when comparing with another
    		// result with different number of trading days
    		setDependentOnTradingPeriod(true); 
    	}
    	//------------------------------------------------------------------------
    	@Override
    	public String getValue(ResultsGroup results, String resultKey, byte direction, byte plType, byte sampleType) throws Exception {		
    		/*
    		 * Sample code to obtain the stat value of the WF result
    		 * ----------------------------------------------------
    		 * ----------------------------------------------------
    		 * ----------------------------------------------------
    		 */
    		//Retrieve the WF matrix results
    		WalkForwardMatrixResult mwfResult = (WalkForwardMatrixResult) results.mainResult().get(SettingsKeys.WalkForwardResult);
    		if(mwfResult==null) {
    			return "NA";
    		}
    		/*
    		 *  WalkForwardMatrixResult opt params
    		 * 	public int start1;
    			public int stop1;
    			public int increment1;
    			public int start2;
    			public int stop2;
    			public int increment2;
    			for(int j=mwfResult.start2; j<=mwfResult.stop2; j+=mwfResult.increment2) {
    				for(int i=mwfResult.start1; i<=mwfResult.stop1; i+=mwfResult.increment1) {
    					WalkForwardResult wfResult = mwfResult.getWFResult(i, j);
    				}
    			}
    		 */
    		int param1 = mwfResult.start1; //oos		
    		int param2 = mwfResult.start2; //run
    		//Obtain a specific WF result from the matrix
    		WalkForwardResult wfResult = mwfResult.getWFResult(param1, param2);
    		/*
    		 * WalkForwardResult calculated stats
    		 * public SQStats stats = null; //Full Sample stats
    		 * public SQStats statsOOS = null; //OOS stats
    		 * public SQStats statsStability = null; //The stats stability
    		 * public SQStats statsScore = null; //The stats score
    		 * public SQStats statsSpecial = null; //The stats special
    		 */
    		//Return the calculated value of stats
    		return wfResult.stats.getInt("NumberOfTrades")+"";
    	}
    }
    Les performances passées ne préjugent pas des performances futures. Toutes les informations doivent être considérées comme ayant un but purement éducatif ÉTATS-UNIS Avertissement requis par le gouvernement - La Commodity Futures Trading Commission précise : Le trading de contrats à terme et d'options comporte d'importantes perspectives de gain, mais aussi d'importants risques potentiels. Vous devez être conscient des risques et accepter de les assumer afin d'investir sur les marchés des contrats à terme et des options. Ne tradez pas avec de l'argent que vous ne pouvez pas vous permettre de perdre. Ce document ne constitue ni une sollicitation ni une offre d'achat/de vente de contrats à terme, d'actions ou d'options sur ces derniers. Aucune déclaration n'est faite garantissant qu'un compte réalisera ou est susceptible de réaliser des profits ou des pertes similaires à ceux mentionnés dans ce document. La performance passée de tout système ou méthode de trading n'est pas nécessairement indicative des résultats futurs. RÈGLE CFTC 4.41 - LES RÉSULTATS DE PERFORMANCE HYPOTHÉTIQUES OU SIMULÉS COMPORTENT CERTAINES LIMITES. CONTRAIREMENT À UN HISTORIQUE RÉEL DE PERFORMANCE, LES RÉSULTATS SIMULÉS NE REPRÉSENTENT PAS UN TRADING RÉEL. DE PLUS, ÉTANT DONNÉ QUE LES TRANSACTIONS N'ONT PAS ÉTÉ RÉELLEMENT EXÉCUTÉES, LES RÉSULTATS ONT PU SOUS-ÉVALUER OU SURÉVALUER L'IMPACT DE CERTAINS FACTEURS DE MARCHÉ, TELS QUE LE MANQUE DE LIQUIDITÉ. LES PROGRAMMES DE TRADING SIMULÉ EN GÉNÉRAL SONT ÉGALEMENT SOUMIS AU FAIT QU'ILS SONT CONÇUS AVEC LE RECUL DU TEMPS. AUCUNE DÉCLARATION N'EST FAITE GARANTISSANT QU'UN COMPTE RÉALISERA OU EST SUSCEPTIBLE DE RÉALISER DES PROFITS OU DES PERTES SIMILAIRES À CEUX AFFICHÉS. AUCUNE DÉCLARATION N'EST FAITE GARANTISSANT QU'UN COMPTE RÉALISERA, OU EST SUSCEPTIBLE DE RÉALISER, DES PROFITS OU DES PERTES SIMILAIRES À CEUX ÉVOQUÉS SUR CE SITE. SI VOUS DÉCIDEZ D'INVESTIR DE L'ARGENT RÉEL, TOUTES LES DÉCISIONS DE TRADING SUR LES MARCHÉS FINANCIERS DOIVENT ÊTRE LES VÔTRES.
    Gratuit

    Fichiers

    • Snippet-NumberoftradesfromWFMatrix.sqm4 KBVerrouillé

    Le téléchargement se débloque après l’achat ou avec un niveau actif.

    Détails
    Version1.0.0
    Publié le19 octobre 2026
    Dernière mise à jour22 octobre 2026
    AppSQ
    TypeSnippet
    Authortomas262
    App version145.3058
    Codebase categoryDatabank / Filter