Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.
Important

IBM Quantum Platform is moving and this version will be sunset on July 1. To get started on the new platform, read the migration guide.

WikipediaDataProvider

class WikipediaDataProvider(token=None, tickers=None, stockmarket=StockMarket.NASDAQ, start=datetime.datetime(2016, 1, 1, 0, 0), end=datetime.datetime(2016, 1, 30, 0, 0))

GitHub

Wikipedia data provider.

Please see: https://github.com/Qiskit/qiskit-tutorials/blob/stable/0.14.x/qiskit/advanced/aqua/finance/data_providers/time_series.ipynb for instructions on use.

Initializer :type token: Optional[str] :param token: quandl access token, which is not needed, strictly speaking :type tickers: Union[str, List[str], None] :param tickers: tickers :type stockmarket: StockMarket :param stockmarket: NASDAQ, NYSE :type start: <module ‘datetime’ from ‘/usr/lib/python3.7/datetime.py’> :param start: start time :type end: <module ‘datetime’ from ‘/usr/lib/python3.7/datetime.py’> :param end: end time

Raises

QiskitFinanceError – provider doesn’t support stock market input


Methods

get_coordinates

WikipediaDataProvider.get_coordinates()

Returns random coordinates for visualisation purposes.

get_covariance_matrix

WikipediaDataProvider.get_covariance_matrix()

Returns the covariance matrix.

Returns

an asset-to-asset covariance matrix.

Return type

numpy.ndarray

Raises

QiskitFinanceError – no data loaded

get_mean_vector

WikipediaDataProvider.get_mean_vector()

Returns a vector containing the mean value of each asset.

Returns

a per-asset mean vector.

Return type

numpy.ndarray

Raises

QiskitFinanceError – no data loaded

get_period_return_covariance_matrix

WikipediaDataProvider.get_period_return_covariance_matrix()

Returns a vector containing the mean value of each asset.

Returns

a per-asset mean vector.

Return type

numpy.ndarray

Raises

QiskitFinanceError – no data loaded

get_period_return_mean_vector

WikipediaDataProvider.get_period_return_mean_vector()

Returns a vector containing the mean value of each asset.

Returns

a per-asset mean vector.

Return type

numpy.ndarray

Raises

QiskitFinanceError – no data loaded

get_similarity_matrix

WikipediaDataProvider.get_similarity_matrix()

Returns time-series similarity matrix computed using dynamic time warping.

Returns

an asset-to-asset similarity matrix.

Return type

numpy.ndarray

Raises

QiskitFinanceError – no data loaded

run

WikipediaDataProvider.run()

Loads data, thus enabling get_similarity_matrix and get_covariance_matrix methods in the base class.

Was this page helpful?
Report a bug or request content on GitHub.