[R-SIG-Finance] quantstrat - problems with ordersize function
G See
gsee000 at gmail.com
Wed Apr 4 17:28:44 CEST 2012
The pair_trade demo broke in revision 982. We're aware of it and (and
working on it?).
Until it's fixed, you can checkout an older revision (981 or earlier)
and the pair_trade demo will hopefully work as advertised..
Best,
Garrett
On Wed, Apr 4, 2012 at 10:16 AM, Andreas Mikkelsen
<andreas.mikkelsen at stud.hibo.no> wrote:
> Hi everyone,
>
> I am currently writing my master thesis in finance . The scope of the thesis
> is to backtest on historical data whether the pairs trading strategy is
> profitable or not.
>
> I have a couple of questions regarding the pairs trading demo script in the
> quantstrat package. I managed to run it without any mishap, but as far as I
> can see, there are at no time a long / short leg in the transactions. I.e.
> [1] "2009-03-03 SPY 1e+06 @ 67.1509470105226"
> [1] "2009-03-09 SPY 1e+06 @ 65.2725988423961"
> [1] "2009-03-03 DIA 1e+06 @ 63.717805901226"
> [1] "2009-03-09 DIA 1e+06 @ 62.0397741136174"
>
> >From what I can understand it goes long at the same time on both stocks?
> Which would not equal a pairs trading strategy. In the summary page of
> blotter I could not find a single date with entries on both the long and
> short. Has any one else experienced this?
>
> Further on I have tried to adjust the script from the package to our needs
> with a fellow student and our prof. What we can’t seem to figure out is how
> to adjust the orderqty with osFUN.
> What we are trying to do is to make every order a fixed amount with equal
> dollar amount on either leg whenever the trade signal is activated.
> Attached is our efforts so far.
> http://r.789695.n4.nabble.com/file/n4532216/Quantstrat_PairTrade11.R
> Quantstrat_PairTrade11.R
> Best regards,
> Andreas Mikkelsen
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/quantstrat-problems-with-ordersize-function-tp4532216p4532216.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.
More information about the R-SIG-Finance
mailing list