Reply

Degrees of freedom(DOF) bigger is better?

14 replies

samuel

Customer, bbp_participant, community, 0 replies.

Visit profile

5 years ago #240174

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.

0

samuel

Customer, bbp_participant, community, 0 replies.

Visit profile

5 years ago #240175

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.

 

 

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

5 years ago #240182

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

 

0

hankeys

Customer, bbp_participant, community, sq-ultimate, 487 replies.

Visit profile

5 years ago #240190

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 2014. 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.

0

gottogethelp

Customer, bbp_participant, 30 replies.

Visit profile

4 years ago #257368

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…

0

gottogethelp

Customer, bbp_participant, 30 replies.

Visit profile

3 years ago #258002

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 🙂

0

bentra

Customer, bbp_participant, community, sq-ultimate, 22 replies.

Visit profile

3 years ago #258016

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?

May all your fits be loose.


https://www.darwinex.com/darwin/SUG.4.2/

0

gottogethelp

Customer, bbp_participant, 30 replies.

Visit profile

3 years ago #258017

One more vote for Pardo’s Percentages.

0

bentra

Customer, bbp_participant, community, sq-ultimate, 22 replies.

Visit profile

3 years ago #258028

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.

May all your fits be loose.


https://www.darwinex.com/darwin/SUG.4.2/

0

bentra

Customer, bbp_participant, community, sq-ultimate, 22 replies.

Visit profile

3 years ago #258030

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?” =)

May all your fits be loose.


https://www.darwinex.com/darwin/SUG.4.2/

0

clonex / Ivan Hudec

Customer, bbp_participant, community, sq-ultimate, contributor, author, editor, 271 replies.

Visit profile

3 years ago #258034

@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

0

fa

Customer, bbp_participant, community, 1 replies.

Visit profile

3 years ago #258037

@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.

0

gottogethelp

Customer, bbp_participant, 30 replies.

Visit profile

3 years ago #258053

@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?

0

gottogethelp

Customer, bbp_participant, 30 replies.

Visit profile

3 years ago #258056

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

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

3 years ago #258961

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

1

Viewing 14 replies - 1 through 14 (of 14 total)