76 lines
2.7 KiB
Markdown
76 lines
2.7 KiB
Markdown
# Fixed-Point and Minute-Stream Acceptance
|
|
|
|
Acceptance date: 2026-08-31
|
|
Engine commit: `cd116bc3ae77cac0989eb80185bb04d7440b8834`
|
|
|
|
## Scope
|
|
|
|
This acceptance separates execution precision from minute-data throughput. It
|
|
does not use a strategy-specific shortcut and does not change strategy,
|
|
matching, risk, slippage, commission, tax, or future-data semantics.
|
|
|
|
## Fixed-Point Boundary
|
|
|
|
- Execution money is signed micro-yuan `i128`.
|
|
- Stock gross amount, commission, stamp tax, transfer fee, cash, liabilities,
|
|
external cash flow, account units, position lot cost and PnL are fixed-point.
|
|
- Futures cash, margin, transaction cost, realized PnL and position PnL are
|
|
fixed-point.
|
|
- Market indicators and return statistics remain `f64`; conversion occurs only
|
|
at the execution-money boundary.
|
|
- One-micro-yuan budget overruns fail instead of being hidden by float epsilon.
|
|
|
|
Verification command:
|
|
|
|
```bash
|
|
cargo test -p fidc-core fixed -- --nocapture
|
|
```
|
|
|
|
Result: 8 passed, 0 failed.
|
|
|
|
## Minute Data Boundary
|
|
|
|
- `history_intraday_quotes_at` uses a sorted execution-date index and scans
|
|
backward until the requested bar count is satisfied.
|
|
- The active timestamp and `include_now` flag control visibility; later bars are
|
|
never visible.
|
|
- Daily minute execution consumes a borrowed k-way merge ordered by timestamp
|
|
and symbol. It does not clone the complete selected quote day before engine
|
|
dispatch.
|
|
- Execution quotes are released by trading date after the day finishes.
|
|
|
|
Release benchmark command:
|
|
|
|
```bash
|
|
cargo test -p fidc-core --test intraday_history_performance --release -- --ignored --nocapture
|
|
```
|
|
|
|
Observed on the local acceptance host:
|
|
|
|
| Case | Workload | Result |
|
|
| --- | --- | --- |
|
|
| Bounded history | 200 queries over 60,000 rows | 0.000227 seconds, checksum 351450348000 |
|
|
| Full-day materialization | 5,000 iterations x 240 rows | 0.049361 seconds |
|
|
| Borrowed quote stream | 5,000 iterations x 240 rows | 0.012232 seconds |
|
|
|
|
The materialized and streamed timestamp checksums were both
|
|
`2108693484000000`. The observed component speedup was about 4.04x. These
|
|
numbers are component evidence only and are not an end-to-end SLA.
|
|
|
|
## Regression
|
|
|
|
```bash
|
|
cargo test -p fidc-core --all-targets
|
|
```
|
|
|
|
Result: 528 passed, 0 failed, 1 ignored manual benchmark. This includes
|
|
execution-day risk, next-open open-price limits, minute timestamp visibility,
|
|
slippage, minimum commission, stamp tax, volume limits, corporate actions,
|
|
external cash-flow NAV treatment and futures account precision.
|
|
|
|
## Deployment Gate
|
|
|
|
This documentation-only correction does not require a service restart. Any
|
|
future Source Lake or engine deployment still requires the official managed
|
|
entrypoint and must fail closed while FIDC-managed factor work is active.
|