Description Arguments Value Usage Details Examples
This function will construct a portfolio of asset returns based on the time range specified or the number of 'observations' requested. The resulting time series will be based on the specified calendar, as defined by trading_dates that uses the timeDate package under the hood.
process |
The process to use |
start |
Start date |
ohlc |
Whether to include OHLC values |
volume |
Whether to include volume |
... |
Additional arguments to date generator |
An xts object with either obs rows or points in the range [start,end] and a time series for each symbol provided.
rprices(process, start=Sys.Date(), ohlc=FALSE, volume=FALSE, ...)
The main entry point is getPortfolioPrices, which generates a TxM xts object
based on the symbols provided. Prices generated by this function can be used
in risk modeling, as a substitute for brownian motion in Monte Carlo
simulations, and backtesting applications. Studying fractal generation of
time series can be accomplished more directly by calling
rfractal
.
In addition to the arguments above, it is necessary to pass the appropriate arguments to the the underlying fractal call. This includes passing in a seed and generator patterns. If none are provided predefined sets will be used, although users of this package are encouraged to create their own initiators and generators.
The trading_dates function is a utility to generate proper business days for a given calendar. This is used to be compatible with other applications that load actual asset data.
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.