Skip to content

Commit c43394d

Browse files
authored
Merge pull request #94 from vgreg/address-review-code-feedback
Address JOSS reviewer code feedback: __version__, lockfile, sample data
2 parents cb573e4 + 809a9a4 commit c43394d

14 files changed

Lines changed: 590 additions & 51 deletions

File tree

.github/workflows/draft-pdf.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Draft PDF
2+
on:
3+
push:
4+
paths:
5+
- paper/**
6+
- .github/workflows/draft-pdf.yml
7+
jobs:
8+
paper:
9+
runs-on: ubuntu-latest
10+
name: Paper Draft
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
- name: Build draft PDF
15+
uses: openjournals/openjournals-draft-action@master
16+
with:
17+
journal: joss
18+
# This should be the path to the paper within your repo.
19+
paper-path: paper/paper.md
20+
- name: Upload
21+
uses: actions/upload-artifact@v4
22+
with:
23+
name: paper
24+
# This is the output path where Pandoc will write the compiled
25+
# PDF. Note, this should be the same directory as the input
26+
# paper.md
27+
path: paper/paper.pdf

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,3 +211,7 @@ poetry.lock
211211

212212
docs/guide/data/
213213
samples/*/data/
214+
215+
216+
paper/jats
217+
paper/paper.pdf

docs/guide/getting-started.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22

33
This guide will help you get started with MeatPy for processing financial market data.
44

5+
## Try it without downloading anything
6+
7+
The repository ships a tiny synthetic ITCH 5.0 sample at
8+
`samples/data/sample.itch50` (590 bytes, two fictional symbols **MEAT** and
9+
**PYTH**) so you can exercise the parser, processor, and recorders end-to-end
10+
without a Nasdaq subscription. From a clone of the repo:
11+
12+
```bash
13+
uv run python samples/itch50/00_quickstart.py
14+
```
15+
16+
The quickstart counts messages by type and prints the top of book for each
17+
symbol after replaying every message through `ITCH50MarketProcessor`. See
18+
`samples/data/README.md` for what the file contains and how to regenerate it.
19+
520
## Basic Concepts
621

722
### Core Components
@@ -77,10 +92,12 @@ with ITCH50MessageReader("market_data.txt.gz") as reader:
7792
for message in reader:
7893
processor.process_message(message)
7994

80-
# Access the limit order book
81-
if processor.lob:
82-
print(f"Best bid: ${processor.lob.best_bid / 10000:.2f}")
83-
print(f"Best ask: ${processor.lob.best_ask / 10000:.2f}")
95+
# Access the limit order book. `best_bid` / `best_ask` return a `Decimal`
96+
# already scaled to dollars.
97+
lob = processor.current_lob
98+
if lob is not None and lob.bid_levels and lob.ask_levels:
99+
print(f"Best bid: ${lob.best_bid:.2f}")
100+
print(f"Best ask: ${lob.best_ask:.2f}")
84101
```
85102

86103
## Reading IEX DEEP Data

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ MeatPy is built around several core components:
3434
## What's Next?
3535

3636
- Check out the [Installation Guide](installation.md) to get started
37+
- Run the bundled end-to-end quickstart (`uv run python samples/itch50/00_quickstart.py`) against the synthetic ITCH 5.0 sample shipped at `samples/data/sample.itch50` — no Nasdaq subscription required
3738
- Read the [User Guide](guide/getting-started.md) for usage instructions
3839
- See [Contributing](contributing.md) if you want to contribute to the project
3940

paper/images/diagram.pdf

16.5 KB
Binary file not shown.

paper/paper.bib

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
@article{clarkmcgeheeObjectOrientedLibraryRealTime2013,
2+
author = {Clark McGehee, Laurens E Howle},
3+
doi = {10.4172/2324-9307.1000101},
4+
issn = {2324-9307},
5+
journal = {Journal of Computer Engineering \& Information Technology},
6+
langid = {english},
7+
number = {01},
8+
publisher = {OMICS Publishing Group},
9+
title = {An {{Object-Oriented Library}} for {{Real-Time Processing}} of {{NASDAQ Order Book Data}}},
10+
urldate = {2025-07-25},
11+
volume = {02},
12+
year = {2013}
13+
}
14+
15+
@article{comerton2019inverted,
16+
author = {Comerton-Forde, Carole and Gr{\'e}goire, Vincent and Zhong, Zhuo},
17+
doi = {10.1016/j.jfineco.2019.03.005},
18+
journal = {Journal of Financial Economics},
19+
number = {1},
20+
pages = {141--164},
21+
publisher = {Elsevier},
22+
title = {Inverted fee structures, tick size, and market quality},
23+
volume = {134},
24+
year = {2019}
25+
}
26+
27+
@inproceedings{gaiFastConstructionNanosecond2013,
28+
address = {San Diego California USA},
29+
author = {Gai, Jiading and Choi, Dong Ju and O'Neal, David and Ye, Mao and Sinkovits, Robert S.},
30+
booktitle = {Proceedings of the {{Conference}} on {{Extreme Science}} and {{Engineering Discovery Environment}}: {{Gateway}} to {{Discovery}}},
31+
copyright = {https://www.acm.org/publications/policies/copyright\_policy\#Background},
32+
doi = {10.1145/2484762.2484825},
33+
langid = {english},
34+
month = jul,
35+
pages = {1--4},
36+
publisher = {ACM},
37+
title = {Fast Construction of Nanosecond Level Snapshots of Financial Markets},
38+
urldate = {2025-07-25},
39+
year = {2013}
40+
}
41+
42+
@article{gregoire2022earnings,
43+
author = {Gr{\'e}goire, Vincent and Martineau, Charles},
44+
doi = {10.1111/1475-679X.12394},
45+
journal = {Journal of Accounting Research},
46+
number = {1},
47+
pages = {261--297},
48+
publisher = {Wiley Online Library},
49+
title = {How is earnings news transmitted to stock prices?},
50+
volume = {60},
51+
year = {2022}
52+
}
53+
54+
@article{huangLOBSTERLimitOrder2011,
55+
author = {Huang, Ruihong and Polak, Tomas},
56+
doi = {10.2139/ssrn.1977207},
57+
issn = {1556-5068},
58+
journal = {SSRN Electronic Journal},
59+
langid = {english},
60+
publisher = {Elsevier BV},
61+
shorttitle = {{{LOBSTER}}},
62+
title = {{{LOBSTER}}: {{Limit Order Book Reconstruction System}}},
63+
urldate = {2025-07-25},
64+
year = {2011}
65+
}
66+
67+
@article{oharaWhatsNotThere2014,
68+
abstract = {We investigate odd-lot trades in equity markets. Odd lots are increasingly used in algorithmic and high-frequency trading, but are not reported to the consolidated tape or in databases such as TAQ. In our sample, the median number of odd-lot trades is 24\% but in some stocks odd lots are 60\% or more of trading. Odd-lot trades contribute 35\% of price discovery, consistent with informed traders using odd lots to avoid detection. Omitting odd-lot trades leads to inaccuracies in order imbalance measures and makes sentiment measures unreliable. Excluding odd lots from the consolidated tape raises important regulatory issues.},
69+
author = {O'Hara, Maureen and Yao, Chen and Ye, Mao},
70+
copyright = {http://onlinelibrary.wiley.com/termsAndConditions\#vor},
71+
doi = {10.1111/jofi.12185},
72+
issn = {0022-1082, 1540-6261},
73+
journal = {The Journal of Finance},
74+
langid = {english},
75+
month = oct,
76+
number = {5},
77+
pages = {2199--2236},
78+
publisher = {Wiley},
79+
shorttitle = {What's {{Not There}}},
80+
title = {What's {{Not There}}: {{Odd Lots}} and {{Market Data}}},
81+
urldate = {2025-07-25},
82+
volume = {69},
83+
year = {2014}
84+
}
85+
86+
@article{shkilkoEveryCloudHas2020,
87+
abstract = {Modern markets are characterized by speed differentials, with some traders being fractions of a second faster than others. Theoretical models suggest that such differentials may have both positive and negative effects on liquidity and gains from trade. We examine these effects by studying a series of exogenous weather episodes that temporarily remove the speed advantages of the fastest traders by disrupting their microwave networks. The disruptions are associated with lower adverse selection and lower trading costs. In additional analysis, we show that the long-term removal of speed differentials results in similar effects and also increases gains from trade.},
88+
author = {Shkilko, Andriy and Sokolov, Konstantin},
89+
copyright = {http://onlinelibrary.wiley.com/termsAndConditions\#vor},
90+
doi = {10.1111/jofi.12969},
91+
issn = {0022-1082, 1540-6261},
92+
journal = {The Journal of Finance},
93+
langid = {english},
94+
month = dec,
95+
number = {6},
96+
pages = {2899--2927},
97+
publisher = {Wiley},
98+
shorttitle = {Every {{Cloud Has}} a {{Silver Lining}}},
99+
title = {Every {{Cloud Has}} a {{Silver Lining}}: {{Fast Trading}}, {{Microwave Connectivity}}, and {{Trading Costs}}},
100+
urldate = {2025-07-25},
101+
volume = {75},
102+
year = {2020}
103+
}
104+
105+
@article{yaali2022hftviz,
106+
author = {Yaali, Javad and Gr{\'e}goire, Vincent and Hurtut, Thomas},
107+
doi = {10.1177/14738716211064921},
108+
journal = {Information Visualization},
109+
number = {2},
110+
pages = {182--193},
111+
publisher = {SAGE Publications Sage UK: London, England},
112+
title = {HFTViz: Visualization for the exploration of high frequency trading data},
113+
volume = {21},
114+
year = {2022}
115+
}

0 commit comments

Comments
 (0)