[R-SIG-Finance] Anyone can help with backtesting?

Sebastian Steins sebastian.steins at gmail.com
Fri Mar 9 17:21:03 CET 2012


Anyway, what would be the way to implement such a strategy in quantstrat?

On Fri, Mar 9, 2012 at 5:13 PM, julien cuisinier
<j_cuisinier at hotmail.com> wrote:
> I do not know this package (so it could be brilliant) but I would go for
> quantstrat instead, seems more used / followed and hence less bug prone I
> guess
>
>
>
>> Date: Fri, 9 Mar 2012 15:38:02 +0100
>> From: sebastian.steins at gmail.com
>> To: r-sig-finance at r-project.org
>> Subject: [R-SIG-Finance] Anyone can help with backtesting?
>
>>
>> Hi,
>>
>> I am currently trying to think about some investment strategies which
>> I want to backtest in R. So I found this toolbox as a great tool for
>> doing so:
>> http://systematicinvestor.wordpress.com/2011/11/25/introduction-to-backtesting-library-in-the-systematic-investor-toolbox/
>>
>> However, since I am not that familiar with R and the way you create
>> the strategies in code, I am a bit confused on how to implement my
>> idea.
>>
>> The idea is the following:
>>
>> There are two basis modules of the portfolio, which should be weighted
>> about 40:60. To keep things simple at first, think of those modules as
>> of two strategies, the first one is the rotational trading strategy
>> (ranked by low volatility)[A], the second one is basically the same
>> strategy, but ranked by high performance[B].
>> After one year there should be done something specifically. At the
>> first day in any new year:
>> - if the overall profit of module A and B is greater than 0, positions
>> should be sold until the initial 4:6 ratio is reached again. The free
>> capital should then be invested in an fixed income ETF.
>> - if the overall profit of module A and B is less than 0, nothing
>> should be done.
>> - If there is any profit in the fixed income ETF, at the first day in
>> any year positions in the ETF should be closed, the free capital
>> should then be invested again in modules A, B according to their 4:6
>> weights.
>>
>> Can you give me any hints on how to implement such a thing, with the
>> toolbox mentioned above or in any other way? At the moment I do not
>> even know how to start.
>>
>>
>> Thank you for your kind support!
>>
>>
>> Sebastian
>>
>> _______________________________________________
>> 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