instrument: Instrument(s)/Asset(s) object generator

Description Value Super classes Methods Author(s)

Description

Asset manager.

Value

Object of type instrument

Super classes

ims::portfolio -> ims::account -> instrument

Methods

Public methods

Inherited methods

Method new()

Object initializer. This function will be automatically called when we initialize object.

Usage
instrument$new(owner)
Arguments
owner:

The name of the owner of the instrument

Returns

NA


Method add_instrument()

Adding instrument(s) as our asset once we buy them.

Usage
instrument$add_instrument(
  account_id,
  portfolio_symbol,
  open_price,
  value,
  order_id,
  user_name,
  platform
)
Arguments
account_id:

The account_id of the owner

portfolio_symbol:

The symbol of portfolio (pair) that we are collected as asset(s)/instrument(s)

open_price:

The price when we buy the asset(s)/instrument(s)

value:

How many we buy the asset(s)/instrument(s)

order_id:

The id registered when we buy the instrument(s)

Returns

Object of type instrument


Method print()

Method to print out our instrument class specifically

Usage
instrument$print()
Returns

String to print information about the owner of the instruments


Method clone()

The objects of this class are cloneable with this method.

Usage
instrument$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Author(s)

Suberlin Sinaga @2021


blakcjack/ims documentation built on Dec. 19, 2021, 9:52 a.m.