Single.
import_returns
(path: str, *, is_price: bool = False, log_return: bool = True, date_format: str = '%Y-%m-%d')¶Import returns from a csv file to the Single Class parameters. Once imported, the returns are shared among all Single instances.
path (str) – Path to the returns’ csv file
is_price (bool, optional) – Specify if the file contains price (True) or returns (False), by default False. If set at True, the function will convert prices to returns.
log_return (bool, optional) – Specify if returns must be computed as log returns (True) or percentage change (False), by default True. Only used if `is_price`is set to True.
date_format (str, optional) – Format of the date provided in the csv file, by default “%Y-%m-%d”. Refer to datetime standard library for more details date_format: https://docs.python.org/2/library/datetime.html#strftime-strptime-behavior