over budget
Democratised AlgoTrading on Cardano
Current Project Status
unfunded
Total
amount
Received
$0
Total
amount
Requested
$50,000
Total
Percentage
Received
0.00%
Solution

在跟踪前K=100名交易者的集中交易所账户和钱包的基础上,开发自动ML交易合集方法。

Problem

经典的区块链奖励集中在做市商费用、PoS奖励和借贷上,留下了自动交易的一个大的收入领域未被开发。

Addresses Challenge
Feasibility
Auditability
Impact

团队

2 members

  • view
  • view
  • view
  Easy to read format on Google Docs (Daemon Exchange White Paper): https://docs.google.com/document/d/1yXLSZm7b5qvZsdrjXQAOnmSzVZOVfZQYjeyLpFumHHw  

 

Updates:

  • April 14: first detailed plan to be submitted by Sunday, April 18.
  • April 16: detailed plan draft submitted. We’ll continue working on it and writing the technical paper and keep you posted. Please, help us by asking questions and providing feedback.
  • April 18: Updated project URL from daemon.capital to daemon.fund as we had a small oopsie with reverse proxy automatically registering cerficiates using Lets Encrypt leading to registering it max 10 times losing private key on every deployment. Lessons were learnt: https://crt.sh/?q=daemon.capital . After a week when we can request a new Lets Encrypt cert for daemon.capital we’ll revert to it and will make daemon.fund to automatically redirect to daemon.capital
  • April 28: Submitted final Catalyst proposal (Daemon Exchange white paper: https://docs.google.com/document/d/1yXLSZm7b5qvZsdrjXQAOnmSzVZOVfZQYjeyLpFumHHw

 


 

Funds allocation:

  • $5k front-end development;
  • $10k infrastructure;
  • $5k bills for using centralised exchange APIs;
  • $10k code development and strategy experimentation;
  • $10k strategy execution testing on the real market;
  • $10k airdrop (we will need to inject funds into the contract to generate strategy tokens which we can then airdrop);

 


 

We propose to design and implement a democratized ensemble automatic trading algorithm.

 

Let’s break it down into parts:

  • automatic - all trades are performed automatically based on the input data, algorithm itself, algorithm tuning parameters, and market parameters. As this is not a high-frequency strategy a portfolio rebalancing can be set in response to events, change in market conditions, or even based on the clock (for instance majority of indices rebalance on the 3rd week of each month and usually outperform most of the individual investors);
  • ensemble - technical term of combination of algorithms (usually in machine learning) and the method which takes output from multiple components and generates one uniform answer based on the individual answers; often ensemble algorithms perform better than single instances, due to better generalization and ability to capture multiple local minimum, and avoid catastrophically wrong predictions (let’s assume one of the combined algos give absurdly bad answer); furthermore, in the case of trading, ensemble allows to encapsulate different trading strategies and take the democratic vote on what path to follow;
  • democratic - we use this word in a very overloaded sense: …. - democratic - open to everyone around the world to participate; hedge funds lack transparency, it takes time to exit (usually a couple months, but sometimes longer to get your money back), and most importantly you don’t have to have over $250K or even more to be considered a client. You can invest any amount and receive revenue proportional to your initial investment; …. - Democractic - in the algorithmic sense; ensemble method will mirror trades of K=100 traders and ensemble model will take democratic vote based on different modelling techniques of understanding why certain traders take certain positions and weight it democratically (ensemble voting mechanism) which might affect both sizes of the positions or if to enter it or not.

 

Why do we need algorithmic trading on the blockchain?

There are 3 classical ways in which one can invest their cryptocurrencies at the moment:

  • lend it and receive share of the revenue (e.g. via BlockFi);
  • stake it (possible only on PoS blockchains) and receive share of the mined rewards;
  • provide liquidity via one of DeFi platforms (such as UniSwap, SushiSwap, or PancakeSwap) in usually very volatile pairs being exposed to significant impermanent loss.

 

This leaves the whole area of automatic trading untapped. As automated trading can be done in much more stable instruments it usually has lower risks than lending or providing liquidity. At the same time it can tap into the profits from either market inefficiencies, superior access or understanding of the market data.

 

Blockchain as investment infrastructure creates access to much more fair wealth distribution. Consider when the government prints fiat money they spend it on something, but wouldn’t it be more fair to distribute the minted currency to fiat currency holders? It’d stimulate the economy the same, one could argue that even more, but at the same time, the printing process wouldn’t empower the fiat currency holders. It’s in a sense, non-voluntary wealth transfer. One could argue that PoS blockchain addresses it by rewarding cryptocurrency holders.

 

The same happens in trading. The classical exchange has seen an insane level of optimization with first the shortest possible fibre optic cable link between Chicago and New York to facilitate high-frequency trading being replaced by microwave towers. The same happens in the hedge fund world - all hedge funds have advantageous access to exchanges, brokers, market information, and news information. As a result, sophisticated trading platforms such as market making and hedge funds are only available to rich investors with the usual arrangement of 2% of funds charged and 20% of profits as the cost of participating in the hedge fund.

 

In our view, it creates unfair advantages for the wealthy, where not only they have an advantage of resources, but also the advantage of how much more revenue those resources can generate. We believe that’s an area that deserves fair and democratic access.

 

Finally, quantitative finance, trading, information gathering and analysis, and so much more, are fascinating fields of knowledge, and when it’s all used behind closed doors, in environment where it cannot be shared with the outside world, it creates a lot of friction and challenge in people acquiring the relevant knowledge, experience, and pushing the frontiers of science. It’s exciting to see how many innovative and beautifully simple ideas crypto space already came up with such as Automatic Market Making or Quadratic Funding.

 

Proposed solution Develop an automated trading algorithm taking into the account K=100 top traders which transactions we want to take as the input. Have an ensemble of algorithms analyse this input and produce the voted score of what positions to enter.

 

The ensemble would be composed of different types of algorithms from market indicators, to risk assessment, to advanced quantitative models, and be then input to the ensemble assessing plutocrically (via vote, stake, and algorithm expertise, and recent performance), what’s the optimal basket composition, computing the expected execution cost, adjusting the trades for the cost of execution, and rebalancing the portfolio.

 


 

Timeline Launchpad We plan 3 phase launch:

  • (late summer) develop first complete ensemble trading algorithm with the oracle source of trading information; stable platform with UI and backtesting data; perform backtesting on a simulated input source (mirror market, but execute paper trades on testnet);
  • (late autumn) develop first game theoretically sound mainnet testing ensemble algorithm; assign real trading money ($10k portion of the proposal) and capture the performance in action; evaluate and iterate; publish algo performance;
  • (early winter) completed solution with live tracked algo decisions, indicators, and strategy performance; open to everyone to stake in the strategy.

 

 

Definition of Success

 

After 3 months

  • Ensemble algorithm performing paper trades on Cardano testnet.
  • Tracked monitoring and algo performance (Grafana or customized).

 

After 6 months

  • Mainnet (real-world) ready and game theoretically sound algo;
  • Perform, monitor, and iterative on the algo trading with real money;
  • Wrap up trading report and publish to the community;
  • Improve the interface and start mainnet integration for the user interaction.

 

After 12 months

  • Ensemble trading algorithm generating risk-free alpha compared to indicator created of top 10 crypto by their capitazaliton.
  • Users are able to view algo decisions in real life and all historical data from performance to input and trades.
  • Everyone able to stake into the algo.
  • Liquid unstaking (as the fund is involved in the actual positions unstaking means either returning basket or converting all cryptos to the input currency, e.g. ADA), we want to provide integration with swap smart contracts and visibility to exchange costs, and options to unstake.

 

Impact on the challenge metrics

Source: https://cardano.ideascale.com/a/campaign-home/25941

 

DeFi (liquidity providing and farming) applications attract enormous amounts of users and monetary value: https://dappradar.com/defi.

 

This project is competing for the same market as DeFi projects.

 

DeFi (liquidity providing and farming) applications attract enormous amounts of users and monetary value: https://dappradar.com/defi.

 

PancakeSwap which launched just on September 20, 2020 already amassed (source: https://dappradar.com/binance-smart-chain/defi/pancakeswap):

  • 579.23k monthly active users;
  • 2.93M monthly transactions;
  • $30.64B in traded volume; and
  • $4.08B in total value locked.

 

A good automatic trading algorithm can potentially generate better returns or returns less risk, hence incentivizing DeFi users to stake into the automated trading algos as compared to yield farming.

 

We project, if successful, in a year, it could

  • Attract about 1-10k new users; specifically to Cardano from other blockchains as it’s very unlikely other blockchains will be that quick to catch on this innovation.
  • As any actively traded basket of instruments the fund itself will generate significant transaction movement on the blockchain. We estimate that about 5-50% of the total value locked in the strat will be moved into other positions on average every day. Assuming that total value locked is ₳20M, it’d generate anywhere from ₳0.1M to ₳10M of daily trading volume.
  • If executed correctly, it has the right to add a building block to Cardano as being the financial operating system. Contributing positively to the Cardano’s long term vision of being a financial operating system.

 


 

Roadmap

  • Implement API integration with the major centralised exchanges that allow traders profiles to be public (Binance, CoinBase, etc.).
  • Scrape API and any other source for historical data create a database of trader performances.
  • Research and implement a series of trader scoring metrics. In the most simple terms, the metric should at least take into account P&L and risk into the account. Some traders engage in very risky options and derivative trading which might lead to incredible profits, but equivalently to incredible losses, and we want to maximize profits up to the certain risk profile we’re willing to take. Additionally, the trades should be evaluated in terms of VAR (Value at Risk), Extreme Event Modeling, and existing history of the performance of the asset (e.g. a very new asset will be extremely volatile and not enough data will exist to properly describe their risk profiles).
  • Create a bunch of dozen top K=100 trader profiles by a series of scoring metrics (we want traders who have consistent gains and not one big win to start with, but as we develop ensemble models we might want to add a few outliers into the ensemble model). Those models will be used to backtest ensemble trading strategies and benchmark them against each other.
  • Research and experiment with building ensemble components (we can use different actor models to model different trader profiles or combine multiple agent models with the trader parametrization). Experiment with different ensemble parametrization. Note the ensemble model tuning parameters, and prepare for backtesting.
  • Develop a trading benchmark. Our assumption is that a good ensemble trader should be able to outperform the cryptomarket index fund. There isn’t a cryptomarket index fund, so we’ll create one based on top 100 cryptocurrencies by capitalization for the last 5 years. This in turn will become a bottom benchmark for the fund returns. Bitcoin on the other hand will be used as a benchmark for the risk-free return rate (interest rate in the regular investment world). Technically, it’s very different, but again, we want to outperform the crypto market and not the classical market, hence it has logic to it, plus it’s much higher bar than simple risk-free rate.
  • Perform backtesting using different source of data: …. - Historical market data; …. - Monte Carlo simulations (Generalized Brownian Motion - random walk as a source of randomness using the crypto asset parameters), repeated many times over resulting in different paths …. - Historical market data and Monte Carlo simulation, but with extreme events introduced to test the strategy resilience to ruin.
  • Create a report explaining the methodology, the ensemble model training process, and performance on the historical data, in Montecarlo simulation, and with and without black swan events introduction.
  • Introduce the time step parameter - how often the ensemble model rebalances the portfolio and include the slippage and transaction cost into the model.
  • Rerun all experiments taking into account execution costs.
  • Research and design trustless custody system (security of funds insured by contract) and different staking/unstaking models. We plan on contributing equities to the fund via stable currency which then is transformed into the strategy stake tokens (as the fund value increases or decreases it will represent the returns on investment). As majority if not all funds might be invested we need to consider what’s the most optimal strategy for unstaking, worst case scenario it can be performed on each clock action (before rebalancing return staked assets or staked exchanged for stable currency / Cardano / Bitcoin) for the equivalent token amount.
  • When Cardano testnet launches, start experimenting with liquidity provider integrations and token value translation mechanisms.
  • Mint native Cardano token representing this specific strategy (ensemble top 100 traders), use a portion of collected funds to inject the algo, and test on the real market. If successful, show the real market history on top of all the above research, and create a liquidity pair on Cardano DEXes for people to be able to purchase tokens at the market value. If slippage on DEX might introduce too much value lose, experiment with smart contract which computes the fund ratio allocation and returns token proportionate based on that when interacting with it, skipping DEXes, and removing risk of slippage, or inefficient market pricing if LP would be too illiquid (if there’s a strong imbalance between makers and takers for the LP it will create a price arbitrage which hopefully would be used by savvy trader to execute on the arbitrage, but in our opinion it’s better to protect the fund value leakage due to DEX inefficiencies).

 


 

References

 

Fundamentals [0] Options Volatility & Pricing. Advanced Trading Strategies and Techniques. Sheldon Natenberg. 2nd edition. [1] Active Portfolio Management. A Quantitative Approach for Producing Superior Returns and Controlling Risk. Richard C. Grinold, Ronald N. Khan. 2nd edition. [2] Derivatives - Models on Models. Espen Gaarder Haug. [3] Systematic Trading. Robert Carver. [4] Modern Portfolio Theory and Investment Analysis. Edwin J. Elton et al. 9th edition. [5] The xVA Challenge. Jon Gregory. 3rd edition. [6] Principles of Professional Speculation. Victor Sperandeo. [7] Asset Price Dynamics, Volatility, and Prediction. Stephen J. Taylor. [8] Paul Wilmott on Quantitative Finance. Paul Willmot. 2nd edition. [9] Trading Volatility, Correlation, Term Structure, and Skew. Colin Bennet. [10] Options, Futures, and Other Derivatives. John C. Hull. 8th edition. [11] Modern Investment Management. An Equilibrium Approach. BOb Litterman and the Quantitative Research Group, Goldman Sachs Asset Management. [12] Continuous-Time Finance. Robert C. Merton. Revised edition. [13] The Volatility Surface. A Practitioner’s Guide. Jim Gatheral. [14] The Man Who Solved The Market. How Jim Simons Launched The Quant Revolution. Gregory Zuckerman. [15] Asset Pricing. John H. Cochrane. Revised edition. [16] Basic Stochastic Processes. Zdzisław Brzeźniak, Tomasz Zastawniak. [17] Advances in Financial Machine Learning. Marcos Lopez de Prado. [18] Investment Science. David G. Luenberger. [19] Fractals and Scaling in Finance. Discontinuity, Concentration, Risk. Benoit B. Mandelbrot. [20] Finding Alphas. A Quantitative Approach to Building Trading Strategies. Igor Tulchinsky et al. [21] Brownian Motion, Martingales, and Stochastic Calculus. Jean-François Le Gall. [22] Stochastic Volatility Modeling. Lorenzo Bergomi. [23] Risk and Asset Allocation. Attilio Meucci. [24] Dynamic Hedging. Managing Vanilla and Exotic Options. Nassim Taleb. [25] Tail Risk Hedging. Creating Robust Portfolios for Volatile Markets. Vinner Bhansali. [26] Modelling Extremal Events: for Insurance and Finance. Paul Embrechts et al. [27] Statistical Consequences of Fat Tails. Real World Preasymptotics, Epistemology, and Applications. Nassim Nicholas Taleb.

 

Security [SEC.0] Rubber-hose cryptanalysis. Wikipedia article. URL: https://en.wikipedia.org/wiki/Rubber-hose_cryptanalysis. Accessed on 2021/04/26.

Definition of Success

Received emails from [email protected], How my proposal impacts the challenge metrics, Broken down my budget requirements, Defined expected public launch date., How I address the challenge question, Submitted this proposal to only one challenge, Definition of success after 3, 6 and 12 months, Included identifying information about all proposers

社区顾问评论 (1)

Comments

close

Playlist

  • EP2: epoch_length

    Authored by: Darlington Kofa

    3分钟24秒
    Darlington Kofa
  • EP1: 'd' parameter

    Authored by: Darlington Kofa

    4分钟3秒
    Darlington Kofa
  • EP3: key_deposit

    Authored by: Darlington Kofa

    3分钟48秒
    Darlington Kofa
  • EP4: epoch_no

    Authored by: Darlington Kofa

    2分钟16秒
    Darlington Kofa
  • EP5: max_block_size

    Authored by: Darlington Kofa

    3分钟14秒
    Darlington Kofa
  • EP6: pool_deposit

    Authored by: Darlington Kofa

    3分钟19秒
    Darlington Kofa
  • EP7: max_tx_size

    Authored by: Darlington Kofa

    4分钟59秒
    Darlington Kofa
0:00
/
~0:00