[R-SIG-Finance] Adding transaction fee in bps (in quantstrat add.rule)
jan at opentrades.nl
Wed Dec 19 12:32:07 CET 2012
Check the sources for addTxn() in blotter; you will see that if TxnFees
is a function instead of a number, it will be used to calculate the txn
Just type "addTxn<enter>" in your console to see the source for addTxn,
and see ?addTxn for documentation.
On 19-12-12 04:35, Robert A'gata wrote:
> I see many examples illustrating how to add transaction fees as a fixed
> cost (per unit). I am wondering if there is any example of how to write
> customized cost function? I don't see any to my best knowledge besides
> I would like to describe cost in bps for example. In my mktdata, I always
> have current price. Therefore, my cost is (bps/10000) * price * quantity.
> Any simple example would be appreciated. Then I can go wild myself. Thank
> [[alternative HTML version deleted]]
> R-SIG-Finance at r-project.org mailing list
> -- 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.
Jan Humme - OpenTrades
Email: jan at opentrades.nl
More information about the R-SIG-Finance