-
Notifications
You must be signed in to change notification settings - Fork 2
Performance
Documentation > Performance
A Performance is a hierarchical collection of Account balances describing the financial performance of an Entity over a period of time. They are generic representations of popular accounting constructs known as the 'Income Statement', 'Profit & Loss', or 'Statement of Financial Performance'.
The Peformance object is jurisdiction agnostic, and obeys simple double-entry accounting rules. They list income and expense, each nesting its own children.
You can retrieve a Performance denominated in an arbitrary Global Unit or Custom Unit. Amatino will automatically calculate the implicit gain or loss relative to each Account's underlying denomination and include those gains and losses in each Account balance.
A Performance may be retrieved to an arbitrary depth. Depth in the Performance context is the number of levels down the Account hierarchy Amatino should go when retrieving the Performance. For example, if a top-level Account has child accounts three layers deep, then specifying a depth of three will retrieve all those children.
Regardless of the depth you specify, Amatino will calculate recursive balances at full depth.
.session - Session
The Session used to initialise this Performance
.entity - Entity
The Entity to which the Accounts described by this Performance belong.
The time at which the window this Performance observes begin. Transactions before this time are excluded.
Example: datetime.datetime(2019, 1, 18, 21, 4, 43, 557821)
The time at which the window this Performance observes ends. Transactions after this time are excluded.
Example: datetime.datetime(2019, 1, 18, 21, 4, 43, 557821)
The time at which this Performance was generated by the Amatino API. Transactions and other data created after this time are excluded.
Example: datetime.datetime(2019, 1, 18, 21, 4, 43, 557821)
The integer number of recursive layers to which this Performance reaches. For example, if an Account has five layers of recursive children, and you request retrieval to a depth of 3, you will receive the first three layers and .depth will be 3.
Example: 3
.denomination - Denomination
The denominating unit of this Performance, either a GlobalUnit or a CustomUnit. Accessing the .denomination property will cause a synchronous call to the API. Successive accesses will return cached data.
The integer identifier of the GlobalUnit that denominates this Performance, or None if this Performance is denominated in a CustomUnit.
Example: 5
The integer identifier of the CustomUnit that denominates this Performance, or None if this Performance is denominated in a GlobalUnit.
Example: None
.income - List[TreeNode]
A list of TreeNode objects, each representing a top-level income Account node in the hierarchy of Accounts this Performance describes. If the Entity in question has no income accounts, this list will be empty.
Example: See TreeNode
True if this Performance has at least one income account in the .income property.
Example: True
.expenses - List[TreeNode]
A list of TreeNode objects, each representing a top-level expense Account node in the hierarchy of Accounts this Performance describes. If the Entity in question has no expense accounts, this list will be empty.
Example: See TreeNode
True if this Performance has at least one expense account in the .expenses property.
Example: False
The sum of the recursive balances of all top-level expense accounts in this Performance.
The sum of the recursive balances of all top-level income accounts in this Performance.
Return a new Performance instance.
- entity - Entity
- start_time - datetime
- end_time - datetime
- denomination - Denomination
- depth - Optional[int]
performance = Performance.retrieve(
entity=mega_corp,
start_time=(datetime.utcnow() - timedelta(days=365))
end_time=datetime.utcnow()
denomination=USD
)