Module areixio.datafeeds.custom_datafeed

Classes

class CustomDataFeed (symbol: str, p: Union[str, pandas.core.frame.DataFrame], asset_type: Union[str, AssetType, ForwardRef(None)] = AssetType.SPOT, start_date: Union[str, datetime.datetime, ForwardRef(None)] = None, end_date: Union[str, datetime.datetime, ForwardRef(None)] = None, period: Optional[str] = None, min_volume: Union[int, float, ForwardRef(None)] = 1, min_notional: Union[int, float, ForwardRef(None)] = 1, order_ascending: Optional[bool] = True, exchange: Union[str, Exchange, ForwardRef(None)] = None, **kwargs)

DataFeed base class

CsvDataFeed will read all the files on your specified path

Requirement

  • csv format
  • tradedate as index
  • columns consist of 'open','high','low','close',('adj_close','lot_size','volume','dividends')

Args

paths : [list,str]
list of paths or path that contains the data files
start_date : [datetime, str], optional
The start date (if it is str, the format need to be '%Y-%m-%d'). Defaults to None.
end_date : [datetime, str], optional
The end date (if it is str, the format need to be '%Y-%m-%d'). Defaults to None.
period : [str], optional
The period. Defaults to None.
order_ascending : bool, optional
If True, data would be in ascending order. Defaults to True.

Ancestors

  • areixio.datafeed.DataFeed
  • abc.ABC

Instance variables

var fetch_data : Tuple[Dict, List]

The fucntion to start fetching data

Returns

[dict]
The dict of instrument bar data