This function allows user to analyze signals independently from rules.
apply.paramset.signal.analysis(strategy.st, paramset.label, portfolio.st,
sigcol, sigval, on, forward.days, cum.sum = TRUE,
include.day.of.signal, obj.fun, decreasing = TRUE, mktdata = NULL,
verbose = TRUE)
an object of type 'strategy' to add the indicator to
a label uniquely identifying the paramset within the strategy
text name of the portfolio to associate the order book with
column name to check for signal
signal value to match against
the periods endpoints to find as a character string
days to exit post signal
whether to use cumsum on price changes
whether to include the day of signal generation
objective function for determining goodness of each paramset
if TRUE
(the default), larger objective function values are better
market data
whether to output processing messages
A list of objects that contains the results
List of signals named by parameter combination. Each object within the list is a XTS object with columns being assets and rows being signals.
List of list. Sorted by parameter combination and then by asset. Contains matrix of next day returns; columns are period (N day look ahead) and rows are signals
List of list. Sorted by Asset and then by parameter combinations. Contains same matrix as sigret.by.paramset
List of signal statistics as calculated via custom user defined fitness function. Sorted by assets.
This function is similar to applyParameter
but includes additionally applySignal
wrapped within it. To use it, the user
will need to initially define the distribution and constraints by using add.distribution
and add.distribution.constraint
.
More generally, the function is designed to generate signals across various parameter combinations defined within the distribution and constraints. Afterwards it extract the next N day price changes for further anlaysis.
The parameter on
allows user to calculate post signal returns in different frequencies. Different signals have different timeframes effectiveness.
forward.days
lets the user select the number of post signal days to analyze results.
To determine the goodness of a parameter set relative to all others, we let the user specify their own objective function (via parameter obj.func
)
that will be used to calculate an objective value representing each parameter. These will then be sorted from best to worst. The
objective function will take in a single matrix ret.mat
of price changes. Each row represents an individual signal
while each column represents periods/post signal.