This is a convenience function for studying the generated time series by the fragtalrock package. Given a time series of prices, plotReturns will plot both the original time series of prices and the returns series. This is a useful visual aid in determining the utility of the simulated time series.
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 getTradingDates that uses the timeDate package under the hood.
Simulating stock market prices and returns can be accomplished using a number of techniques. Most commonly, geometric brownian motion (aka a random walk) is used to simulate stock prices. Using this technique results in a normal distribution of price returns. As an alternative technique, it is possible to generate price series using fractals. The advantage is that price returns tend to have volatility that clusters, similar to actual returns.
fractal
(Package: fractalrock) :
Create time series based on fractal generators
The fractal function generates a time series of points using basic principles of fractal patterns. Fractal generation can be used to simulate a time series of asset prices, which has been shown to better reflect the distribution of returns than using a Gaussian random walk. Any number of points can be generated based on specifying the total count or by running over a number of epochs. The range of the data is defined by the given seed for the generation plus the available patterns.