sim_algo: A simulated stock option trading algorithm

View source: R/algos.R

sim_algoR Documentation

A simulated stock option trading algorithm

Description

Will maintain or initialize a stock option trading algorithm, (for now only on) the simulation environment

Usage

sim_algo(
  token,
  live = FALSE,
  reset = FALSE,
  new_balance = 1e+06,
  exchange_id = "EUREX",
  asset_type = "StockOption"
)

Arguments

token

either a character or a token2.0 reference class (RC) object as returned by httr::oauth2.0_token(). Sim environment uses character, (a '24 hour token'); live environment a token object.

live

boolean, TRUE for live environment, i.e. real money. Defaults to FALSE, i.e. simulation environment.

reset

boolean, TRUE if simulation account should be reset. Defaults to FALSE.

new_balance

numeric, balance for simulation account, if reset

exchange_id

character, the Exchange to search, e.g. "EUREX", the default, for Eurex Exchange

asset_type

character, type of asset, e.g. "Stock" or "StockOption", the default.

Value

tibble with ids of placed orders, if any


lassehjorthmadsen/sherwood documentation built on Sept. 6, 2022, 3:47 p.m.