Bar

class entities.bar.Bar(raw)

Bases: lumibot.tools.helpers.ComparaisonMixin

The Bar class represents a single bar (OHLC) of data.

timestamp

The timestamp of the bar.

Type

datetime.datetime

open

The opening price of the bar.

Type

float

high

The high price of the bar.

Type

float

low

The low price of the bar.

Type

float

close

The closing price of the bar.

Type

float

volume

The volume of the bar.

Type

float

dividend

The dividend amount of the bar.

Type

float

stock_splits

The stock splits amount of the bar.

Type

float

update(data)

Updates the bar with the given data.

COMPARAISON_PROP = 'timestamp'
DEFAULT_PYTZ = <DstTzInfo 'America/New_York' LMT-1 day, 19:04:00 STD>
DEFAULT_TIMEZONE = 'America/New_York'
property close
property datetime
property dividend
classmethod get_empty_bar()

Return an empty bar object

Returns

Return type

Bar

property high
property low
property open
property raw
property stock_splits
property timestamp

Return the timestamp of the bar

update(data)
property volume