This project is archived
Qiskit Finance is no longer maintained and this documentation is no longer updated. It is kept online for reference only, and the code it describes may not work with current versions of Qiskit. See the project repository for more information.
DataOnDemandProvider#
- class DataOnDemandProvider(token, tickers, start=datetime.datetime(2016, 1, 1, 0, 0), end=datetime.datetime(2016, 1, 30, 0, 0), verify=None)[source]#
Bases:
BaseDataProviderNASDAQ Data on Demand data provider.
Please see: https://qiskit-community.github.io/qiskit-finance/tutorials/11_time_series.html for instructions on use, which involve obtaining a NASDAQ DOD access token.
- Parameters:
token (str) – data on demand access token
start (datetime) – first data point
end (datetime) – last data point precedes this date
verify (str | bool | None) – if verify is None, certify certificates will be used (default); if this is False, no certificates will be checked; if this is a string, it should be pointing to a certificate for the HTTPS connection to NASDAQ (dataondemand.nasdaq.com), either in the form of a CA_BUNDLE file or a directory wherein to look.
Methods
- get_coordinates()#
Returns random coordinates for visualisation purposes.
- get_covariance_matrix()#
Returns the covariance matrix.
- Returns:
an asset-to-asset covariance matrix.
- Raises:
QiskitFinanceError – no data loaded
- Return type:
- get_mean_vector()#
Returns a vector containing the mean value of each asset.
- Returns:
a per-asset mean vector.
- Raises:
QiskitFinanceError – no data loaded
- Return type:
- get_period_return_covariance_matrix()#
Returns a vector containing the mean value of each asset.
- Returns:
a per-asset mean vector.
- Raises:
QiskitFinanceError – no data loaded
- Return type:
- get_period_return_mean_vector()#
Returns a vector containing the mean value of each asset.
- Returns:
a per-asset mean vector.
- Raises:
QiskitFinanceError – no data loaded
- Return type:
- get_similarity_matrix()#
Returns time-series similarity matrix computed using dynamic time warping.
- Returns:
an asset-to-asset similarity matrix.
- Raises:
QiskitFinanceError – no data loaded
- Return type: