Skip to content

Commit

Permalink
refactor(docs): restructure readme + index (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
KarelZe authored Jan 14, 2024
1 parent bc242d7 commit 6501919
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 22 deletions.
28 changes: 17 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ python -m pip install tclf
- Quote rule[^4]
- Tradesize rule[^3]

For a primer on trade classification rules visit the [rules section 🆕](https://karelze.github.io/tclf/rules/) in our docs.

## Minimal Example

Let's start simple: classify all trades by the quote rule and all other trades, which cannot be classified by the quote rule, randomly.
Expand Down Expand Up @@ -98,7 +100,21 @@ acc = accuracy_score(y_true, clf.predict(X))
```
In this example, input data is available as np.arrays with both exchange (`"ex"`) and nbbo data (`"best"`). We set the layers parameter to `layers=[("quote", "ex"), ("quote", "best")]` to classify trades first on subset `"ex"` and remaining trades on subset `"best"`. Additionally, we have to set `ClassicalClassifier(..., features=features)` to pass column information to the classifier.

Like before, column/feature names must follow our [naming conventions](https://karelze.github.io/tclf/naming_conventions/). For more practical examples, see our [examples section](https://karelze.github.io/tclf/option_trade_classification).
Like before, column/feature names must follow our [naming conventions](https://karelze.github.io/tclf/naming_conventions/).

## Other Examples

For more practical examples, see our [examples section](https://karelze.github.io/tclf/option_trade_classification).

## Development

We are using [`pixi`](https://github.com/prefix-dev/pixi) as a dependency management and workflow tool.

```bash
pixi install
pixi run postinstall
pixi run test
```

## Citation

Expand All @@ -116,16 +132,6 @@ If you are using the package in publications, please cite as:
}
```

## Development

We are using [`pixi`](https://github.com/prefix-dev/pixi) as a dependency management and workflow tool.

```bash
pixi install
pixi run postinstall
pixi run test
```

## Footnotes

[^1]: <div class="csl-entry">Chakrabarty, B., Li, B., Nguyen, V., &amp; Van Ness, R. A. (2007). Trade classification algorithms for electronic communications network trades. <i>Journal of Banking &amp; Finance</i>, <i>31</i>(12), 3806–3821. <a href="https://doi.org/10.1016/j.jbankfin.2007.03.003">https://doi.org/10.1016/j.jbankfin.2007.03.003</a></div>
Expand Down
28 changes: 17 additions & 11 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ python -m pip install tclf
- Quote rule[^4]
- Tradesize rule[^3]

For a primer on trade classification rules visit the [rules section 🆕](https://karelze.github.io/tclf/rules/) in our docs.

## Minimal Example

Let's start simple: classify all trades by the quote rule and all other trades, which cannot be classified by the quote rule, randomly.
Expand Down Expand Up @@ -98,7 +100,21 @@ acc = accuracy_score(y_true, clf.predict(X))
```
In this example, input data is available as np.arrays with both exchange (`"ex"`) and nbbo data (`"best"`). We set the layers parameter to `layers=[("quote", "ex"), ("quote", "best")]` to classify trades first on subset `"ex"` and remaining trades on subset `"best"`. Additionally, we have to set `ClassicalClassifier(..., features=features)` to pass column information to the classifier.

Like before, column/feature names must follow our [naming conventions](https://karelze.github.io/tclf/naming_conventions/). For more practical examples, see our [examples section](https://karelze.github.io/tclf/option_trade_classification).
Like before, column/feature names must follow our [naming conventions](https://karelze.github.io/tclf/naming_conventions/).

## Other Examples

For more practical examples, see our [examples section](https://karelze.github.io/tclf/option_trade_classification).

## Development

We are using [`pixi`](https://github.com/prefix-dev/pixi) as a dependency management and workflow tool.

```bash
pixi install
pixi run postinstall
pixi run test
```

## Citation

Expand All @@ -116,16 +132,6 @@ If you are using the package in publications, please cite as:
}
```

## Development

We are using [`pixi`](https://github.com/prefix-dev/pixi) as a dependency management and workflow tool.

```bash
pixi install
pixi run postinstall
pixi run test
```

## Footnotes

[^1]: <div class="csl-entry">Chakrabarty, B., Li, B., Nguyen, V., &amp; Van Ness, R. A. (2007). Trade classification algorithms for electronic communications network trades. <i>Journal of Banking &amp; Finance</i>, <i>31</i>(12), 3806–3821. <a href="https://doi.org/10.1016/j.jbankfin.2007.03.003">https://doi.org/10.1016/j.jbankfin.2007.03.003</a></div>
Expand Down

0 comments on commit 6501919

Please sign in to comment.