Pair / Spread trading in portfolio trader .......  [SOLVED]

Questions about MultiCharts and user contributed studies.
aconnery
Posts: 32
Joined: 21 Apr 2013
Has thanked: 9 times
Been thanked: 4 times

Pair / Spread trading in portfolio trader .......

Postby aconnery » 30 Apr 2015

I'm looking to backtest a number of equity pairs in Portfolio Trader. I have looked on the Wiki page but am unclear how to do this.

There are 2 strategies 'Master' and 'slave'. If anyone has any idea what this is all about, an explanation would be greatly appreciated.

I already collect my own spread data as custom symbols which I import into MC, so I do not need to redefine the ratio as in the example.

I would simply like to take the signals using this custom data and trade one additional set of data long and the other short. As I have my own custom symbols, this would mean I would have to have 3 sets of data downloaded in portfolio trader i.e. the stock to go long, the stock to go short (data2) and the custom symbol (Data3) which determines the timing of the trades.

I currently Backtest the custom symbol spread data using the following entry / exit signal ......
If Pos1=1 then buy ("S4 Ent")IntPortion(PSize/c) shares this bar on close; If Pos1=-1 then sell ("S4x") from entry ("S4 Ent") currentcontracts shares this bar on close;
{PSize is an input}

Instead of trading the spread data which creates the risk of ratio slippage, I would like to simply trade both components separately and simultaneously.

Would appreciate any simple examples of how to use this new function in portfolio trader. Thanks.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Pair / Spread trading in portfolio trader .......

Postby Henry MultiСharts » 01 May 2015

Hello aconnery,

You can find detailed description of how the prebuilt Portfolio Trader Example Strategies work at this page:
https://www.multicharts.com/trading-sof ... y_Examples

Please refer to the Portfolio Trader documentation and strategy examples to learn how to use the new features and keywords:
https://www.multicharts.com/trading-sof ... lio_Trader
Portfolio Money Management Keywords:
https://www.multicharts.com/trading-sof ... M_Keywords

aconnery
Posts: 32
Joined: 21 Apr 2013
Has thanked: 9 times
Been thanked: 4 times

Re: Pair / Spread trading in portfolio trader .......

Postby aconnery » 17 May 2015

If anyone has any basic spread / pairs strategy that has generated signals in Portfolio Trader, I would be very interested to see the basic process.
I have read the Wiki page and, although there are 2 strategies in MC9 (Master and Slave), there is nothing that explains the process. I have no idea what the settings should be in PortfolioTrader and there is very little which explains how the new 'pmm' reserved words work.
I have tried to run the standard strategies against a small portfolio but just get 'error' messages saying 'specified slave trader on instrument xxxxx' not found.
It's great to have the ability to trade pairs, but at this stage I have not had any success trying to execute a back test.
Thanks in adavance.

aconnery
Posts: 32
Joined: 21 Apr 2013
Has thanked: 9 times
Been thanked: 4 times

Re: Pair / Spread trading in portfolio trader .......  [SOLVED]

Postby aconnery » 21 May 2015

Thanks Henry for the information. For any users who would like to test pairs, I have posted a picture of how the set up should look in Portfolio Trader.
Attachments
Pair_strategy.GIF
(79.81 KiB) Downloaded 1321 times

GiuseppeM
Posts: 20
Joined: 21 Jul 2015
Has thanked: 2 times
Been thanked: 1 time

Re: Pair / Spread trading in portfolio trader .......

Postby GiuseppeM » 21 Jul 2015

does the second symbol (6AM4) has to be 1 second resolution regardless the resolution of the first symbol in order to obtain the best approximation of synchronicity?

I have tried the code of the example with both instrument at the same resolution (for example 15 min data each) and very often the signal are not sent at the same time nor the position are synchronized instantly via the sharing value of "MPMoney" variable.


Return to “MultiCharts”