Stock Bot

apps
by Bkper

Bkper Stock Bot

A Bkper Bot that automatically manages inventory instruments across Financial Books by maintaining synchronized quantities and calculating realized results in a dedicated Stock Book.

Stock Bot

Overview

The Stock Bot monitors transactions in Financial Books and automatically tracks quantities of traded instruments in a separate Stock Book. Key features include:

Configuration

To configure the Bkper Stock Bot, ensure the following setup:

Collection:

Base Book (optional):

Properties Interactions:

The Stock Bot interacts with various properties to manage and synchronize data effectively. Ensure these properties are correctly set in your books for optimal performance.

Book Properties:

Group Properties:

Account Properties:

Transaction Properties:

Observations: Neither cost_base nor cost_hist_base properties are necessary if there is no Base Book defined in the collection.

Realized Results Service

The Stock Bot uses the FIFO (First-In, First-Out) method to calculate realized results, ensuring accurate tracking of gains and losses.

Key Features:

Important: The Stock Bot automatically adds properties to transactions in the Instruments Book when calculating realized results. These properties are used for state and log control. It also manages trade states by checking/unchecking transactions (see Transaction States). These properties and states must not be manually altered.

Forward Date Service

To close a period and set a closing date for the Stock Book, instruments must be carried forward to the next period by setting a Forward Date in the Instruments Book.

Each unprocessed transaction will have its date, price, and exchange rate updated to the current valuation, while retaining a log of its previous state. Once the last instrument is forwarded, a closing date is set on the Stock Book one day before the Forward Date.

After forwarding, future FIFO calculations will use the new Forward valuation. To calculate gains/losses solely on a historical basis, ensure the stock_historical property is set to true in the Instruments Book.

Important: The Stock Bot automatically adds properties to transactions in the Instruments Book during the forwarding process. These properties are used for state and log control and must not be manually altered.

navigate_before
Back
navigate_next
Website