FeesInOut
Strategy Elements
Description
Specifies deposits and/or withdarawals to/from the current equity of a strategy by formula
Input
Formula expression returning an amount in dollars
Notes
This formula is evaluated once per day at the beginning of the day, before any trading signals are processed.
The resulting amount is added to the equity of the strategy.
The formula should return a positive value for deposits or a negative value for withdrawals, or 0 on dates when neither occurs.
The simplest way to use this formula in a multi-strategy system is to give it its own strategy, as in the examples below.
To provide a list of specific dates and amounts, use FeesList rather than FeesInOut.
Unlike CashInOut, FeesInOut are included in all the stats calculations of a backtest, such as the annual return, max drawdown, and daily net percent gain or loss.
Examples
Pay $120/month to your broker for realtime data services:
FeesInOut: if(EndOfMonth, -120, 0)
See also the management_fees.rts example script.
|