- Active strategy¶
Buying and selling assets based on the market movement. Differs from buy-and-hold by actively (hourly, daily, weekly) engaging in trading. Read more.
Automated market maker (AMM) is a bonding curve based decentralised exchange. It does not have an order book.
Apache Arrow is a popular open source in-memory analytics technology kit. More information.
- Autonomous agent¶
An agent software that acts without human intervention. Once started, there is no further need for system administration or othe work.
Simulating the efficiency of a trading strategy against historical data.
An old Python based framework for strategy backtesting and live execution. See documentation.
- Base token¶
The token you want to buy or sell in a trading pair. See also quote token.
- Bonding curve¶
In a bonding curve based exchange, like an AMM, market makers do not set limit orders to provide liquidity. Instead, the liquidity follows a predefined mathematical function. Every time there is a buy or a sell, the price moves up or down defined by this function.
See also: XY liquidity model.
The (time) bucket to a time period for candle data. For example, you can have one minute, one hour or time buckets, describing for the what period of a time the candle includes the trades.
Also known as time frame, candle length or candle duration.
Also known as fork. A product launched based on the open source code of another existing product. In the context of on-chain, usually hostile to the original product and competes from the same liquidity.
Standard Python way to annotate data structures. More information.
A data bundle consisting of candles or other quantitative data sources. The most usual dataset is hourly or daily candles for multiple assets, distributed as a downloadable archive of several hundreds of megabytes.
- Dataset server¶
- Decentralised exchange¶
Decentralised exchange (DEX) is an asset trading exchange where all trades happen purely on-chain. These exchanges are public, fair, cheap and especially censorship proof. There is no middleman like a broker when you are trading on these venues, but you get equal access to the trade flow. Decentralised exchanges can be AMM based or order book based. Some of the most popular decentralised exchanges are Uniswap, Sushiwap and PancakeSwap.
- Directional strategy¶
A trading strategy where you bet the market to go up or down.
How many % the asset can go down. Read more.
- EVM compatible¶
EVM refers to Ethereum Virtual Machine. EVM compatible blockchain is a blockchain that runs Ethereum Virtual Machine that can run smart contracts written for Ethereum. Having EVM compatibility makes it efficient to bring existing Ethereum projects to alternative L1 and L2 blockchains. EVM compatible blockchains started to get popular in 2020. A well-known EVM compatible blockchains include Polygon, Avalanche, Binance Smart Chain, Harmony, Telos EVM and Fantom. Smart contract programmers do not need to modify their existing Solidity or Vyper code and they can re-deploy contracts on any EVM chain.
The risk of a strategy for the volatility of a particular asset. For example, if you have 100% exposure to ETH and ETH prices drops to zero, you lose all of your money.
Fastquant allows you to easily backtest investment strategies with as few as three lines of Python code. Its goal is to promote data driven investments by making quantitative analysis in finance accessible to everyone. Fastquant builds on the top of Backtrader. See Github repository.
- High-frequency trading¶
High-frequency trading, or HFT for short, is a trading strategy where you do arbitration, cross-market market making or such and compete against the other actors with your technical speed. Trading Strategy is not a suitable framework for HFT trading, though its data can aid to come up with good HFT strategies.
- Jupyter notebook¶
A popular Python based data science tool. Jupyter allows users to run data research notebooks interactively. Jupyter notebooks can be easily shared, run on your local computer or on a hosted cloud environment, both free and paid. More information.
Liquidity refers to the depth of the order books: how much volume a single trade can achieve without moving the price. It can be expressed as slippage or absolute depth of the order book. The latter is very easy for AMM based exchanges where the liquidity is a continuous function. Trading Strategy provides datasets for AMM liquidity in
- Market neutral strategy¶
Market neutral strategies are trading strategies that have little or no exposure to crypto asset volatility. They are often high-frequency trading strategies, like arbitrage. Good market neutral strategies can make 10% - 20% monthly yield in cryptocurrency markets.
- Mid Price¶
The mid price, in the context of AMM, is the price that reflects the ratio of reserves in one or more pairs. There are three ways we can think about this price. Perhaps most simply, it defines the relative value of one token in terms of the other. It also represents the price at which you could theoretically trade an infinitesimal amount (ε) of one token for the other. Finally, it can be interpreted as the current market-clearing or fair value price of the assets.
The mid price, in the context of order book based exchange is \((best bid + best ask) / 2\), i.e. the price between the best sell offer and the best buy offer.
A smart contract based service model where the owner of the assets never lose the control of the assets. This is opposite to most traditional finance services where you cannot see what happens to your money after the deposit or whether you are able to withdraw. The integrity of the service provider in the traditional finance thus needs to be guaranteted through regulation or government bailouts. The non-custodial model is specific to smart contracts and cannot be achieved without a blockchain. Read more.
Notebook refers to an interactively editable Python script or application, mixed with diagrams and notes. The format was popularised by Jupyter notebook.
A typical candle contains open, high, low and close price and trade volume for a time bucket. Because on-chain exposes more data than centralised exchanges, Trading Strategy data also contains individual buys and sells, US dollar exchange rate and so forth.
On-chain refers to any activity that happens purely on a public blockchain. It means the data and trading venues are publicly and fairly available for anyone.
Blockchain oracles are entities that connect blockchains to external systems, thereby enabling smart contracts to execute based upon inputs and outputs from the real world. Read More
A popular Python-based data analysis library. More information.
A popular file format for large datasets from Apache Arrow project. More information.
- Pine Script¶
- Price impact¶
Price impact is the difference between the current market price and the price you will actually pay when performing a swap on a decentralized exchange.
Price impact tells how much less your market taker order gets filled because there is not available liquidity. For example, if you are trying to buy 5000 USD worth of BNB token, but there isn’t available liquidity you end up with 4980 USD worth of token at the end of the trade when you pay 5000 USD. The missing fill is the price impact. It can be expressed as USD value or as percent of the trade amount.
Illiquid pairs have more slippage than liquid pairs.
Liquidity provider fees are included in the price impact in AMM models.
Another way to see this: AMMs usually have a trading fee, of 0.30%, for liquidity providers and sometimes for the protocol. This translates to a spread of 0.6% between the best buy order and the best sell order. In other words, even the most liquid AMM trade has an implicit 0.3% price impact. Note that due to competition, the LP fees are going down on newer AMMs.
See also XY liquidity model.
See also Slippage.
- Private strategy¶
A trading strategy where the source code of the strategy is not disclosed to public. Private strategies can still be non-custodial and enjoy the benefits of Trading Strategy protocol trade execution and fee distribution.
- Quote token¶
The token that acts as a nominator for the price when you are buying or selling. Usually this is more well-known token of the pair: ETH, BTC or any of various USD stablecoins. See also base token.
- Risk-free rate¶
The expected return for the money that is considered (almost) risk-free. On the traditional markets, this is the tresury note or government bond yield (although you still have some risks like the sovereignity risk). In DeFi this is considered an US dollar lending pool rate, like one you would get from Aave USDC pool.
- Rug pull¶
A project where the development team or founders decide to maliciously cash out early, not fulfilling their promises and disappear with the investor money.
Slippage occurs because of changing market conditions between the moment the transaction is submitted and its verification. Slippage cannot be backtested easily, because it is based on the trade execution delays and those cannot be usually simulated (but can be measured).
DEX swap orders have a slippage parameter with them. You set it when the order is created. If the price changes more then the slippage between the creation of the order and the execution of the order, the DEX will cancel the order (revert).
See also Price impact.
- Smart contract¶
An automated transactional service running on any of the blockchains supporting smart contracts. Typically runs on Ethereum-based blockchain and is written in the Solidity programming language.
Also known as trading strategy or algorithm. A trading strategy is a rulebook of what trades to make an how. In the context of quantative finance, and especially automated trading, this rulebook can be expressed as an algorithm and trading bot that has programmed rules for every situation the strategy may encounter.
- Technical analysis¶
Technical analysis is a trading discipline employed to evaluate investments and identify trading opportunities by analyzing statistical trends gathered from trading activity, such as price movement and volume. More information.
- Technical analysis¶
A branch of finance that tries to predict prices and good trades based on market data.
Trading view is the world most popular trading strategy platform. It lets you discover investment ideas and showcase your talents to a large and active community of traders. Easy and intuitive for beginners, and powerful enough for advanced chartists. Trading View has all the charting tools you need to share and view trading ideas. Real-time data and browser-based charts let you do your research from anywhere, since there are no installations or complex setups. Read more.
The most popular AMM based decentralised exchange. Uniswap has two major versios. In version 2 (v2) the liquidity is evenly distributed across the bonding curve. In version 3, the liquidity providers can have liquidity on a partial curve, simulate order book and have better capital efficiency. Most decentralised exchanges are Uniswap v2 clones.
A popular US cash and US treasury note backed stablecoin from Circle. Read more.
- XY liquidity model¶
XY liquidity model, as known as XYK, is a bonding curve model where the price of an asset follows the equation:
This model was popularised by Uniswap version 2 decentralised exchange. Anyone can buy or sell coins by essentially shifting the market maker’s, also known as a liquidity provider, position on the
On Trading Strategy, the available liquidity is usually expressed as the US dollar amount of one side of the pair. For example adding 100 BNB + 5000 USD to the liquidity is presented as 5000 USD available liquidity.
- Yield farming¶
Pooling assets of multiple people for passive trading strategies. Usually yield farming pools rely on liquidity mining token distribution which they immediately sell (auto compounding). Yield farms operate solely on smart contracts and their strategies are limited. Yield farms almost always take zero market risk agains their quote token.