Learn R Programming

pinbasic (version 0.2.0)

simulateBS: Simulate trading data

Description

Simulates a matrix consisting of synthetic data for daily buys and sells

Usage

simulateBS(param = NULL, seed = NULL, ndays = 60)

Arguments

param
numeric: (named) vector of model parameters (valid names: 'alpha', 'delta', 'epsilon_b', 'epsilon_s', 'mu'), length must equal 5
seed
interpretted as integer: setting seed for RNG, defaults to NULL; for more detail see set.seed
ndays
integer: Number of trading days for which aggregated buys and sells are simulated, defaults to 60

Value

numeric: Matrix with ndays rows and two columns which are named 'Buys' and 'Sells'.

Details

If names are not set for param or one or more of the vector names do not match the valid choices, they are internally set to 'alpha', 'delta', 'epsilon_b', 'epsilon_s', 'mu' (in this order).