def __init__(self, wrapper: ArrayWrapper, records_arr: tp.RecordArray, ts: tp.Optional[tp.ArrayLike] = None, **kwargs) -> None: Records.__init__(self, wrapper, records_arr, ts=ts, **kwargs) self._ts = ts
def __init__(self, wrapper: ArrayWrapper, records_arr: tp.RecordArray, close: tp.Optional[tp.ArrayLike] = None, **kwargs) -> None: Records.__init__(self, wrapper, records_arr, close=close, **kwargs) self._close = close
def __init__(self, wrapper, records_arr, close, idx_field='exit_idx', trade_type=TradeType.Trade, **kwargs): Records.__init__(self, wrapper, records_arr, idx_field=idx_field, close=close, trade_type=trade_type, **kwargs) self._close = broadcast_to(close, wrapper.dummy(group_by=False)) self._trade_type = trade_type if trade_type == TradeType.Trade: if not all(field in records_arr.dtype.names for field in trade_dt.names): raise TypeError("Records array must match trade_dt") else: if not all(field in records_arr.dtype.names for field in position_dt.names): raise TypeError("Records array must match position_dt")
def __init__(self, wrapper, records_arr, idx_field='idx', **kwargs): Records.__init__(self, wrapper, records_arr, idx_field=idx_field, **kwargs) if not all(field in records_arr.dtype.names for field in log_dt.names): raise TypeError("Records array must match debug_info_dt")
def __init__(self, wrapper, records_arr, close, idx_field='idx', **kwargs): Records.__init__(self, wrapper, records_arr, idx_field=idx_field, close=close, **kwargs) self._close = broadcast_to(close, wrapper.dummy(group_by=False)) if not all(field in records_arr.dtype.names for field in order_dt.names): raise TypeError("Records array must match order_dt")
def __init__(self, records_arr, ts, freq=None, idx_field='end_idx'): Records.__init__(self, records_arr, ArrayWrapper.from_obj(ts, freq=freq), idx_field=idx_field) PandasIndexer.__init__(self, _indexing_func) if not all(field in records_arr.dtype.names for field in drawdown_dt.names): raise ValueError( "Records array must have all fields defined in drawdown_dt") self.ts = ts
def __init__(self, wrapper, records_arr, ts, idx_field='end_idx', **kwargs): Records.__init__( self, wrapper, records_arr, idx_field=idx_field, ts=ts, **kwargs ) self._ts = ts if not all(field in records_arr.dtype.names for field in drawdown_dt.names): raise TypeError("Records array must match drawdown_dt")
def __init__(self, records_arr, main_price, freq=None, idx_field='idx'): Records.__init__(self, records_arr, ArrayWrapper.from_obj(main_price, freq=freq), idx_field=idx_field) PandasIndexer.__init__(self, _indexing_func) if not all(field in records_arr.dtype.names for field in order_dt.names): raise ValueError( "Records array must have all fields defined in order_dt") self.main_price = main_price
def __init__(self, wrapper, records_arr, ts, idx_field='end_idx'): Records.__init__(self, wrapper, records_arr, idx_field=idx_field) Configured.__init__(self, wrapper=wrapper, records_arr=records_arr, ts=ts, idx_field=idx_field) self._ts = ts if not all(field in records_arr.dtype.names for field in drawdown_dt.names): raise ValueError( "Records array must have all fields defined in drawdown_dt") PandasIndexer.__init__(self, _indexing_func)
def __init__(self, wrapper, records_arr, close, idx_field='exit_idx'): Records.__init__(self, wrapper, records_arr, idx_field=idx_field) Configured.__init__(self, wrapper=wrapper, records_arr=records_arr, close=close, idx_field=idx_field) self.close = close if not all(field in records_arr.dtype.names for field in event_dt.names): raise ValueError( "Records array must have all fields defined in event_dt") PandasIndexer.__init__(self, _indexing_func)
def __init__(self, wrapper: ArrayWrapper, records_arr: tp.RecordArray, ts: tp.ArrayLike, idx_field: str = 'end_idx', **kwargs) -> None: Records.__init__(self, wrapper, records_arr, idx_field=idx_field, ts=ts, **kwargs) self._ts = broadcast_to(ts, wrapper.dummy(group_by=False)) if not all(field in records_arr.dtype.names for field in drawdown_dt.names): raise TypeError("Records array must match drawdown_dt")