Description Usage Arguments Examples
Creates an object of class Strategy
with the given portfolio data and strategy-function.
1 2 3 4 5 |
assets |
Time series of class |
strat |
The name of the strategy that should be applied. This can be either a predefined strategy like MA or EWMA or a self-written function in which case the full path to the function file to be called must be supplied. |
assetValueType |
Assets can be passed as prices or log returns. In order to identify the asset value types, either one of the types has to be selected. |
weights |
The portfolio weights for the given assets as time series (dynamic) or numerical (constant) weights. |
indicators |
A list of indicators that might be used within customized strategies. It is recommended to pass a named list. |
strat.params |
The list of parameters and their values required by the strategy function selected with parameter strat. |
volume |
Portfolio volume for trading. Default value is 1 Million. |
costs.fix |
The fix trading costs per trade. |
costs.rel |
The trading costs, relative to the volume. I.e. a value of |
printSteps |
This is a feature used mainly for debugging the constructor function in order to localize where unspecified errors occur. If set to true, the different steps run within the constructor is printed to the console. |
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.