In recent years, many practitioners in quantitative finance have attempted to use Deep Reinforcement Learning (DRL) to build better quantitative trading (QT) strategies. Nevertheless, many existing studies fail to address several serious challenges, such as the non-stationary financial environment and the bias and variance trade-off when applying DRL in the real financial market. In this work, we proposed Safe-FinRL, a novel DRL-based high-freq stock trading strategy enhanced by the near-stationary financial environment and low bias and variance estimation. Our main contributions are twofold: firstly, we separate the long financial time series into the near-stationary short environment; secondly, we implement Trace-SAC in the near-stationary financial environment by incorporating the general retrace operator into the Soft Actor-Critic. Extensive experiments on the cryptocurrency market have demonstrated that Safe-FinRL has provided a stable value estimation and a steady policy improvement and reduced bias and variance significantly in the near-stationary financial environment.
We propose a portfolio allocation method based on risk factor budgeting using convex Nonnegative Matrix Factorization (NMF). Unlike classical factor analysis, PCA, or ICA, NMF ensures positive factor loadings to obtain interpretable long-only portfolios. As the NMF factors represent separate sources of risk, they have a quasi-diagonal correlation matrix, promoting diversified portfolio allocations. We evaluate our method in the context of volatility targeting on two long-only global portfolios of cryptocurrencies and traditional assets. Our method outperforms classical portfolio allocations regarding diversification and presents a better risk profile than hierarchical risk parity (HRP). We assess the robustness of our findings using Monte Carlo simulation.
As the first crisis faced by Crypto-assets, Covid-19 updated the debate about their safehaven properties. Our paper tries to analyze the safe-haven properties of Crypto-assets and Gold for European assets. We find that Gold has not been more efficient than Cryptoassets (Tether, Cardano and Dogecoin) as safe-haven during the market crash due to Covid-19 in March 2020. We also found that during the study period Bitcoin, Ethereum, Litecoin and Ripple were just diversifiers for the European indices. Finally, Tether, Cardano and Dogecoin showed hedging properties like Gold before and after the market crash.
The paper highlights some commonalities between the development of cryptocurrencies and the evolution of ecosystems. Concepts from evolutionary finance embedded in toy models consistent with stylized facts are employed to understand what survival of the fittest means in cryptofinance. Stylized facts for ownership, trading volume and market capitalization of cryptocurrencies are selectively presented in terms of scaling laws.
In this chapter structures that generate yield in cryptofinance will be analyzed and related to leverage. While the majority of crypto-assets do not have intrinsic yields in and of themselves, similar to cash holdings of fiat currency, revolutionary innovation based on smart contracts, which enable decentralised finance, does generate return. Examples include lending or providing liquidity to an automated market maker on a decentralised exchange, as well as performing block formation in a proof of stake blockchain. On centralised exchanges, perpetual and finite duration futures can trade at a premium or discount to the spot market for extended periods with one side of the transaction earning a yield. Disparities in yield exist between products and venues as a result of market segmentation and risk profile differences. Cryptofinance was initially shunned by legacy finance and developed independently. This led to curious and imaginative adaptions, reminiscent of Darwin's finches, including stable coins for dollar transfers, perpetuals for leverage, and a new class of exchanges for trading and investment.
The cryptocurrency market is highly volatile compared to traditional financial markets. Hence, forecasting its volatility is crucial for risk management. In this paper, we investigate CryptoQuant data (e.g. on-chain analytics, exchange and miner data) and whale-alert tweets, and explore their relationship to Bitcoin's next-day volatility, with a focus on extreme volatility spikes. We propose a deep learning Synthesizer Transformer model for forecasting volatility. Our results show that the model outperforms existing state-of-the-art models when forecasting extreme volatility spikes for Bitcoin using CryptoQuant data as well as whale-alert tweets. We analysed our model with the Captum XAI library to investigate which features are most important. We also backtested our prediction results with different baseline trading strategies and the results show that we are able to minimize drawdown while keeping steady profits. Our findings underscore that the proposed method is a useful tool for forecasting extreme volatility movements in the Bitcoin market.
Decentralized Finance (DeFi) is a new financial industry built on blockchain technologies. Decentralized financial services have consequently increased the ability to lend, borrow, and invest in decentralized investment vehicles, allowing investors to bypass third party intermediaries. DeFi's promise is to reduce the cost of transaction and management fees whilst increasing trust between agents of the Financial Industry 3.0. This paper provides an overview of the different components of DeFi, as well as the risks involved in investing through these new vehicles. We will also propose an allocation methodology which will integrate and quantify these risks.
Stefan Loesch, Nate Hindman, Mark B Richardson, Nicholas Welch
AMMs are autonomous smart contracts deployed on a blockchain that make markets between different assets that live on that chain. In this paper we are examining a specific class of AMMs called Constant Function Market Makers whose trading profile, ignoring fees, is determined by their bonding curve. This class of AMM suffers from what is commonly referred to as Impermanent Loss, which we have previously identified as the Gamma component of the associated self-financing trading strategy and which is the risk that LP providers wager against potential fee earnings. The recent Uniswap v3 release has popularized the concept of leveraged liquidity provision - wherein the trading range in which liquidity is provided is reduced and achieves a higher degree of capital efficiency through elimination of unused collateral. This leverage increases the fees earned, but it also increases the risk taken, ie the IL. Fee levels on Uniswap v3 are well publicized so, in this paper, we focus on calculating the IL. We found that for the 17 pools we analyzed, covering 43% of TVL and chosen by size, composite tokens and data availability, total fees earned since inception until the cut-off date was $199.3m. We also found that the total IL suffered by LPs during this period was USD 260.1m, meaning that in aggregate those LPs would have been better off by USD 60.8m had they simply HODLd.
We mine the leaked history of trades on Mt. Gox, the dominant Bitcoin exchange from 2011 to early 2014, to detect the triangular arbitrage activity conducted within the platform. The availability of user identifiers per trade allows us to focus on the historical record of 440 investors, detected as arbitrageurs, and consequently to describe their trading behavior. We begin by showing that a considerable difference appears between arbitrageurs when indicators of their expertise are taken into account. In particular, we distinguish between those who conducted arbitrage in a single or in multiple markets: using this element as a proxy for trade ability, we find that arbitrage actions performed by expert users are on average non-profitable when transaction costs are accounted for, while skilled investors conduct arbitrage at a positive and statistically significant premium. Next, we show that specific trading strategies, such as splitting orders or conducting arbitrage non aggressively, are further indicators of expertise that increase the profitability of arbitrage. Most importantly, we exploit within-user (across hours and markets) variation and document that expert users make profits on arbitrage by reacting quickly to plausible exogenous variations on the official exchange rates. We present further evidence that such differences are chiefly due to a better ability of the latter in incorporating information, both on the transactions costs and on the exchange rates volatility, eventually resulting in a better timing choice at small time scale intervals. Our results support the hypothesis that arbitrageurs are few and sophisticated users.
Natalia A. Van Heerden, Juan Cabral, Nadia Luczywo
In recent years, cryptocurrencies have gone from an obscure niche to a prominent place, with investment in these assets becoming increasingly popular. However, cryptocurrencies carry a high risk due to their high volatility. In this paper, criteria based on historical cryptocurrency data are defined in order to characterize returns and risks in different ways, in short time windows (7 and 15 days); then, the importance of criteria is analyzed by various methods and their impact is evaluated. Finally, the future plan is projected to use the knowledge obtained for the selection of investment portfolios by applying multi-criteria methods.
Over 90% of exchange trading on crypto options has always been on the Deribit platform. This centralised crypto exchange only lists inverse products because they do not accept fiat currency. Currently, fiat-based traders can only make deposits in bitcoin, although they can withdraw both bitcoin and ether to their on-chain wallets. Likewise, other major crypto options platforms only list crypto--stablecoin trading pairs in so-called direct options, which are similar to the standard crypto options listed by the CME except the U.S. dollar is replaced by a stablecoin version. Until now a clear mathematical exposition of these products has been lacking. We discuss the sources of market incompleteness in direct and inverse options and compare their pricing and hedging characteristics. Then we discuss the useful applications of currency protected "quanto" direct and inverse options for fiat-based traders and describe their pricing and hedging characteristics, all in the Black-Scholes setting.
Yield farming has been an immensely popular activity for cryptocurrency holders since the explosion of Decentralized Finance (DeFi) in the summer of 2020. In this Systematization of Knowledge (SoK), we study a general framework for yield farming strategies with empirical analysis. First, we summarize the fundamentals of yield farming by focusing on the protocols and tokens used by aggregators. We then examine the sources of yield and translate those into three example yield farming strategies, followed by the simulations of yield farming performance, based on these strategies. We further compare four major yield aggregrators -- Idle, Pickle, Harvest and Yearn -- in the ecosystem, along with brief introductions of others. We systematize their strategies and revenue models, and conduct an empirical analysis with on-chain data from example vaults, to find a plausible connection between data anomalies and historical events. Finally, we discuss the benefits and risks of yield aggregators.
Christoph J. Börner, Ingo Hoffmann, Jonas Krettek, Tim Schmitz
Abstract Cryptocurrencies (CCs) have become increasingly interesting for institutional investors’ strategic asset allocation and will therefore be a fixed component of professional portfolios in the future. However, this asset class differs from established assets primarily in that it has a higher standard deviation and tail risk. The question then arises whether CCs with similar statistical key figures exist. On this basis, a core market incorporating CCs with comparable properties enables the implementation of a tracking error approach. A prerequisite for this is the segmentation of the CC market into a core and a satellite, with the latter comprising the accumulation of the residual CCs remaining in the complement. Using a concrete example, we segment the CC market into these components based on modern methods from image/pattern recognition.
Constant Function Market Makers (CFMMs) are a family of automated market makers that enable censorship-resistant decentralized exchange on public blockchains. Arbitrage trades have been shown to align the prices reported by CFMMs with those of external markets. These trades impose costs on Liquidity Providers (LPs) who supply reserves to CFMMs. Trading fees have been proposed as a mechanism for compensating LPs for arbitrage losses. However, large fees reduce the accuracy of the prices reported by CFMMs and can cause reserves to deviate from desirable asset compositions. CFMM designers are therefore faced with the problem of how to optimally select fees to attract liquidity. We develop a framework for determining the value to LPs of supplying liquidity to a CFMM with fees when the underlying process follows a general diffusion. Focusing on a popular class of CFMMs which we call Geometric Mean Market Makers (G3Ms), our approach also allows one to select optimal fees for maximizing LP value. We illustrate our methodology by showing that an LP with mean-variance utility will prefer a G3M over all alternative trading strategies as fees approach zero.
Dynamic Portfolio optimization is the process of distribution and rebalancing of a fund into different financial assets such as stocks, cryptocurrencies, etc, in consecutive trading periods to maximize accumulated profits or minimize risks over a time horizon. This field saw huge developments in recent years, because of the increased computational power and increased research in sequential decision making through control theory. Recently Reinforcement Learning(RL) has been an important tool in the development of sequential and dynamic portfolio optimization theory. In this paper, we design a Deep Reinforcement Learning(DRL) framework as an autonomous portfolio optimization agent consisting of a Latent Feature State Space(LFSS) Module for filtering and feature extraction of financial data which is used as a state space for deep RL model. We develop an extensive RL agent with high efficiency and performance advantages over several benchmarks and model-free RL agents used in prior work. The noisy and non-stationary behaviour of daily asset prices in the financial market is addressed through Kalman Filter. Autoencoders, ZoomSVD, and restricted Boltzmann machines were the models used and compared in the module to extract relevant time series features as state space. We simulate weekly data, with practical constraints and transaction costs, on a portfolio of S&P 500 stocks. We introduce a new benchmark based on technical indicator Kd-Index and Mean-Variance Model as compared to equal weighted portfolio used in most of the prior work. The study confirms that the proposed RL portfolio agent with state space function in the form of LFSS module gives robust results with an attractive performance profile over baseline RL agents and given benchmarks.
We consider the hedging problem where a futures position can be automatically liquidated by the exchange without notice. We derive a semi-closed form for an optimal hedging strategy with dual objectives - to minimise both the variance of the hedged portfolio and the probability of liquidations due to insufficient collateral. The optimal solution depends on the statistical characteristics of the spot and futures extreme returns and parameters that characterise the hedger by loss aversion, choice of leverage and collateral management. An empirical analysis of bitcoin shows that the optimal strategy combines superior hedge effectiveness with a reduction in the probability of liquidation. We compare the performance of seven major direct and inverse hedging instruments traded on five different exchanges, based on minute-level data. We also link this performance to novel speculative trading metrics, which differ markedly between venues.
Uniswap is a decentralized exchange (DEX) and was first launched on November 2, 2018 on the Ethereum mainnet [1] and is part of an Ecosystem of products in Decentralized Finance (DeFi). It replaces a traditional order book type of trading common on centralized exchanges (CEX) with a deterministic model that swaps currencies (or tokens/assets) along a fixed price function determined by the amount of currencies supplied by the liquidity providers. Liquidity providers can be regarded as investors in the decentralized exchange and earn fixed commissions per trade. They lock up funds in liquidity pools for distinct pairs of currencies allowing market participants to swap them using the fixed price function. Liquidity providers take on market risk as a liquidity provider in exchange for earning commissions on each trade. Here we analyze the risk profile of a liquidity provider and the so called impermanent (unrealized) loss in particular. We provide an improved version of the commonly denoted impermanent loss function for Uniswap v2 on the semi-infinite domain. The differences between Uniswap v2 and v3 are also discussed.
Apostolos Chalkis, Emmanouil Christoforou, Ioannis Z. Emiris, Theodore Dalamagas
We discuss and extend a powerful, geometric framework to represent the set of portfolios, which identifies the space of asset allocations with the points lying in a convex polytope. Based on this viewpoint, we survey certain state-of-the-art tools from geometric and statistical computing in order to handle important and difficult problems in digital finance. Although our tools are quite general, in this paper we focus on two specific questions. The first concerns crisis detection, which is of prime interest for the public in general and for policy makers in particular because of the significant impact that crises have on the economy. Certain features in stock markets lead to this type of anomaly detection: Given the assets' returns, we describe the relationship between portfolios' return and volatility by means of a copula, without making any assumption on investor strategies. We examine a recent method relying on copulae to construct an appropriate indicator that allows us to automate crisis detection. On real data, the indicator detects all past crashes in the cryptocurrency market, whereas from the DJ600-Europe index, from 1990 to 2008, the indicator identifies correctly 4 crises and issues one false positive for which we offer an explanation. Our second contribution is to introduce an original computational framework to model asset allocation strategies, which is of independent interest for digital finance and its applications. Our approach addresses the crucial question of evaluating portfolio management, and is relevant to individual managers as well as financial institutions. To evaluate portfolio performance, we provide a new portfolio score, based on the aforementioned framework and concepts. In particular, our score relies on the statistical properties of portfolios, and we show how they can be computed efficiently.
We study portfolio optimization of four major cryptocurrencies. Our time series model is a generalized autoregressive conditional heteroscedasticity (GARCH) model with multivariate normal tempered stable (MNTS) distributed residuals used to capture the non-Gaussian cryptocurrency return dynamics. Based on the time series model, we optimize the portfolio in terms of Foster-Hart risk. Those sophisticated techniques are not yet documented in the context of cryptocurrency. Statistical tests suggest that the MNTS distributed GARCH model fits better with cryptocurrency returns than the competing GARCH-type models. We find that Foster-Hart optimization yields a more profitable portfolio with better risk-return balance than the prevailing approach.
Michael Darlin, Nikolaos Papadis, Leandros Tassiulas
The Maker Protocol is a decentralized finance application that enables collateralized lending. The application uses open-bid, second-price auctions to complete its loan liquidation process. In this paper, we develop a bidding function for these auctions, focusing on the costs incurred to participate in the auctions. We then optimize these costs using parameters from historical auction data, and compare our optimal bidding prices to the historical auction prices. We find that the majority of auctions end at higher prices than our recommended optimal prices, and we propose several theories for these results.
Alla Petukhina, Simon Trimborn, Wolfgang Karl Härdle, Hermann Elendner
Cryptocurrencies (CCs) have risen rapidly in market capitalization over the past years. Despite striking volatility, their high average returns and low correlations have established CCs as alternative investment assets for portfolio and risk management. We investigate the benefits of adding CCs to well-diversified portfolios of conventional financial assets for different types of investors, including risk-averse, return-maximizing and diversification-seeking investors who may trade at different frequencies, namely, daily, weekly or monthly. We calculate out-of-sample performance and diversification benefits for the most popular portfolio-construction rules, including mean-variance optimization, risk-parity, and maximum-diversification strategies, as well as combined strategies. Our results demonstrate that CCs can improve the risk-return profile of portfolios, but their benefit depends on investor objectives. In particular, diversification strategies (maximizing the portfolio diversification index or equating risk contributions) draw appreciably on CCs and show, in line with spanning tests, CCs to be non-redundant extensions of the investment universe. However, when we introduce liquidity constraints via the LIBRO method to account for illiquidity of many CCs, out-of-sample performance drops considerably, while the diversification benefits persist. We conclude that the utility of CC investments strongly depends on investor characteristics.
Stock price prediction has been an important research theme both academically and practically. Various methods to predict stock prices have been studied until now. The feature that explains the stock price by a cross-section analysis is called a "factor" in the field of finance. Many empirical studies in finance have identified which stocks having features in the cross-section relatively increase and which decrease in terms of price. Recently, stock price prediction methods using machine learning, especially deep learning, have been proposed since the relationship between these factors and stock prices is complex and non-linear. However, there are no practical examples for actual investment management. In this paper, therefore, we present a cross-sectional daily stock price prediction framework using deep learning for actual investment management. For example, we build a portfolio with information available at the time of market closing and invest at the time of market opening the next day. We perform empirical analysis in the Japanese stock market and confirm the profitability of our framework.
Yunan Ye, Hengzhi Pei, Boxin Wang, Pin‐Yu Chen · 7 authors
Portfolio management (PM) is a fundamental financial planning task that aims to achieve investment goals such as maximal profits or minimal risks. Its decision process involves continuous derivation of valuable information from various data sources and sequential decision optimization, which is a prospective research direction for reinforcement learning (RL). In this paper, we propose SARL, a novel State-Augmented RL framework for PM. Our framework aims to address two unique challenges in financial PM: (1) data heterogeneity -- the collected information for each asset is usually diverse, noisy and imbalanced (e.g., news articles); and (2) environment uncertainty -- the financial market is versatile and non-stationary. To incorporate heterogeneous data and enhance robustness against environment uncertainty, our SARL augments the asset information with their price movement prediction as additional states, where the prediction can be solely based on financial data (e.g., asset prices) or derived from alternative sources such as news. Experiments on two real-world datasets, (i) Bitcoin market and (ii) HighTech stock market with 7-year Reuters news articles, validate the effectiveness of SARL over existing PM approaches, both in terms of accumulated profits and risk-adjusted profits. Moreover, extensive simulations are conducted to demonstrate the importance of our proposed state augmentation, providing new insights and boosting performance significantly over standard RL-based PM method and other baselines.
Nektarios Aslanidis, Aurelio F. Bariviera, Alejandro Pérez-Laborda
This paper studies the dynamic market linkages among cryptocurrencies during August 2015 - July 2020 and finds a substantial increase in market linkages for both returns and volatilities. We use different methodologies to check the different aspects of market linkages. Financial and regulatory implications are discussed.