Generate fake stock data for use in rtsplot examples
rtsplot.fake.stock.data(
n,
y0 = 10,
stdev = 0.1,
ohlc = FALSE,
method = c("normal", "adhoc"),
period = c("day", "minute"),
remove.non.trading = FALSE
)
xts
object with fake stock data
number of points to generate
starting price, defaults to 10
standard deviation, defaults to 0.1
generate ohlc data, defaults to FALSE
method to generate fake stock data, defaults to 'normal' two methods are implemented: * 'normal' - generate fake stock data assuming returns are normally distributed with zero drift * 'uniform' - generate fake stock data assuming returns are uniformly distributed with zero drift
frequency to generate fake stock data, (possible values: "day", "minute"), defaults to "day"
flag to remove non trading periods(i.e. weekends and non-trading hours). Note, this flag likely will cause function return less than 'n' observation, defaults to FALSE