Ratio trading ... how to?
Author: LECG
Creation Date: 10/20/2011 11:02 AM
profile picture

LECG

#1
Sorry if this is obvious but only just starting out with Wealth-Lab. I have looked through the manuals etc, but must be missing something really obvious.

All help is greatly appreciated.

Problem.

I want to do a pair ratio trade i.e. buy 'n' of symbol1 AND simultaneously sell 'm' of symbol2.

Solution I have so far... I 'think' I know how to simultaneously buy and sell differing symbols by switching the 'context' ie.

CODE:
Please log in to see this code.


This appears to work as I want it to i.e. when I run the strategy, trades for symbol1 and symbol2 are indeed placed at the same bar and with the correct side.

But I am absolutely stumped on how to change/set the volume of the trades? What am I missing? Can anyone please explain or send me a link to an explanation.

All help and comments are most appreciated. Thanks in advance.

profile picture

Cone

#2
Positions (trades) are sized by the Position Sizing Control (see User Guide, Reference). When you need more control over sizing, then you can use programmable PosSizers. Many PosSizers for common and not-so-common sizing are included in the MS123.PosSizer Library extension.

If you can tell how the sizing differ between the pairs, then we can suggest one for you.
profile picture

Eugene

#3
QUOTE:
I want to do a pair ratio trade i.e. buy 'n' of symbol1 AND simultaneously sell 'm' of symbol2.

Title search for pair trading. It has been discussed numerous times, and a couple of ready strategies exist under Strategies and Trading:

ActiveTrader 2010-10 | Market-neutral VIX-based pair strategy
Pairs Trading
QUOTE:
But I am absolutely stumped on how to change/set the volume of the trades?

Through SetShareSize (look it up in the QuickRef) or a custom PosSizer.
profile picture

LECG

#4
Thanks Cone I think Fixed Ratio in the PosSizer library is EXACTLY what I am looking for. So will get this installed and also read through the Position Sizing as yo umentioned.

Once again thanks for this it is greatly appreciated.

profile picture

LECG

#5
Thanks Eugene SetShareSize is EXACTLY what I need. Could not see the wood for the trees. Thankyou and sorry for wasting your time.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).