qiskit.finance.data_providers.BaseDataProvider¶
-
class
BaseDataProvider
[source]¶ The abstract base class for data_provider modules within Qiskit’s finance module.
To create add-on data_provider module subclass the BaseDataProvider class in this module. Doing so requires that the required driver interface is implemented.
To use the subclasses, please see https://github.com/Qiskit/qiskit-tutorials/blob/master/tutorials/finance/11_time_series.ipynb
Methods
__init__
()Initialize self.
Returns random coordinates for visualisation purposes.
Returns the covariance matrix.
Returns a vector containing the mean value of each asset.
Returns a vector containing the mean value of each asset.
Returns a vector containing the mean value of each asset.
Returns time-series similarity matrix computed using dynamic time warping.
run
()Loads data.
-
get_coordinates
()[source]¶ Returns random coordinates for visualisation purposes.
- Return type
Tuple
[ndarray
,ndarray
]
-
get_covariance_matrix
()[source]¶ Returns the covariance matrix.
- Return type
ndarray
- Returns
an asset-to-asset covariance matrix.
- Raises
QiskitFinanceError – no data loaded
-
get_mean_vector
()[source]¶ Returns a vector containing the mean value of each asset.
- Return type
ndarray
- Returns
a per-asset mean vector.
- Raises
QiskitFinanceError – no data loaded
-
get_period_return_covariance_matrix
()[source]¶ Returns a vector containing the mean value of each asset.
- Return type
ndarray
- Returns
a per-asset mean vector.
- Raises
QiskitFinanceError – no data loaded
-
get_period_return_mean_vector
()[source]¶ Returns a vector containing the mean value of each asset.
- Return type
ndarray
- Returns
a per-asset mean vector.
- Raises
QiskitFinanceError – no data loaded
-
get_similarity_matrix
()[source]¶ Returns time-series similarity matrix computed using dynamic time warping.
- Return type
ndarray
- Returns
an asset-to-asset similarity matrix.
- Raises
QiskitFinanceError – no data loaded
-