ZTR Money Management and Algo Optimization …
Forums › ProRealTime English forum › ProOrder support › ZTR Money Management and Algo Optimization …
- This topic has 16 replies, 5 voices, and was last updated 7 years ago by Nicolas.
-
-
03/08/2017 at 10:27 AM #27715
Hi Everyone,
On this thread we will discuss ONLY on Algo Optimization with Money Management that I love, because I think is the better way to Optimize an Algo
It continues and collect what I post before and share with you my ideas and my experience on it
We will, and I will post here all good or bad ideas to implement a code and optimize it
I will code my and potentially your ideas to see if it brings something, or not
It’s not my thread but our thread, so, don’t hesitate to post your idea, even the more crazyiest…
Cheers
Zilliq
https://www.zilliqtradingresearch.fr/
Coding is not a crime 😉
03/08/2017 at 10:32 AM #27716To resume some ideas/things :
1/ It doesn’t seems to be interesting to pyramid the Take profit (the result of the code was less good, than without)
Probably because the strengh of Optimization is Position sizing, and when we pyramid TP we loose some positions
2 / Martingale Trading Works ! BUT only on high % winning trade. If not we go directly in the Wall …
To be continued…
03/08/2017 at 10:35 AM #27718I think that to judge if the Algo is good or not, we need some Criterias
For me a Good Algo must have
1 / >70 % Winning trades
2/ < 25 % Max drawdown
3 / VQN >2
If your have some others criterias ….
1 user thanked author for this post.
03/08/2017 at 5:02 PM #27785Hi – Thanks for starting this thread. Hopefully it gives a nice guide for people to refer to once we get some consensus around what is the perceived “standard”.
Re the judgement of results – Yes, I agree on the 25% max draw. I am a bit flexible on the winning % as I think it can be between 50-75% as a high gain/loss ratio offsets that to a certain degree, but would depend upon the overall results and strategy. That said, the VQN number and a minimum hurdle score for that like you have stated of 2 should address that to a large extent. Other parameters I would personally also look for are :
1)Maximum consecutive losses – ideally around 3-7. Since if you are risking on average 1-3% per trade you are likely to incur a draw of upto 20% worst case which still leaves you breathing room for a recovery based on your backtesting without wiping you out substantially.
2)Loss of worst trade – should be reasonable and less than the profit of the best trade. Shows if you are taking on more risk than you originally thought. Hard to put a number on it as it depends upon strategy but again no more than 5% seems reasonable.
3) Average time in mkt – Is a mark of how efficient your strategy is when entering and exiting and the accuracy of its timing. Also warns of hidden cost of capital costs eg. if it takes 2 weeks to make 0.2%, your profits will be eroded rapidly by financing costs. You want to be ideally around 10% but below 20% ie equivalent of being in the market continuously for 1 full day out of every 5 trading days.
4) Distribution of profits and losses – Unfortunately PRT at the moment does not provide a histogram of these as it would be useful to see if your results have a few large trades on either side that skew the overall number. A good strategy should have a fairly even normal distribution of results which would increase confidence in the overall system. Until we have a easy way of doing this (we can do it manually in excel) we have to “eyeball” the Abs Perf column in the backtest to make sure there is nothing weird going on. You can also look at the daily results graph chart for a quick evaluation but of course that may not be accurate if you have multiple trades on the same day so it’s not ideal.
5) Consistency of results – I would want to see the Quarterly results histogram on the backtest and look for a fairly even performance without too many large peaks and troughs. Monthly/weekly chart has too much noise and Yearly masks issues if there any. You would expect some bad periods as every system has them but overall (esp if you have a long term system) you should place a higher value on low volatility than you do on bigger profits. This would also suggest that the system is robust enough to cope in most types of market.
Please note that it is not my belief that every system has to comply with all the “nice to haves” above. There are perfectly good systems that don’t necessarily fit all of the above but work just as well, it’s a overall judgement call based on a lot of factors. Other thoughts to follow…..
03/08/2017 at 6:39 PM #27805I’m agree with you,
Just a comment : For the time in the market it depends if you have a swing or intraday strategy
You can have 40 % of the time in the market but if you cut at the end of the day it’s not the same problem 😉
That’s why I see, but don’t use this information
Another comment : I think VQN is the nearer information for distribution of results. I hope PRT will add it in the future instead I calculate every time (Time consuming …), in the results AND in the Walk Forward optimization (just another column)
Bye
03/08/2017 at 7:16 PM #2781203/09/2017 at 10:04 AM #27926Hi,
A little thing, but very important
When you code your algo:
1/ Put all indicators at the beginning and once only ! And in the code, just put indicator1, indicator2 and so on …
By default PRT can put 4 times the same indicator with same variables …
2/ Do not use this fuck… CALL function.
And you will see your optimization, notably with Walk Forward will be faster 😉
See U
03/09/2017 at 1:31 PM #2794603/09/2017 at 3:43 PM #27953Hi Grahal,
Max drawdown, is max drawdown (You have many informations on the net). You have it on the results after on optimization. This is the maximum loss/drawdown during the optimization. If yur capital+profit=10000 euros. With a Max DD you can’t lose more than 2500 euros
For the VQN (I was drunk …), sorry it’s SQN of Van Tharp
http://www.vantharp.com/tharp-concepts.asp#SQN
It’s a very interesting concept who estimate the distribution of the Gain. I find it’s a most have indicator
https://trading-journal-spreadsheet.com/faqs/sqn-created-by-van-k-tharp/
2 is the strict minimum to estimate a good/low distribution of price
It’s so useful I hope PRT we had it on the panel of results in a future version
Van Tharp is a most have to read for all Algo optimizer
If you have a Max DD<25 %, SQN>2, a winning strategy …You can have an intersting strategy
For The Walk Forward optimization we continue to work on it, but I have some ideas I need to confirm
See U
1 user thanked author for this post.
03/09/2017 at 7:54 PM #27974FYI, and I already talked about it in some other threads, PRT is currently working on a whole new data engine for faster executions. I had a talk this week with a dev who told me that CALL function should be thousands times faster than now. It opens great potential because we’ll could use CALL to make external re-usable functions instead of copy/paste many times the same code for instance. Don’t ask me about ETA, I dunno.
03/10/2017 at 11:08 AM #28066With the new Walk Forward possibility and Optimization (Not perfect but a real improvment of PRT), we will consider the strategy pass the test IF :
1/ Total profit >0
2/ Walk-Forward Efficiency >= 50% for more than 50 % of tests/periods
3/ No individual time period contributed 50%+ of total net profit
4/ Maximum drawdown did not exceed 25 % during any single run
If the strategy pass the test, it can be test in live 🙂
03/10/2017 at 5:42 PM #28198For Algo Optimization remember
1/ Stoploss : Save your life
2/ The target who can be fixed at the beginning : Make your Gain
AND the Trailing Stop who can save your life (see picture) AND can be a target. Personnaly I love it
See U
03/14/2017 at 10:01 AM #28482Hi,
I think that Position sizing is one of the key in Algo Optimization (But dangerous as fire if you don’t no how to use it)
Last days we spoke about Alembert Martingale
I will test one idea that will be better than the “classic” Alembert martingale +1/-1
For me Alembert can be used ONLY in high % winning/losing strategy = At less 80 %
Check on (or do a code who calculate), the number of successive losing trade : Here 2
And we want to have the possibility to double the number of position size until the max depending on your capital+profit =maxpositionsize
And when you have a first winning trade, restore this number of add position to 0
The number of add position when you have a winning trade is always 0 (not -1)
The purpose is to be ‘flat” on position (not profit) after the first winning trade (after the losing)
For example on my picture : First losing trade we add +2, second losing +4. We know this the max successive losing trade
i will check this
Zilliq
Ps: Not a lot of comments and ideas…May it doesn’t interest you ?
03/14/2017 at 2:51 PM #28522Been thinking about this but never done it
say you have a trendfollowing/breakout strategy with maybe 35-45% winning trades
when trending few big winning trades and when in range/consolidating many small losing trades
Then when i have say 2 or 3 loss trades in a row i could start adding to the position, to catch the big winner when trending again
if starting with 1 then add 1 for every new loss (to the max loss in a row in backtest?)
and when winning go back to 1
But as always
The market can stay irrational longer than you can stay solvent
03/14/2017 at 3:21 PM #28524to catch the big winner when trending again
It would mean that we already know in which direction the next trend will be?
-
AuthorPosts
Find exclusive trading pro-tools on