Dear Brian,

Thanks for the prompt reply. Unfortunatelly both approaches you suggested
were also ineffective. A peek via getPortfolio('faber') shows all
transaction fees set to zero.

Cheers,

Andre

On Sun, Sep 12, 2010 at 12:28 AM, Brian G. Peterson <brian@braverock.com>wrote:

> On Sat, 11 Sep 2010 23:44:09 +0200, Andre Barroso
> <andre.barroso@gmail.com>
> wrote:
> > Dear all,
> >
> > I  tried to change the Faber demo from quantstrat to include transaction
> > fees but without success. The original rule is:
> >
> > stratFaber <- add.rule(stratFaber, name='ruleSignal',arguments =
> > list(sigcol="Cl.gt.SMA", sigval=TRUE, orderqty=1000,ordertype='market',
> > orderside='long', pricemethod='market'), type='enter',path.dep=TRUE)
> >
> > my idea was just to include TxnFees as an argument, but this was
> > ineffective:
> >
> > stratFaber <- add.rule(stratFaber, name='ruleSignal',arguments =
> > list(sigcol="Cl.gt.SMA", sigval=TRUE, orderqty=1000,ordertype='market',
> > orderside='long', pricemethod='market'),TxnFees=-5,
> > type='enter',path.dep=TRUE)
> >
> > Any ideas of how this work?
>
> I'm not at a machine that has quantstrat installed right this moment to
> test it, but I believe that you should be able to put TxnFees into the
> arguments=list(...) for ruleSignal.  if that doesn't work, try adding it as
>
>
> parameters=list(TxnFees=-5)
>
> The relevant code files, I think, are traderules.R and orders.R  The
> function ruleOrderProc (and its documentation) might say more about the
> precise method of calling addTxn.
>
> I suppose it's possible we're not passing dots correctly somewhere, but I
> hope one of my suggestions works. Let us know if/which one works.
>
> Otherwise, I'll test tomorrow or Monday.
>
> Regards,
>
>   - Brian
>
> --
> Brian G. Peterson
> http://braverock.com/brian/
> Ph: 773-459-4973cat ruleSi
> IM: bgpbraverock
>

	[[alternative HTML version deleted]]

