Info log fsp output for now

bar_select
Tyler Goodlet 2020-09-01 13:24:08 -04:00
parent f1b72dfd6b
commit 0e513599eb
1 changed files with 4 additions and 18 deletions

View File

@ -82,7 +82,7 @@ async def pull_and_process(
filter_by_sym(symbol, stream),
bars,
):
print(f"{fsp_func_name}: {processed}")
log.info(f"{fsp_func_name}: {processed}")
yield processed
@ -105,27 +105,13 @@ async def latency(
async for quote in source:
ts = quote.get('broker_ts')
if ts:
print(
f"broker time: {quote['broker_ts']}"
f"brokerd time: {quote['brokerd_ts']}"
)
# This is codified in the per-broker normalization layer
# TODO: Add more measure points and diffs for full system
# stack tracing.
value = quote['brokerd_ts'] - quote['broker_ts']
yield value
async def last(
source: 'TickStream[Dict[str, float]]',
ohlcv: np.ndarray
) -> AsyncIterator[np.ndarray]:
"""Compute High-Low midpoint value.
"""
# deliver historical processed data first
yield ohlcv['close']
async for quote in source:
yield quote['close']
async def wma(
source, #: AsyncStream[np.ndarray],
ohlcv: np.ndarray, # price time-frame "aware"