-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathtest.py
30 lines (20 loc) · 777 Bytes
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env python
from tqdm import tqdm
import flowrisk as fr
class Config(fr.BulkConfVPINConfig):
N_TIME_BAR_FOR_INITIALIZATION = 50
BUCKET_MAX_VOLUME = 10000.0
N_BUCKET_OR_BUCKET_DECAY = 0.95
BUCKETS = fr.bulk.RecursiveBulkClassEWMABuckets
if __name__ == '__main__':
config = Config()
config.summary()
example = fr.examples.USStocks(config)
symbols = example.list_symbols('small')
for symbol in tqdm(symbols):
result = example.estimate_vpin_and_conf_interval(symbol)
example.draw_price_vpins_and_conf_intervals()
symbols = example.list_symbols('large')
for symbol in tqdm(symbols):
result = example.estimate_vpin_and_conf_interval(symbol)
example.draw_price_vpins_and_conf_intervals()