Skip to content

Commit

Permalink
Fix html compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
edoaltamura committed Jun 10, 2024
1 parent 25cd223 commit f71d98f
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 20 deletions.
19 changes: 17 additions & 2 deletions qiskit_finance/data_providers/_base_data_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

"""This module implements the abstract base class for data_provider modules the finance module."""
"""This module implements the abstract base class for data provider modules in the finance module.
The module defines the :code:`BaseDataProvider` abstract class which should be inherited by any data
provider class within the finance module. It also includes the :code:`StockMarket` :code:`Enum`
representing supported stock markets.
"""

from __future__ import annotations
from abc import ABC, abstractmethod
from typing import cast
Expand All @@ -27,7 +33,16 @@


class StockMarket(Enum):
"""Enum representing various stock markets."""
""":code:`Enum` representing various stock markets.
This :code:`Enum` contains identifiers for the following stock markets,
represented by their respective codes:
* :code:`"XLON"`: The London Stock Exchange.
* :code:`"XPAR"`: The Euronext Paris.
* :code:`"XSES"`: The Singapore Exchange.
"""

LONDON: str = "XLON"
EURONEXT: str = "XPAR"
Expand Down
10 changes: 7 additions & 3 deletions qiskit_finance/data_providers/data_on_demand_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

"""NASDAQ Data on demand data provider."""

from __future__ import annotations
import datetime
from urllib.parse import urlencode
Expand Down Expand Up @@ -44,10 +46,12 @@ def __init__(
Args:
token (str): Nasdaq Data Link access token.
tickers (str | list[str] | None): Tickers for the data provider.
- If a string is provided, it can be a single ticker symbol or multiple symbols
* If a string is provided, it can be a single ticker symbol or multiple symbols
separated by semicolons or newlines.
- If a list of strings is provided, each string should be a single ticker symbol.
Default is :code:`None`.
* If a list of strings is provided, each string should be a single ticker symbol.
Default is :code:`None`, which corresponds to no tickers provided.
start (datetime.datetime): Start date of the data.
Defaults to January 1st, 2016.
end (datetime.datetime): End date of the data.
Expand Down
12 changes: 8 additions & 4 deletions qiskit_finance/data_providers/exchange_data_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" Exchange data provider. """

from __future__ import annotations
import logging
import datetime
Expand Down Expand Up @@ -47,10 +49,12 @@ def __init__(
Args:
token (str): Nasdaq Data Link access token.
tickers (str | list[str] | None): Tickers for the data provider.
- If a string is provided, it can be a single ticker symbol or multiple symbols
separated by semicolons or new-lines.
- If a list of strings is provided, each string should be a single ticker symbol.
Default is :code:`None`.
* If a string is provided, it can be a single ticker symbol or multiple symbols
separated by semicolons or newlines.
* If a list of strings is provided, each string should be a single ticker symbol.
Default is :code:`None`, which corresponds to no tickers provided.
stockmarket (StockMarket): LONDON (default), EURONEXT, or SINGAPORE
start (datetime.datetime): Start date of the data.
Defaults to January 1st, 2016.
Expand Down
10 changes: 7 additions & 3 deletions qiskit_finance/data_providers/random_data_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" Pseudo-randomly generated mock stock-market data provider """

from __future__ import annotations
import datetime
import logging
Expand All @@ -31,13 +33,15 @@ def __init__(
seed: int | None = None,
) -> None:
"""
Initialize RandomDataProvider.
Initialize an instance of pseudo-randomly generated mock stock-market data provider.
Args:
tickers (str | list[str] | None): Tickers for the data provider.
- If a string is provided, it can be a single ticker symbol or multiple symbols
* If a string is provided, it can be a single ticker symbol or multiple symbols
separated by semicolons or newlines.
- If a list of strings is provided, each string should be a single ticker symbol.
* If a list of strings is provided, each string should be a single ticker symbol.
Default is :code:`None`, using :code:`["TICKER1", "TICKER2"]` if not provided.
start (datetime.datetime): Start date of the data.
Defaults to January 1st, 2016.
Expand Down
13 changes: 8 additions & 5 deletions qiskit_finance/data_providers/wikipedia_data_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

"""Wikipedia data provider."""

from __future__ import annotations
import logging
import datetime
Expand Down Expand Up @@ -44,10 +46,12 @@ def __init__(
token (str | None): Nasdaq Data Link access token.
Default is None.
tickers (str | list[str] | None): Tickers for the data provider.
- If a string is provided, it can be a single ticker symbol or multiple symbols
* If a string is provided, it can be a single ticker symbol or multiple symbols
separated by semicolons or newlines.
- If a list of strings is provided, each string should be a single ticker symbol.
Default is None, meaning no tickers provided.
* If a list of strings is provided, each string should be a single ticker symbol.
Default is :code:`None`, which corresponds to no tickers provided.
start (datetime.datetime): Start date of the data.
Default is January 1st, 2016.
end (datetime.datetime): End date of the data.
Expand All @@ -70,8 +74,7 @@ def __init__(
def run(self) -> None:
"""
Loads data from Wikipedia using Nasdaq Data Link API.
This method retrieves stock market data from the Wikipedia dataset
Retrieves stock market data from the Wikipedia dataset
using Nasdaq Data Link API, and populates the data attribute of the
base class, enabling further calculations like similarity and covariance
matrices.
Expand Down
10 changes: 7 additions & 3 deletions qiskit_finance/data_providers/yahoo_data_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" Yahoo data provider. """

from __future__ import annotations
import datetime
import logging
Expand Down Expand Up @@ -49,10 +51,12 @@ def __init__(
Args:
tickers (str | list[str] | None): Tickers for the data provider.
- If a string is provided, it can be a single ticker symbol or multiple symbols
* If a string is provided, it can be a single ticker symbol or multiple symbols
separated by semicolons or newlines.
- If a list of strings is provided, each string should be a single ticker symbol.
Default is :code:`None`, meaning no tickers provided.
* If a list of strings is provided, each string should be a single ticker symbol.
Default is :code:`None`, which corresponds to no tickers provided.
start (datetime.datetime): Start date of the data.
Default is January 1st, 2016.
end (datetime.datetime): End date of the data.
Expand Down

0 comments on commit f71d98f

Please sign in to comment.