Thoughts and questions from a beginner
Forums › ProRealTime English forum › ProOrder support › Thoughts and questions from a beginner
- This topic has 13 replies, 4 voices, and was last updated 4 years ago by
GraHal.
-
-
07/09/2021 at 9:46 PM #173391
Hi all. Nice to be part of this forum.
I started with trading algos some months ago and found out I have a lot of questions and thoughts. I post them here, hopefully you got good answers and input.
- What are your benchmarks of indicators as sharpe ratio and risk/reward ratio? Do you prefer other ratios or indicators? I read about AROR, is the benchmark the same as SHARP-ratio?
- How do you meassure robustnes? I think strategies having more than 70% of the parameter sets giving positive results is good, but how do I calculate this in an easy way? Can’t find a way to export the optimization results to excel or similar.
- What are your thoughts on how long you hold a position? Intraday or over several days? My thought is that holding a position for too long will result in a lot of slipage, how do you count for slipage in the backtest? Any markets or strategies that are more suitable for longer positions?
- Thoughts on diversification in portfolios? Having mean reversal-, break out- and trend following strategies (are there others?)? Different markets? Different parameter sets for a few strategies?
- What are your take on filters of different kinds? I have started with a MR strategy that I think have some potential. Do you have any good thoughts how to improve it?
Test MR 2 minutes12345678910111213141516171819202122232425262728293031323334353637383940414243// Definition of code parametersDEFPARAM CumulateOrders = False // Cumulating positions deactivated// Conditions to enter long positionsindicator1 = ExponentialAverage[EMA](close)*Buff1c1 = (close CROSSES OVER indicator1)c4 = ExponentialAverage[EMA](close)-ExponentialAverage[EMA](1)// and ExponentialAverage[100](close)>= ExponentialAverage[100](2)IF c1 THENBUY 1 CONTRACT AT MARKETENDIF// Conditions to exit long positionsindicator2 = ExponentialAverage[EMA](close)//c2 = (close CROSSES OVER indicator2)c21= (close > indicator2)c22= (close < close[1])IF c21 and c22 THENSELL AT MARKETENDIF// Conditions to enter short positionsindicator3 = ExponentialAverage[EMA](close)*Buff2c3 = (close CROSSES UNDER indicator3)IF c3 THENSELLSHORT 1 CONTRACT AT MARKETENDIF// Conditions to exit short positionsindicator4 = ExponentialAverage[EMA](close)c4 = (close CROSSES UNDER indicator4)c41 =(close < indicator2)c42 =(close > close[1])IF c41 and c42 THENEXITSHORT AT MARKETENDIF// Stops and targetsSET STOP %LOSS SLProbably I will have more questions soon.
07/09/2021 at 10:07 PM #173393Post your topic in the correct forum:
_ ProRealTime Platform Support: only platform related issues.
_ ProOrder: only strategy topics.
_ ProBuilder: only indicator topics.
_ ProScreener: only screener topics
_ General Discussion: any other topics.
_ Welcome New Members: for new forum members to introduce themselves.Thank you 🙂
I moved it from the General Discussion forum.
07/09/2021 at 10:11 PM #173394At lines 7 you are calculating the EMA of 1.
Is that intentional or is it an error?
07/09/2021 at 10:40 PM #173395Thanks. That was a line I didn’t use in this test version. Should have removed it 🙂
It should be the Exponential Mean Average of [EMA number of bars) for the previous period, to check if the trend (of [EMA] bars) was positive or negative. EMA is a parameter I optimize, ranging from 100 to 1000 with a stepsize of 100. If it’s the wrong syntax then I understand if it didn’t work as planned 🙂
07/09/2021 at 11:07 PM #173396Replace (1) with (close) and add [1] next:
1c4 = ExponentialAverage[EMA](close)-ExponentialAverage[EMA](close)[1]1 user thanked author for this post.
07/10/2021 at 9:25 AM #173399holding a position for too long will result in a lot of slipage
Slippage is when the price you buy for is not the price you wanted to buy for … if price is at 100 and put an at market order and you get filled at 101 then the 1 pence is the slippage.
You would be best to get a book on trading to get the answers to your questions. Have you read any books?
The Naked Trader comes to mind as a good overall easy read view on trading. It’s okay you can keep your clothes on, but you may want to take them off when you see Mrs Naked Trader on the front cover!! 🙂
07/10/2021 at 10:14 AM #173400I Read Kevin J Davey and Perry J Kaufmans books for beginners. Tips on good books are always welcome.
And with slippage I mean rollover and swap costs. The cost of keeping positions open for a long time.
It seems to be a lot of articles about spread and slippage in algotrading, and tools in prt to include in backtests, but I can’t find easy ways to include rollover and swap costs. And those are a lot bigger in some strategies.
07/10/2021 at 10:39 AM #173405My view on overnight costs is … to use an example, if I keep a £1 per point SB open on the DJI it will cost me about £3 in overnight costs. Easily made back with a 3 point move the next day, which is nothing compared with the Daily Range of the DJI.
If I don’t think the DJI is going to move 3 points in my favour the next day then should I be keeping trades open on the DJI at that time. The wiser move would be to close the trade (before 9pm UK time) which would only cost me 3 – 5 points anyway in spread (per £1 per point trade) and then see which way the DJI is really going the next morning and open a trade accordingly?
PS
We can add a figure to cover overnight costs in a box in the backtest engine, but I keep it simple and always use, for example a worst case figure of 5 for spread for DJI … the excess would cover overnight costs.
07/10/2021 at 12:12 PM #173410Since I started a couple of months ago I made a net gain of about 650€, of this is about 80€ rollover costs. As it is an trend following system I use, with an average position time over 1 day I guess I pay rollover most of the time. So the 3£ a day seems like the same for me. But I think over 10% in “fees” are pretty much. I use IG, I guess most prt users do.
If I compare it with my test of a mean reversal system, with a position time of about 6 hours its difficult to evaluate if a 500€ gain is a 490€ or 350€ gain. I guess the best is to always use high spread in bt to approximate for rollover, but if there is a systematic difference between rollover costs for a trend following and a mean reversal system it’s good to take this into consideration when evaluating. So maybe use 5 for trendfollowing and 4 for mean reversal systems.
07/10/2021 at 12:35 PM #173416What are your benchmarks of indicators as sharpe ratio and risk/reward ratio? Do you prefer other ratios or indicators? I read about AROR, is the benchmark the same as SHARP-ratio?
At the moment I am quite careless about those kind of measurements. I just use the basic: %Win, P/L, MaxDD…
How do you meassure robustnes? I think strategies having more than 70% of the parameter sets giving positive results is good, but how do I calculate this in an easy way? Can’t find a way to export the optimization results to excel or similar.
I have played with some ways to measure robustness (this one is quite good IMO: https://www.prorealcode.com/topic/day-month-year-strategy-robustness-tester/) but right now I have no fixed rule about it. I mostly use my knowledge/impression of the system to consider its robustness.
Your idea about the “70% positive results” is interesting but I am not sure about its implementation: a variable usually kind of have an infinite number of values, if you are chossing a rank of them you are already optimizing
What are your thoughts on how long you hold a position? Intraday or over several days? My thought is that holding a position for too long will result in a lot of slipage, how do you count for slipage in the backtest? Any markets or strategies that are more suitable for longer positions?
I am very concerned about the “broker costs” of operating (spread, slippage and overnight costs). I think most of people, as Grahal ;), aren´t but I try to minimize them as possible. For instance using limit orders and trying to do my systems intraday when possible, but the honest truth is that I don´t know if I am loosing more money that way that just going along.
In my case I am struggling with my results, in the long run kind of winnig but for a little margin and with a lot of ups and downs. Without those costs my results would be quite good for my expectations so… thats why I am very concerned about them even if I know is more of a wishfull thinking to avoid it.
Thoughts on diversification in portfolios? Having mean reversal-, break out- and trend following strategies (are there others?)? Different markets? Different parameter sets for a few strategies?
I try to diversify about type of systems and markets but I am not very concerned about that neither right now. Right now just trying to learn to make good systems whatever they are.
I will add seasonal and pattern systems to the types you mention
What are your take on filters of different kinds? I have started with a MR strategy that I think have some potential. Do you have any good thoughts how to improve it?
I tend to use the same indicators in all my systems: average, ROC, RSI, BollingerBandsWidth, ATR… Somewhere I read the most usefull indicator was BollingerBandsWidth and now I kind of agree, I use it more and more. But I don´t belive there are magic indicators, they are just tools and depending of what measurement I am lookin for I use one or another.
From your system I like that it use a signal to exit no just Stop/profit. Have you tried to optimize the entry hours, depending of the instrument you operate it can be also important to avoid high spread hours.
Good luck
1 user thanked author for this post.
07/10/2021 at 12:42 PM #173419difficult to evaluate if a 500€ gain is a 490€ or 350€ gain
Don’t get what you mean by above?
I think over 10% in “fees” are pretty much.
Isn’t £3 ish in overnight costs on 34,000 (DJI Price) = 0.01% overnight costs per night, even every night for 1 years it is only 3.65%?
07/10/2021 at 2:06 PM #173428difficult to evaluate if a 500€ gain is a 490€ or 350€ gain Don’t get what you mean by above?
I mean that if very few position is overnight, the gain would be 490€, but if all are overnight it might be as low as 350€. Big difference, but difficult to evaluate in detail.
I think over 10% in “fees” are pretty much.
Isn’t £3 ish in overnight costs on 34,000 (DJI Price) = 0.01% overnight costs per night, even every night for 1 years it is only 3.65%?
Well, if I have a gain without overnight fees of 700€ and with fees of 620€ the overnight fees are lowering my gains with about 10%? It’s a non neglectible effect I think. Could be the difference of a good system and a bad system?
But maybe the problem is the gains are to low?
07/10/2021 at 2:23 PM #173429How do you meassure robustnes? I think strategies having more than 70% of the parameter sets giving positive results is good, but how do I calculate this in an easy way? Can’t find a way to export the optimization results to excel or similar.
I have played with some ways to measure robustness (this one is quite good IMO: https://www.prorealcode.com/topic/day-month-year-strategy-robustness-tester/) but right now I have no fixed rule about it. I mostly use my knowledge/impression of the system to consider its robustness. Your idea about the “70% positive results” is interesting but I am not sure about its implementation: a variable usually kind of have an infinite number of values, if you are chossing a rank of them you are already optimizing
That was a good idea of a tester, makes you randomize your trades a little. On that topic, are there ways to backtest further back in time? I can’t find a way to for example test your system on a set of data from only 2017. Can you do it with that tester?
Regarding the “70% positive results”, I believe you need to do some assumptions and choices regarding range in advance. In my MR example I believe a range between -1.5% to +1.5% from the Mean on 2 minutes frequens is reasonable, my assumption is that bigger differences are from non frequent events that are more random. I also assume the mean should be calculated over a few hours to a day in this case. If most of the results are positive, it should mean my assumptions are ok. It’s a way to validate my assumptions I think.
I also could use a wider range, to see in what ranges the parameters could be positive? But even with this range I get less positive in the edges, so the range seems ok.
07/10/2021 at 7:40 PM #173452the overnight fees are lowering my gains with about 10%?
So for 70€ overnight fees, are you holding for 20 days ish or are you trading 10€ per point and holding for 2 days ish?
Just interested and intrigued.
difficult to evaluate in detail.
The IG statement that we get emailed every day shows any / all the fees charged (not spread).
-
AuthorPosts
Find exclusive trading pro-tools on