vizflow 0.5.10__py3-none-any.whl → 0.5.12__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,45 @@ 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
|
+
# Note: Quote columns (bid_px0, ask_px0, etc.) come from alpha merge
|
|
451
|
+
# === Position columns ===
|
|
452
|
+
"init_net_pos": ColumnSpec(parse_dtype=pl.Float64, cast_dtype=pl.Int64),
|
|
453
|
+
"current_net_pos": ColumnSpec(parse_dtype=pl.Float64, cast_dtype=pl.Int64),
|
|
454
|
+
"current_realized_net_pos": ColumnSpec(parse_dtype=pl.Float64, cast_dtype=pl.Int64),
|
|
455
|
+
"open_buy": ColumnSpec(parse_dtype=pl.Float64, cast_dtype=pl.Int64),
|
|
456
|
+
"open_sell": ColumnSpec(parse_dtype=pl.Float64, cast_dtype=pl.Int64),
|
|
457
|
+
"cum_buy": ColumnSpec(parse_dtype=pl.Float64, cast_dtype=pl.Int64),
|
|
458
|
+
"cum_sell": ColumnSpec(parse_dtype=pl.Float64, cast_dtype=pl.Int64),
|
|
459
|
+
"cash_flow": ColumnSpec(parse_dtype=pl.Float64),
|
|
460
|
+
"frozen_cash": ColumnSpec(parse_dtype=pl.Float64),
|
|
461
|
+
"cum_buy_filled_notional": ColumnSpec(parse_dtype=pl.Float64),
|
|
462
|
+
"cum_sell_filled_notional": ColumnSpec(parse_dtype=pl.Float64),
|
|
444
463
|
},
|
|
445
464
|
null_values=["", "NA", "null"],
|
|
446
465
|
)
|
|
@@ -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=GfIgFU28N8DIEIk0DZiK3l1nA86vHwzVhyVa7k_ojyM,19106
|
|
8
8
|
vizflow/viz.py,sha256=dzcY72hWMVbxWIyjwfUW3Ot3CunaP7O4GLVUzzOjkbY,1212
|
|
9
|
-
vizflow-0.5.
|
|
10
|
-
vizflow-0.5.
|
|
11
|
-
vizflow-0.5.
|
|
9
|
+
vizflow-0.5.12.dist-info/METADATA,sha256=MKZifPp4GVNJsvSy7zvBt_1qPUrsj8BfIphMiTV3PXo,389
|
|
10
|
+
vizflow-0.5.12.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
11
|
+
vizflow-0.5.12.dist-info/RECORD,,
|
|
File without changes
|