[R-SIG-Finance] Quantstrat pair trade

G See gsee000 at gmail.com
Mon May 9 23:27:35 CEST 2011


Soren,

Thank you, that does appear to work.  However, I think I have gotten a much
cleaner version working.  The attached version also uses a hedge ratio equal
to the ratio of the two stock prices instead of trading them 1 to 1.

How does it look?  Thanks again for taking an interest!

Garrett

On Mon, May 9, 2011 at 4:09 PM, soren wilkening <me at censix.com> wrote:

> Hi Garrett
>
> I managed to get your example to run smoothly. Have a look to see if it
> still does what you wanted it to do. If not, you only need to re-adapt the
> indicator (sigCrossing) or the rule definition slighlty. (too tired to
> check
> myself now)
>
> Cheers
>
> Soren
>
> http://r.789695.n4.nabble.com/file/n3510338/quantstrat_pair_trade_-_FIX01-somehowfunctional2.r
> quantstrat_pair_trade_-_FIX01-somehowfunctional2.r
>
> -----
> http://censix.com
> --
> View this message in context:
> http://r.789695.n4.nabble.com/Quantstrat-pair-trade-tp3506390p3510338.html
> Sent from the Rmetrics mailing list archive at Nabble.com.
>
> _______________________________________________
> R-SIG-Finance at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions
> should go.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20110509/3909662a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: quantstrat_pair_trade_5b.r
Type: application/octet-stream
Size: 8652 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20110509/3909662a/attachment.obj>


More information about the R-SIG-Finance mailing list