Not logged in
Viewing 15 posts - 1 through 15 (of 15 total)

Forums>StrategyQuant>General Discussion>Degrees of freedom(DOF) bigger is better?

  • #240174 |
    Customer
    23 Posts

    come from description of SQX help file:

    Degrees of freedom(DOF) are computed from strategy complexity and number of trades. The simpler the strategy is, the more degrees of freedom it will have. For this property, the bigger value is better.

    but why the type of DOF in weighed fitness block is minimize

    refer to the attached file

    Attachments:
    You must be logged in to view attached files.
    #240175
    Customer
    23 Posts

    Mark had said before:

    So the goal is to look for strategies with lowest possible degrees of freedom that have also smallest chance of overfitting.

     

     

    #240182
    tomas262
    Administrator
    1826 Posts

    Generally it is better to have a bigger value i.e. more degrees of freedom since it is expressed as # of trades minus number of inputs. For 100 trades and 10 inputs such strategy has 90 degress of freedom and we want more trades and less inputs

     

    #240190
    Customer
    791 Posts

    degrees of freedom computed from number of trades???

    its absolute nonsense

    i will have 2 strategies with 10 parameters, one with 500 trades, second with 1000 trades

    degrees of freedom will be 490 and 990, which strategy is better? how do i compare strategies in the meaning of you words – “we want more trades and less inputs”, doesnt make any sense

    degrees of freedom must be only number of variables in the strategy

    You want to be a profitable algotrader? We started using StrateQuant software in early 2016. For now we have a very big knowhow for building EAs for every possible types of markets. We share this knowhow, apps, tools and also all final strategies with real traders. If you want to join us, fill in the FORM. 1500+ final SQX strategies for members running on demo accounts to verify the edge DEMO ACCS. We provide also strategies for indices - DAX, DOW JONES, NASDAQ, SP, UK, because we have realtick data from our brokers.

    #257368
    Customer
    29 Posts

    Realise this is a very old thread but did want to ask a question regarding this. Reading through Rob Pardo’s book he talks about the key measure being the Remaining Percentage of Degrees of Freedom. He goes on to say that this needs to be above 90% otherwise the strategy can’t be considered reliable.

    His calculation for Rdf% has nothing to do with rules or trades – it has to do with total number datapoints / data points used within the strategy.

    @Notch – I don’t know if you frequent these forums anymore but do you use this in your filtering process? My hunch is that by keeping sample timeframe high and detailed, conditions to a minimum and no multiple 200 MAs then I should be ok here?

    @SQ – not sure if you guys want to look at this at all but I gather Pardo is a guru in this space…

    #258002
    Customer
    29 Posts

    Hi Notch – sorry for the late reply. Didn’t notice you’d responded.

    You are of course completely correct – I wrote this when I was on page 130 and Pardo’s simple example at that point only covers number of consumed datapoints.

    Anyway – think SQ picked up our conversation and amended the current calculation that was using number of trades. That was the main thing. Well that and you I being introduced :-)

    #258016
    Customer
    68 Posts

    Kevin Davey writes:
    “Having separate calculation methods for long and short entries leads to
    more degrees of freedom in the strategy.”
    He also writes about looking at the ratio of number trades vs variables, so too does

    From the documents of SQ:
    “It is in fact highly recommended for your strategy to have as little configurable parameters (degrees of freedom) as possible.”

    From wiki:
    “The number of independent ways by which a dynamic system can move, without violating any constraint imposed on it, is called number of degrees of freedom. ”

    Anyways, assuming everyone likes Pardo better, shouldn’t this stat be expressed in a percent then? If SQ recently changed it, then how exactly is it now calculated?

    #258017
    Customer
    29 Posts

    One more vote for Pardo’s Percentages.

    #258028
    Customer
    68 Posts

    Thank you for clarifying. I just meant if we like “Pardo’s way” for the degrees of freedom column then it should be showing a percent and of course the higher the better for statistical significance otherwise the column should just show number configurable variables like it did before in which case the lower the better.

    As it stands it seems to be neither hence my actual questions.

    #258030
    Customer
    68 Posts

    I should’ve just asked “Is this column supposed to show remaining degrees of freedom expressed as a percentage or is it supposed to show degrees of freedom in the strategy or is it supposed to show something else? If something else then what? And what is it showing now?” =)

    #258034
    Customer
    256 Posts

    @notch . just implementing https://towardsdatascience.com/algorithmic-trading-based-on-mean-variance-optimization-in-python-62bdf844ac5b for my periodically strategies rebalancing. will see if it works

    #258037
    Customer
    1 Posts

    @notch . just implementing https://towardsdatascience.com/algorithmic-trading-based-on-mean-variance-optimization-in-python-62bdf844ac5b for my periodically strategies rebalancing. will see if it works

     

    Nice! I have added it to my bookmarks.  it looks very interesting.

    #258053
    Customer
    29 Posts

    @notch – how come you’ve moved away from SQ? Were the strategies you developed not profitable in the longer term or they were but you believe you can do better?

    • This reply was modified 1 year, 1 month ago by gottogethelp.
    #258056
    Customer
    29 Posts

    Ok cool. Well I hope the SQ hand feeds me too

    #258961
    Mark Fric
    Administrator
    1182 Posts

    an explanation here – it is perhaps a bad name, but what we commonly refer to as Degrees of freedom – a compexity of a strategy (number of rules, conditions, parameters) is displayed as Complexity column in SQ, and the lower complexity (simpler the strategy) the better.

     

    Degrees of freedom column in SQ is computed as: numberOfTrades – complexity

    I don’t remember exactly what led me to this formula, most probably Pardo or something similar that I read:

    Pardo: page 292 – measuring degrees of freedom.

    “A degree of freedom then is said to be consumed or used by each trading rule and by every data point necessary to calculate indicators”.

    The idea was to create a metric that has some relation between number of trades and complexity of the strategy.

    We used number of trades instead of data points simply because number of bars is too big, and number of trades in backtest is a better measure of statistical significance.

    So to measure “real” degrees of freedom please use Complexity column.

    Mark
    StrategyQuant architect

Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in to reply to this topic.