Hello guys/gals,
i m glad i have joined this site, and i would like to join this discussion. Please, forgive me for gramma mistakes, as English is not my native language.
I ve' been following this thread with great curiosity,especially since i develop/reserch a system that is also based on similar time frame( i might introduce it, once i have enough data), so please allow me to express my opinion.
First of all, tnx to Bob, who shared his system, and thnx to all who contributed.
I am going to talk about optimizing a system, and introducing a possible results in future trading. This would be rather general observation, not necessarily connected to current system , but all the systems may suffer from it. I 've recently finished reading book : " Quantitative trading" by Ernest Chan, which i found very inspiring, for both quantitative trading as well as some fundamental understanding for system evaluation and optimization. Anyway, i recommend reading it.
What Ernest discuss is the issue known as " data snoping bias" . Data snoping bias is introducing to much parametres ( indicators, rules...etc.) into a system, thus making it ''fit into history''. This issue is very important, because our future trading may greatly differ from our backtest, making our strategy worthless. I ll rephrase what once Denis Richard said: If your system is not profitable in its robust form, than you are in big trouble. Then Ernest is suggesting, that we should remove as much parametres from strategy and do the backtesting : " In your live trading, try to eliminate as many rules and as many parameters
in your strategy as possible. If the backtest performance completely fell apart after this exercise, chances are you do have this bias and it is time to look for a new strategy. If the backtest
performance is still reasonable, your poor live trading performance may just be due to bad luck."
The second issue, Ernst has been disscusing, is reffered to what he calls '' representativeness bias" :
" After a big loss, traders—even quantitative traders—tend to immediately modify certain parameters of their strategies so that they would have avoided the big loss if they were to trade this modified system. But, of course, this is unwise because this modification may invite some other big loss that is yet to happen, or it may have eliminated many profit opportunities that existed "
I have brought this to intention since i see that people are introducing more and more parametres to this strategy( and others as well). If the creator of this strategy already stated that he is 80% correct, i really dont know why would u need any more parametres? However, being correct 80% of the time, does not neceserally earn you money. And those swing traders know what i am talking about.
What i would like to discuss, is leverage. Again, Ernst Chan suggested using quantitive reserch (return, exess return, variance, Stdv, skewness...) and Kelly formula as the base for setting optimal leverage.
Also, i see people using basket to trade this system. Basket trading is actualy a portfolio selection, and we might be interested in modern portfolio selection (Markowitz Harry)
http://en.wikipedia.org/wiki/Modern_portfolio_theory .
Instead of adding more rules, i bealive we should focus on quantitative analysis ?
P.S
i apologize for this long reply
Quantitative analysis
-
Armen
Re: 10.2 forum
Hello markot,
As far as I recall from my finance classes Markowitz theory was about portfolio of stocks with certain amount of risk (beta) and associated expected return. In other words, correlation b/w individual assets could be 0. All depends on measure of asset sensitivity to a movement in the overall market described in CAP model.
Whereas, in forex it is dependent to USD, EUR and JPY which are the most traded currency taking up to 85%, 39% and about 20% of all transactions respectively. More over, in order to implement this theory in Forex there should be an efficient frontier with no risk-free asset to be construct.
May be I am missing something but how are you going to implement this in forex market.
Franky, I have no idea.
As far as I recall from my finance classes Markowitz theory was about portfolio of stocks with certain amount of risk (beta) and associated expected return. In other words, correlation b/w individual assets could be 0. All depends on measure of asset sensitivity to a movement in the overall market described in CAP model.
Whereas, in forex it is dependent to USD, EUR and JPY which are the most traded currency taking up to 85%, 39% and about 20% of all transactions respectively. More over, in order to implement this theory in Forex there should be an efficient frontier with no risk-free asset to be construct.
May be I am missing something but how are you going to implement this in forex market.
Franky, I have no idea.
- markot
- Trader
- Posts: 10
- Joined: Tue May 22, 2012 12:36 pm
Re: 10.2 forum
Hi Armen ,
i never said i m the smartest guy known
However, in my opinion, it would be good to introduce quantitative analysis in order to improve system performance, and as well as to optimize the weight of the portfolio( basket ) ... i gave few ideas
lets se what we allcan do 
i never said i m the smartest guy known
However, in my opinion, it would be good to introduce quantitative analysis in order to improve system performance, and as well as to optimize the weight of the portfolio( basket ) ... i gave few ideas
-
garyfritz
Re: 10.2 forum
That's my thought too, Armen. I'm not sure how you apply Markowitz selection here.
markot, I 100% agree with your comments about excessive parameters &etc, and especially about representativeness bias. The Empty4 community has evolved a disdain for backtesting because the Empty4 backtester is so worthless, so they place all their faith in forward-testing. Well forward-testing is just "backtesting in realtime," with all of the weaknesses of backtesting, plus it's unreasonably slow and it's nearly impossible to test a variety of configurations. People make decisions based on running a single configuration of an EA for a few weeks, and that leads directly to Chen's representativeness bias.
The only way (I think) to ensure your strategy is valid and stable, and that you have not overfit it to history, is to do a full robust Walk-Forward Analysis. Tune on a time window in history (the "in-sample" window), then see how those tunings behave as you "walk forward" and trade it in the period (the "out-of-sample" window) right after the IS window. Then move the IS window forward, tune again, test the next OOS window, rinse and repeat.
If your strategy holds up well in the OOS windows, you can be pretty confident you have not overfitted to history. The OOS windows are exactly analogous to the way you would trade in realtime.
You still run the risk that you developed the logic of your strategy based on market behavior in your test window. E.g. a US stock system developed between 1985 and 2000 would have said "buy anything, buy everything, but especially buy high-tech and dot-coms." That wouldn't have worked quite as well between 2000 and 2003. So you want to make sure your OOS windows cover a wide range of market behaviors.
This approach requires a good reliable backtester. Unfortunately we don't have one in Empty4-world.
markot, I 100% agree with your comments about excessive parameters &etc, and especially about representativeness bias. The Empty4 community has evolved a disdain for backtesting because the Empty4 backtester is so worthless, so they place all their faith in forward-testing. Well forward-testing is just "backtesting in realtime," with all of the weaknesses of backtesting, plus it's unreasonably slow and it's nearly impossible to test a variety of configurations. People make decisions based on running a single configuration of an EA for a few weeks, and that leads directly to Chen's representativeness bias.
The only way (I think) to ensure your strategy is valid and stable, and that you have not overfit it to history, is to do a full robust Walk-Forward Analysis. Tune on a time window in history (the "in-sample" window), then see how those tunings behave as you "walk forward" and trade it in the period (the "out-of-sample" window) right after the IS window. Then move the IS window forward, tune again, test the next OOS window, rinse and repeat.
If your strategy holds up well in the OOS windows, you can be pretty confident you have not overfitted to history. The OOS windows are exactly analogous to the way you would trade in realtime.
You still run the risk that you developed the logic of your strategy based on market behavior in your test window. E.g. a US stock system developed between 1985 and 2000 would have said "buy anything, buy everything, but especially buy high-tech and dot-coms." That wouldn't have worked quite as well between 2000 and 2003. So you want to make sure your OOS windows cover a wide range of market behaviors.
This approach requires a good reliable backtester. Unfortunately we don't have one in Empty4-world.
You do not have the required permissions to view the files attached to this post.
-
Armen
Re: 10.2 forum
Hi Gary, my thought was for organizing a statistically correct way of analysis. You have brilliantly described one approach to quantitative analysis - changing at the time one endogenous parameter with respond to exogenous factors. This is what I am trying to convince.garyfritz wrote:
This approach requires a good reliable backtester. Unfortunately we don't have one in Empty4-world.
Moreover, I am sure the vast majority of this forum participants have higher education in different disciplines.
Therefore, I believe we are able to adequately formulate quantitative analysis task and proceed with testing it statistically (since we have a lot of data on hand) and dynamically (forward testing).
For this purpose I may suggest to form a group of traders who are interested in the subject.
Then, formulate the task and break it into compound parts for analysis and testing.
Can we?
-
garyfritz
Quantitative analysis
I moved these posts over from the "10.2 forum" topic, since it's not really related to 10.2 specifically.
- markot
- Trader
- Posts: 10
- Joined: Tue May 22, 2012 12:36 pm
Re: Quantitative analysis
i have found this, step by step implementing Markowitz portfolio selection :
http://economistatlarge.com/portfolio-theory
Of course, it is for stocks, but i am wondering can we apply same rules in search for currency portfolio.
the portfolio selection sayes, that individual risk can be reduced by introducing balanced weight in portfolio, as long as individual pairs are not 100% correlated.
Here u can find correlation for currency pairs : http://www.forexticket.co.uk
My idea is if we can choose optimal currency pairs to trade, according to our strategy, and according to risk- reward.
If we have "mechanical rules" for entry and exit, we may be able to backtest ,lets say 20 currency pairs( not necesserily trading them all). Lets assume we are day traders, and instead of calculating monthly return, we may calculate daily returns ( for the last 3-6 month). If we apply same steps, mentioned in link above, we may get diversified portfolio from our 20 pairs. This portfolio will provide us with the best (accoding to Markowitz) risk-reward pairs to trade.
The returns should be updated daily( if we are daytrader), or weekly , or monthly ..it really depends on how much do we hold opened our position / strategy.
What i try to understand, it is almost impossible to follow 30 currency pairs during trading session. It is far more hard to follow performance of our strategy for the selected time in history. And always there is same question, did we choose best pairs to trade ?
If the rules and leverage are the same for each currency pair, we may get result of which currency pairs/ basket are performing best according to our strategy .
What do u think ??
http://economistatlarge.com/portfolio-theory
Of course, it is for stocks, but i am wondering can we apply same rules in search for currency portfolio.
the portfolio selection sayes, that individual risk can be reduced by introducing balanced weight in portfolio, as long as individual pairs are not 100% correlated.
Here u can find correlation for currency pairs : http://www.forexticket.co.uk
My idea is if we can choose optimal currency pairs to trade, according to our strategy, and according to risk- reward.
If we have "mechanical rules" for entry and exit, we may be able to backtest ,lets say 20 currency pairs( not necesserily trading them all). Lets assume we are day traders, and instead of calculating monthly return, we may calculate daily returns ( for the last 3-6 month). If we apply same steps, mentioned in link above, we may get diversified portfolio from our 20 pairs. This portfolio will provide us with the best (accoding to Markowitz) risk-reward pairs to trade.
The returns should be updated daily( if we are daytrader), or weekly , or monthly ..it really depends on how much do we hold opened our position / strategy.
What i try to understand, it is almost impossible to follow 30 currency pairs during trading session. It is far more hard to follow performance of our strategy for the selected time in history. And always there is same question, did we choose best pairs to trade ?
If the rules and leverage are the same for each currency pair, we may get result of which currency pairs/ basket are performing best according to our strategy .
What do u think ??
-
garyfritz
Re: Quantitative analysis
I am no MPT expert, but I think Markowitz analysis is probably overkill for FX. Given the high degrees of correlation among many pairs, and the questionable validity of MPT itself, it just doesn't seem like a productive area of research.
However I do something slightly similar. I do the mechanical backtesting you mention, and then I calculate Kelly values on the result. I use that to weight the positions I trade. That doesn't address the correlation between pairs, but it says "let's trade what works."
However I do something slightly similar. I do the mechanical backtesting you mention, and then I calculate Kelly values on the result. I use that to weight the positions I trade. That doesn't address the correlation between pairs, but it says "let's trade what works."
- markot
- Trader
- Posts: 10
- Joined: Tue May 22, 2012 12:36 pm
Re: Quantitative analysis
Also, i m not MPT expert
, but i would like to reserch how to choose best basket to trade, according to return/risk of strategy in that period. The Kellly formula is great, but it is for individual pair. It says, giving the return/risk, what leverage u should apply. However, if u trade more pairs, your overal risk ( basket risk) is not neceseraly lower. I do agree that high correlation would be an issue, but if is under 100% , would it we worth ?
- markot
- Trader
- Posts: 10
- Joined: Tue May 22, 2012 12:36 pm
Re: 10.2 forum
This is very interesting. In his book , Chan adress this problem as ''regime shifts''.garyfritz wrote:
You still run the risk that you developed the logic of your strategy based on market behavior in your test window. E.g. a US stock system developed between 1985 and 2000 would have said "buy anything, buy everything, but especially buy high-tech and dot-coms." That wouldn't have worked quite as well between 2000 and 2003. So you want to make sure your OOS windows cover a wide range of market behaviors.
This approach requires a good reliable backtester. Unfortunately we don't have one in Empty4-world.
"Regime shifts refer to the situation when the financial market structure or the macroeconomic environment undergoes a drastic change so much so that trading strategies that were profitable before may not be profitable now''.
For some strategies this increased volatility can be regime shift, for some others a change in financial rules / law - hedging for instance..etc. Anyway, one should try to find what is the general benefit of trading his/her strategy. If that changes, then it is maybe time to find new strategy.