Skip to content
Back to formatted view

Raw Message

Message-ID: <AANLkTim1hpNUwB4OXgd4vMrKNGqt6xpQ6AzsPG+W6+vU@mail.gmail.com>
Date: 2010-11-30T04:03:55Z
From: David Kane
Subject: How to backtest in R
In-Reply-To: <AANLkTimnDiUueoc-0anJYwj75TXWYiaFwN26r-i-MzBp@mail.gmail.com>

You could start with the backtest package:

http://cran.r-project.org/web/packages/backtest/index.html

But there are many other possible approaches . . .

Dave Kane

On Mon, Nov 29, 2010 at 10:58 PM, Aaditya Nanduri
<aaditya.nanduri at gmail.com> wrote:
> Hello All,
>
> This is a rather general question about backtesting : How is it done?
> (People of my age would usually write "lol" immediately after that question)
>
> My current situation (Im a beginner at this):
>
> I'm working on a variation of the TAA strategy that was written by Mr. Faber
> and while its simple enough, I have no idea how to backtest.
>
> This is what I think is backtesting:
> ?- Must be a walk-forward (or decisions must only be based on events already
> happened)
> ?- Must return a set of entry points and exit points
> ?- Must take some initial amount of money and provide PL of each open/close
> and a running PL
> ?- Overall percentage increase during holding period (monthly, in my case)
> ?- Volatility (SD of price-movement or SD of percentage change in each
> month?)
> ?- Sharpe
>
>
> Is this usually done in a function? a loop? provided in a package? (I looked
> at backtest but I have no idea what that does. Im still reading up on it)
>
> I know this is a lot to ask but can anyone show me an example?
>
> I sincerely appreciate all the help anyone provides.
>
>
> --
> Aaditya Nanduri
> aaditya.nanduri at gmail.com
>
> ? ? ? ?[[alternative HTML version deleted]]
>
> _______________________________________________
> 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.
>