Quote from amitkumar_ny:
I really really want to understand this. Can you explain more. I am obviously little slow for this discussion.
thanks
OK Let me explain:
There are few approaches how to trade pairs. The most popular one (also the one we use at pairtradinglab) works with ratio between two stock prices together with two technical indicators applied on the ratio time series - moving average and standard deviation (you could also look at it as on the one indicator - bollinger bands, which is the same anyway). For these indicators you need parameters - period (how many days to look back).
So for pair trading strategy, you have at least two parameters:
1) moving average period (in days) - lets call it MP now
2) standard deviation period (in days) - lets call it SP now
In the end you have even more parameters (thresholds, ...) but I won't comment on them now, although everything said below applies on them too.
Then, in order to trade pairs successfully we have to make decisions:
1) which pairs to trade, how to judge pairs
2) what MP/SP combination to use a parameters to the strategy
Looks simple but actually this is a big magic.
About how to judge pair - we can do backtest and see if result is good enough - but then we still have problem: we need to select MP/SP also for this backtest! how to do it? we have quite a risk here - the whole pair may be crap, but just by luck, the backtest can be good for particular MP/SP tried...but if we were trading this pair in future, it would most likely turned to be a loser...because we built our assumption on something what was not really robust enough
How we can help ourselves with this?
We will not evaluate a pair just by a single backtest. Instead, we will perform backtests for large number of MP/SP combinations and observe, how results behave for those. We can then probably expect, that if the stock pair behaves well for ALL the parameter combinations instead of just one, we should have much more chance the pair will hold up in future trading, right?
So thats what basically study in pairtradinglab does.
It will perform backtests for all MPs in range 10..50 and SPs in range 10..50. So in total it will perform 1681 backtests, one for each period combination.
Then it will display for each result the CAGR and Max Drawdown of the backtest in the scatter plot, color determined by the period.
So in the scatter plot you can instantly see, how the stock pair behaves for ALL period parameters! You can instantly tell, if the pair is crap (it haves a lot of points in CAGR range below zero), or good - haves all points above zero in CAGR and good dd for all points.
So finally, the study feature helps solve both problems:
1) check if the stock pair is good/robust - good and robust pairs will indicate >=99% points above zero in CAGR and indicate good drawdown for them too
2) choose optimization parameters MP,SP - for instance, I would advise to take some big cluster of points having good CAGR and low DD and take the middle point of the cluster
I hope it is more clear now.