Microstructure Indicators
order_imbalance(currency, by='hour', root=None)
Compute hourly order imbalance for a given currency using historical_fiat data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
currency
|
str
|
Fiat currency code. |
required |
by
|
hour
|
Aggregation level. |
'hour'
|
root
|
path - like
|
Root of processed data from Phase 1. |
None
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
One row per (date, hour) with: - date - hour - currency - buy_volume - sell_volume - imbalance |
Source code in src\p2p_analytics\microstructure.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | |