Fundamentals

Fundamentals refers to the data that is fundamental for any given company. This is the actual, key financial data that is used for forecasting and analysis by the Quantamatics API.

In total, there are three Fundamentals: Calendar Periods, KPIs, and Financial Statements. Each of these are represented by their own class and can be interacted with through an Instrument.

Calendar Periods

The CalendarPeriods class allows analysis of calendar periods and quarterly reports as they relate to either instruments, KPIs, or both. Viewing an instrument’s Calendar Periods can be done through the getCalendarPeriods() method of the Instrument class, which will implicitly instantiate a CalendarPeriods object.

Parameters

instrumentID

The instrumentID is an integer value that will refer to a unique instrument. This value or a kpiID is required for creating a CalendarPeriods object.

kpiID

The kpiID is an integer value that will refer to a unique kpi. This value or an instrumentID is required for creating a CalendarPeriods object.

useReportedForCurrentQuarter

A boolean value, useReportedForCurrentQuarter. This value sets what the CalendarPeriods object considers the current quarter. If set to True, the current quarter will be the most recently reported quarter. If set to False, the current quarter will be set to the ongoing quarter whose KPIs are yet to be reported.


Methods

getPeriods()

Returns a DataFrame of all calendar periods relevant to the provided instrument and kpi ids. The data includes the start and end dates of the period, reporting dates and times, and whether a period is the current period, the previous period, or the next period. The instrumentID or kpiID will also be listed.

getPreviousPeriod()

Returns a DataFrame containing only the calendar period immediately prior to the current period. Keep in mind that the current period may change depending upon the boolean value of useReportedForCurrentQuarter.

getCurrentPeriod()

Returns a DataFrame containing only the current calendar period. Keep in mind that the current period may change depending upon the boolean value of useReportedForCurrentQuarter.

getNextPeriod()

Returns a DataFrame containing only the calendar period immediately following the current period. Keep in mind that the current period may change depending upon the boolean value of useReportedForCurrentQuarter.


KPI

The KPI object is made to represent a key performance indicator, or a measure of performance, of a given instrument. Often KPIs will be accessed implicitly through the FinancialStatement class as it’s essentially a collection of KPIs.

A KPI may be initialized in various ways, however the loadKPI() method is where the KPI is fully initialized. Within the constructor, the parameter data is simply set to the KPI object’s fields.

Parameters

instrumentID

The instrumentID is an integer value that will refer to a unique instrument. This value or a kpiID is required for loading a KPI object.

kpiID

The kpiID is an integer value that will refer to a unique kpi. This value or an instrumentID is required for loading a KPI object.

preLoad

A boolean value that dictates whether the loadKPI() method will be called as the last step of the KPIs initialization.

kpiName

A string value representing the name associated with the kpi object. Examples include “Reported Gross Profit”, “SBC”, “Current income taxes payable” etc.

kpiUOM

A string value representing the unit of measure associated with the kpi object. This will often be a simple currency such as “USD”.


Methods

loadKPI()

The loadKPI() method is where a KPI is fully loaded by making a call to the Quantamatics API via the Session object. This API call will return a DataFrame outlining the KPI’s details. The loadKPI() method will then bind the data to the KPI object’s fields.

This method may contain the kpiID, instrumentID, kpiName, and kpiUOM parameters. However, these values are optional if they were already provided within the constructor.

getKPIHistory()

The getKPIHistory() method will make a call to the Quantamatics API, providing the kpiID, valueType, and datasetName. The valueType and datasetName values may be passed as parameters but default to the String values of “Actual” and “Company KPIs” respectively.

A DataFrame outlining the History of the KPI will be returned.

getLatestEstimate()

The getLatestEstimate() method will make a call to the Quantamatics API, providing the kpiID, valueType, datasetName, and asOfDate. The valueType, datasetName, and asOfDate values may be passed as parameters but default to the String values of “Consensus Mean”, “Consensus Estimates” and today’s date respectively.

A DataFrame outlining the latest Estimates of the KPI will be returned.

getEstimateHistory()

The getEstimateHistory() method will make a call to the Quantamatics API, providing the kpiID, valueType, and datasetName. The valueType and datasetName values may be passed as parameters but default to the String values of “Consensus Mean” and “Consensus Estimates” respectively.

A DataFrame outlining the Estimate History of the KPI will be returned.

Financial Statements

Financial Statements are essentially a series of KPIs with a FinancialStatement object being associated with every instrument or panel. Financial Statements are often used to list the KPIs associated with an instrument directly through an instantiated instrument object.

Note that no parameters are required to initialize a FinancialStatement, however either a instrumentID is necessary to use either of the FinancialStatement methods.

Parameters

instrumentID

An integer value unique to any given instrument.

panelDatasetType

A string value that describes the type of data represented by the Panel. This value is set to None by default. The domain of panel dataset types can be found within settings.DatasetTypes.


Methods

getKPIs()

The getKPIs() method will make a call to the Quantamatics API using the instrumentId, panelDatasetType, and the boolean value of primaryOnly. This value may be passed as a parameter and will be set to False by default.

The returned value will be an array of KPI objects fitted to the provided parameters. Accessing the data within these KPIs can be done as with any KPI object.

getKPIList()

The getKPIList() method will make a call to the Quantamatics API using the instrumentId, panelDatasetType, the boolean value of primaryOnly and a panelName. These values may be passed as Parameters. Additionally, the financial_statement parameter may be passed to narrow the returned DataFrame to a specific area within the Financial Statement.

The returned value will be a DataFrame outlining details of all the KPIs within the FinancialStatement object of the instrument or Panel.