Tribler / tribler

Privacy enhanced BitTorrent client with P2P content discovery
https://www.tribler.org
GNU General Public License v3.0
4.8k stars 444 forks source link

Decentral market primitives: market order and execution engine fairness #3486

Closed synctext closed 4 years ago

synctext commented 6 years ago

Expands upon the market #2559. basic background knowledge on market orders Thesis goals has been to:

1) analyze order book data and build a model which "guarantees" optimal order execution and

2) subsequently provide this functionality to the tribler market in form of an execution engine such that users will be able to get a fair price for a product.

Primary thesis adviser: machine learning expert Marco Loog.

mjuchli commented 6 years ago

For a more extensive documentation, consult the Wiki


Financial institutions make decisions on whether to buy or sell assets based on various reasons, including: customer requests, fundamental analysis, technical analysis, top-down investing, bottom-up investing and many more. The high-level trading strategies oftentimes define the purpose of their business and how the institution positions itself in the various financial markets and, if existent, towards its customers. Regardless of the high-level trading strategy that is being applied, the invariable outcome is the decision to buy or sell assets. Hence, an execution strategy aims to execute (buy or sell) orders of the demanded asset to a favourable price.

CTC-Executioner is a tool that provides an on-demand execution strategy for limit orders on crypto currency markets using Reinforcement Learning techniques. The underlying framework provides order book and match engine functionalities which allow to analyse order book data and derive features thereof. Those findings can then be used in order to dynamically update the decision making process of the execution strategy. Therefore, backtesting functionality is provided which allows to determine the performance of a model for a given historical data set. The project further conducts several experiments which analyse the behaviour of order matching in a controlled environment by utilising historical order book data with the aim to identify the limitations to overcome; as well as to provide insight of how to possibly exploit market situations for a more favourable execution to follow.


Progress updates will follow below.

synctext commented 6 years ago

progress: wrote own Q-Learner and deep-learning buzzword compliant version. Got the leading engine also operational now, OpenAI general comment on reinforcement learning. You need an explicit reward function, this is responsible for the state explosion. No need to make assumptions or build a model. The learning problem can be left as a black box. it's end-to-end. Current thesis work: ignore the distributed orderbook problem. Our joint Q-Learner work from 7 years ago: "Enhancement of BARTERCAST Using Reinforcement Learning to Effectively Manage Freeriders". Could be re-visited for phd thesis.

synctext commented 6 years ago

Progress update:

synctext commented 6 years ago

ctc_executioner (3).pdf Points for improvement:

mjuchli commented 6 years ago

Latest draft: ctc_executioner (5).pdf

synctext commented 6 years ago
synctext commented 6 years ago

"PhD level" expansion.. Re-use your Q-learner with deep reinforcement learning to cooperate, while under continuous attack from freeriders. iterated PD within group context, pair-wise encounters. Reward when Alice and Bob cooperate, penalty if Charlie defects on you. Trustchain to view historical behavior.

Related work: "Learning to Protect Communications with Adversarial Neural Cryptography". by Google Brain. We ask whether neural networks can learn to use secret keys to protect information from other neural networks. Specifically, we focus on ensuring confidentiality properties in a multiagent system, and we specify those properties in terms of an adversary. Thus, a system may consist of neural networks named Alice and Bob, and we aim to limit what a third neural network named Eve learns from eavesdropping on the communication between Alice and Bob. We do not prescribe specific cryptographic algorithms to these neural networks; instead, we train end-to-end, adversarially. We demonstrate that the neural networks can learn how to perform forms of encryption and decryption, and also how to apply these operations selectively in order to meet confidentiality goals.

mjuchli commented 6 years ago

The report attached is almost complete, except:

ctc_executioner.pdf

synctext commented 6 years ago

Final comment round:

synctext commented 6 years ago

Job well done! thesis page in official TUDelft repo

Direct link to .PDF file

Documentation includes: Jupyter Notebooks and wiki

devos50 commented 4 years ago

I think this issue can be closed. Given the variety of attacks on blockchain ordering, fairness in decentralized markets is still an open issue and I think a very promising direction for a follow-up thesis/paper.