Description Usage Arguments Details Value Examples
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | NOT IMPLEMENTED YET
Perform Realization from using the R CRAN package quantmod functions
of modeling. This is real world actual testing (of Prediction).
This is a re-implementation of the R CRAN package
quantmod function tradModel. It uses the R CRAN package
PerformanceAnalytics function Return.portfolio to do the heavy work.
Several PerformanceAnalytics exported functions replace out
some or part of quantmod non-exported functions
tradeModel, modelReturn, allReturns, periodReturn, and stripModelData.
This function subtracts off many features from the R CRAN package
quantmod function tradeModel.
Simulated trading of fitted quantmod object.
Given a fitted model, tradeModel calculates the signal generated
over a given historical period, then applies specified
trade.rule to calculate a return.
|
1 2 3 4 5 6 7 | tradeModel(
x,
signal.threshold = c(0, 0),
trade.dates = NULL,
exclude.training = TRUE,
...
)
|
x |
quantmod object (from buildModel). Required. |
signal.threshold |
Numeric vector. Default is c(0, 0). A numeric vector describing simple lower and upper thresholds before trade occurs. |
trade.dates |
Default is NULL. Specific trade interval - defaults to the full dataset. This can be a vector of pairs. This can be a list of vectors of pairs. |
exclude.training |
Logical. Default is TRUE. Exclude the period trained on? |
... |
Dots pass to additional parameters needed by the underlying modeling function, if any. |
1 2 3 4 5 6 7 8 9 | Apply a newly constructed model from buildModel to a new dataset
to investigate the model's trading potential.
At present all parameters are very basic. The near term changes
include allowing for a trade.rule argument to allow for a
dynamic trade rule given a set of signals.
Additional the application of variable leverage and costs
will become part of the final structure.
|
A quantmodResults object. The realizations.
1 2 3 4 | ## Not run:
tradeModel(specmodel)@returns
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.