Skip to content

Commit 5810848

Browse files
authored
Update README.md
1 parent 684c4c9 commit 5810848

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
##With this sample you`ll be able to:
1+
## With this sample you`ll be able to:
22
* get order book (Level II, market depth) from [BitMEX](https://www.bitmex.com) and save as json structures in day-lenght files
33
* generate trading signals [BUY, SELL, WAIT] on orderbooks (not only BitMEX\`s) with or without help of sequential neural network
44
* create training dataset for neural network from presaved orderbooks
55
* create, train, save and restore neural network with input data of orderbooks (not only BitMEX`s)
66
* perform backtest trading with output of trades
77

8-
###Limitations
8+
### Limitations
99
* [BitMEX](https://www.bitmex.com) only and [XBTUSD](https://www.bitmex.com/app/contract/XBTUSD) data fetching only are provided. The source connection code taken from [Python Adapter for BitMEX Realtime Data](https://github.com/BitMEX/api-connectors/tree/master/official-ws/python)
1010
* Code works correctly only for 100-depth order books.
1111
* Neural network has voluntaristic rigid architecture where you can operate only number of layers and neurons quantity. Input layer must contain 100 neurons, output layer 2 neurons.
1212
* No commissions, fees etc. are calculated while backtesting. Result trades must be extra analyzed.
1313

1414

15-
##Installation
15+
## Installation
1616
```
1717
pip install -r requirements.txt
1818
```
1919

20-
##Use cases
21-
####Retrieving order books ([Bitmex](https://www.bitmex.com) only)
20+
## Use cases
21+
#### Retrieving order books ([Bitmex](https://www.bitmex.com) only)
2222
Just run code below with your [API-key credentials to BitMEX](https://www.bitmex.com/app/apiKeysUsage).
2323
On every update of market 100-depth order book is writing to disk.
2424
[Bid-ask spread](https://en.wikipedia.org/wiki/Bid-ask_spread) is in the middle of order book. New trading day starts with new file.
@@ -35,7 +35,7 @@ bitmex.exit()
3535
```
3636

3737

38-
####Dataset creation for neural network training
38+
#### Dataset creation for neural network training
3939

4040
```python
4141
from OrderBookContainer import *
@@ -49,7 +49,7 @@ for in_file in input_files:
4949
As a result the script will create Datasets subfolder with \*.ds files.
5050

5151

52-
####Neural network creation, training and saving for next time use
52+
#### Neural network creation, training and saving for next time use
5353

5454
My goal is just to show that neural networks work without price movement analysis but only on current market timestamp (== order book) analysis.
5555

@@ -74,27 +74,27 @@ nwk.train(datasets_folder)
7474
nwk.save_model('full_path_to_file.h5')
7575
```
7676

77-
####Trading signal generation
77+
#### Trading signal generation
7878

7979
You can generate trading signal with possible values of [BUY, SELL, WAIT] with order book analysis only.
8080
On every *orderbook* you get from exchange or read from file signal can be generated with code below.
8181
*threshold* is floating point value in range [0, 1]. The less the value the more signals you get.
82-
######Neural generator
82+
###### Neural generator
8383

8484
```python
8585
from Generators import sample_generator_n
8686
nwk = TurexNetwork.TurexNetwork()
8787
nwk.load_model('model_from_code_above.h5')
8888
signal = sample_generator_n(nwk, orderbook.volumes, threshold)
8989
```
90-
######Simple generator
90+
###### Simple generator
9191
```python
9292
from Generators import sample_generator
9393
signal = sample_generator(orderbook.volumes, threshold)
9494
```
9595

9696

97-
####Backtesting
97+
#### Backtesting
9898
The mean of *threshold* is described above.
9999

100100
```python

0 commit comments

Comments
 (0)