vizflow 0.5.10__py3-none-any.whl → 0.5.11__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
vizflow/io.py
CHANGED
|
@@ -71,14 +71,14 @@ def _scan_file(
|
|
|
71
71
|
|
|
72
72
|
Supported formats:
|
|
73
73
|
- .feather, .ipc, .arrow: IPC format (pl.scan_ipc)
|
|
74
|
-
- .csv, .meords: CSV format (pl.scan_csv)
|
|
74
|
+
- .csv, .meords, .ords: CSV format (pl.scan_csv)
|
|
75
75
|
- .parquet: Parquet format (pl.scan_parquet)
|
|
76
76
|
"""
|
|
77
77
|
suffix = str(path).lower().split(".")[-1]
|
|
78
78
|
|
|
79
79
|
if suffix in ("feather", "ipc", "arrow"):
|
|
80
80
|
return pl.scan_ipc(path)
|
|
81
|
-
elif suffix in ("csv", "meords"):
|
|
81
|
+
elif suffix in ("csv", "meords", "ords"):
|
|
82
82
|
csv_kwargs = {}
|
|
83
83
|
if schema:
|
|
84
84
|
schema_overrides = schema.get_schema_overrides()
|
|
@@ -93,7 +93,7 @@ def _scan_file(
|
|
|
93
93
|
else:
|
|
94
94
|
raise ValueError(
|
|
95
95
|
f"Unsupported file format: .{suffix}. "
|
|
96
|
-
"Supported: .feather, .ipc, .arrow, .csv, .meords, .parquet"
|
|
96
|
+
"Supported: .feather, .ipc, .arrow, .csv, .meords, .ords, .parquet"
|
|
97
97
|
)
|
|
98
98
|
|
|
99
99
|
|
vizflow/schema_evolution.py
CHANGED
|
@@ -421,26 +421,67 @@ JYAO_UNIV_V20251230 = SchemaEvolution(
|
|
|
421
421
|
|
|
422
422
|
# =============================================================================
|
|
423
423
|
# SIM Standard Format (standard column names, type conversion only)
|
|
424
|
+
# For sim output that already uses standard column names (same as YLIN rename_to)
|
|
424
425
|
# =============================================================================
|
|
425
426
|
|
|
426
427
|
SIM_STANDARD = SchemaEvolution(
|
|
427
428
|
columns={
|
|
428
|
-
#
|
|
429
|
+
# === Order columns ===
|
|
429
430
|
"ukey": ColumnSpec(parse_dtype=pl.Int64),
|
|
430
|
-
# Order info
|
|
431
431
|
"order_id": ColumnSpec(parse_dtype=pl.Int64),
|
|
432
432
|
"order_side": ColumnSpec(parse_dtype=pl.String), # "B" / "S"
|
|
433
433
|
"order_qty": ColumnSpec(parse_dtype=pl.Float64, cast_dtype=pl.Int64),
|
|
434
434
|
"order_price": ColumnSpec(parse_dtype=pl.Float64),
|
|
435
|
+
"order_price_type": ColumnSpec(parse_dtype=pl.String),
|
|
435
436
|
"order_filled_qty": ColumnSpec(parse_dtype=pl.Float64, cast_dtype=pl.Int64),
|
|
436
|
-
|
|
437
|
-
"
|
|
438
|
-
"update_exchange_ts": ColumnSpec(parse_dtype=pl.Int64),
|
|
439
|
-
# Queue position
|
|
437
|
+
"fill_price": ColumnSpec(parse_dtype=pl.Float64),
|
|
438
|
+
"order_filled_notional": ColumnSpec(parse_dtype=pl.Float64),
|
|
440
439
|
"qty_ahead": ColumnSpec(parse_dtype=pl.Float64, cast_dtype=pl.Int64),
|
|
441
440
|
"qty_behind": ColumnSpec(parse_dtype=pl.Float64, cast_dtype=pl.Int64),
|
|
442
|
-
|
|
443
|
-
"
|
|
441
|
+
"order_curr_state": ColumnSpec(parse_dtype=pl.String),
|
|
442
|
+
"order_tpos_type": ColumnSpec(parse_dtype=pl.String),
|
|
443
|
+
"event_type": ColumnSpec(parse_dtype=pl.String),
|
|
444
|
+
# === Timestamps ===
|
|
445
|
+
"create_exchange_ts": ColumnSpec(parse_dtype=pl.Int64),
|
|
446
|
+
"create_local_ts": ColumnSpec(parse_dtype=pl.Int64),
|
|
447
|
+
"update_exchange_ts": ColumnSpec(parse_dtype=pl.Int64),
|
|
448
|
+
"alpha_ts": ColumnSpec(parse_dtype=pl.Int64),
|
|
449
|
+
"timestamp": ColumnSpec(parse_dtype=pl.Int64),
|
|
450
|
+
# === Quote columns ===
|
|
451
|
+
"bid_px0": ColumnSpec(parse_dtype=pl.Float64),
|
|
452
|
+
"bid_px1": ColumnSpec(parse_dtype=pl.Float64),
|
|
453
|
+
"bid_px2": ColumnSpec(parse_dtype=pl.Float64),
|
|
454
|
+
"bid_px3": ColumnSpec(parse_dtype=pl.Float64),
|
|
455
|
+
"bid_px4": ColumnSpec(parse_dtype=pl.Float64),
|
|
456
|
+
"ask_px0": ColumnSpec(parse_dtype=pl.Float64),
|
|
457
|
+
"ask_px1": ColumnSpec(parse_dtype=pl.Float64),
|
|
458
|
+
"ask_px2": ColumnSpec(parse_dtype=pl.Float64),
|
|
459
|
+
"ask_px3": ColumnSpec(parse_dtype=pl.Float64),
|
|
460
|
+
"ask_px4": ColumnSpec(parse_dtype=pl.Float64),
|
|
461
|
+
"bid_size0": ColumnSpec(parse_dtype=pl.Float64, cast_dtype=pl.Int64),
|
|
462
|
+
"bid_size1": ColumnSpec(parse_dtype=pl.Float64, cast_dtype=pl.Int64),
|
|
463
|
+
"bid_size2": ColumnSpec(parse_dtype=pl.Float64, cast_dtype=pl.Int64),
|
|
464
|
+
"bid_size3": ColumnSpec(parse_dtype=pl.Float64, cast_dtype=pl.Int64),
|
|
465
|
+
"bid_size4": ColumnSpec(parse_dtype=pl.Float64, cast_dtype=pl.Int64),
|
|
466
|
+
"ask_size0": ColumnSpec(parse_dtype=pl.Float64, cast_dtype=pl.Int64),
|
|
467
|
+
"ask_size1": ColumnSpec(parse_dtype=pl.Float64, cast_dtype=pl.Int64),
|
|
468
|
+
"ask_size2": ColumnSpec(parse_dtype=pl.Float64, cast_dtype=pl.Int64),
|
|
469
|
+
"ask_size3": ColumnSpec(parse_dtype=pl.Float64, cast_dtype=pl.Int64),
|
|
470
|
+
"ask_size4": ColumnSpec(parse_dtype=pl.Float64, cast_dtype=pl.Int64),
|
|
471
|
+
"is_rebased": ColumnSpec(parse_dtype=pl.String),
|
|
472
|
+
"seq_num": ColumnSpec(parse_dtype=pl.Int64),
|
|
473
|
+
# === Position columns ===
|
|
474
|
+
"init_net_pos": ColumnSpec(parse_dtype=pl.Float64, cast_dtype=pl.Int64),
|
|
475
|
+
"current_net_pos": ColumnSpec(parse_dtype=pl.Float64, cast_dtype=pl.Int64),
|
|
476
|
+
"current_realized_net_pos": ColumnSpec(parse_dtype=pl.Float64, cast_dtype=pl.Int64),
|
|
477
|
+
"open_buy": ColumnSpec(parse_dtype=pl.Float64, cast_dtype=pl.Int64),
|
|
478
|
+
"open_sell": ColumnSpec(parse_dtype=pl.Float64, cast_dtype=pl.Int64),
|
|
479
|
+
"cum_buy": ColumnSpec(parse_dtype=pl.Float64, cast_dtype=pl.Int64),
|
|
480
|
+
"cum_sell": ColumnSpec(parse_dtype=pl.Float64, cast_dtype=pl.Int64),
|
|
481
|
+
"cash_flow": ColumnSpec(parse_dtype=pl.Float64),
|
|
482
|
+
"frozen_cash": ColumnSpec(parse_dtype=pl.Float64),
|
|
483
|
+
"cum_buy_filled_notional": ColumnSpec(parse_dtype=pl.Float64),
|
|
484
|
+
"cum_sell_filled_notional": ColumnSpec(parse_dtype=pl.Float64),
|
|
444
485
|
},
|
|
445
486
|
null_values=["", "NA", "null"],
|
|
446
487
|
)
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
vizflow/__init__.py,sha256=KGksMU9wGsdGSbd2OgSHM2ofMZbTwgaCN92ZDEgASwU,614
|
|
2
2
|
vizflow/config.py,sha256=nPZPXlqQbaY8u_FAdtPShvb0mdx3e2TRaQ2CILzliAU,7192
|
|
3
|
-
vizflow/io.py,sha256=
|
|
3
|
+
vizflow/io.py,sha256=keiCjPbd_ttvFA4meFPjq8DQhRnj4tR-UchBzabSyL8,11961
|
|
4
4
|
vizflow/market.py,sha256=MtNz_nnZxC66Aq-i2PXEwaFCTknijFWYZUUv6798k2s,2493
|
|
5
5
|
vizflow/ops.py,sha256=cUFeDdWfMk2hG8hpevTz_Dfnzk3fnhTI79UwMGzUkHw,10534
|
|
6
6
|
vizflow/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
-
vizflow/schema_evolution.py,sha256=
|
|
7
|
+
vizflow/schema_evolution.py,sha256=yG72U_TWV8IHgazVmQroAnB-fzdDknr6UQ4li3ZortE,20501
|
|
8
8
|
vizflow/viz.py,sha256=dzcY72hWMVbxWIyjwfUW3Ot3CunaP7O4GLVUzzOjkbY,1212
|
|
9
|
-
vizflow-0.5.
|
|
10
|
-
vizflow-0.5.
|
|
11
|
-
vizflow-0.5.
|
|
9
|
+
vizflow-0.5.11.dist-info/METADATA,sha256=8AUxNTYXsBm5MGOGjMIrL1GmhasqwTFuMrEB0bFDI08,389
|
|
10
|
+
vizflow-0.5.11.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
11
|
+
vizflow-0.5.11.dist-info/RECORD,,
|
|
File without changes
|