Deviazione standard equity

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #33734 quote
    gabriele
    Participant
    New

    Salve a tutti,

    volevo sapere se esiste un modo, dopo aver effettuato un backtest su un qualunque trading system, di calcolare la deviazione standard dell’equity risultante dal backtest.

    Grazie in anticipo a chi mi vorrà dare una mano.

    #34557 quote
    Nicolas
    Keymaster
    Master

    Questo tipo di codice dovrebbe fare il trucco, ma apparentemente la piattaforma non calcola correttamente la deviazione standard…

    DEFPARAM CumulateOrders = False
    
    // LONG
    IF (time = 120000 and close > open and close[1] > open[1] and close[2] > open[2]) THEN
    BUY 1 CONTRACTS AT MARKET
    SET STOP pLoss 300
    SET TARGET pPROFIT 450
    trade=trade+1
    ENDIF
    
    // SHORT
    IF (time = 160000 and close < open and close[1] < open[1] and close[2] < open[2]) THEN
    SELLSHORT 1 CONTRACTS AT MARKET
    SET STOP pLoss 300
    SET TARGET pPROFIT 450
    trade=trade+1
    ENDIF
    
    //floating profit
    floatingprofit = (((close-positionprice)*pointvalue)*countofposition)/pipsize //actual trade gains
    equitycurve=strategyprofit+floatingprofit
    graph equitycurve
    graph std[trade](equitycurve)
    #34575 quote
    gabriele
    Participant
    New

    Grazie mille! In che senso la piattaforma non calcola correttamente la deviazione standard, dici che restituisce dei valori sbagliati ?

    Poi volevo chiederti, a cosa serve la variabile trade che hai inserito nel codice ?

    #34587 quote
    Nicolas
    Keymaster
    Master

    questo è calcolare la deviazione standard con la quantità di trade e non con il tempo RICHIESTO flussi, se durante un periodo di tempo lungo senza fine, il calcolo della deviazione standard sarebbe errato.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Deviazione standard equity


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
gabriele @gabriele Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by Nicolas
8 years, 9 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 04/27/2017
Status: Active
Attachments: No files
Logo Logo
Loading...