Daily Mail PH

Monday, August 15, 2022

[New post] Quant Investing 101

Site logo image Crypto Breaking News posted: "The following article is part of the Bybit Affiliates Column and contributed by PlanB, creator of the Bitcoin Stock-to-Flow method. The opinions expressed in this publication are those of the author. They do not purport to reflect the opinions or views of" Crypto Breaking News

Quant Investing 101

Crypto Breaking News

Aug 15

The following article is part of the Bybit Affiliates Column and contributed by PlanB, creator of the Bitcoin Stock-to-Flow method. The opinions expressed in this publication are those of the author. They do not purport to reflect the opinions or views of Bybit.

Screenshot_from_2022-08-13_10-35-27_7_11zon.webp

Where is the wisdom we have lost in knowledge?

Where is the knowledge we have lost in information?"

— T. S. Eliot [1]

I love quant investing and have been doing it since my university days, about 30 years ago. Quant investing covers several disciplines — investing, trading, statistics, artificial intelligence and programming. In this article, I aim to demystify quant investing and illustrate it in simple and practical terms as most articles and books about the topic are theoretical and complex. The hypothesis of this article discusses the possibility of creating and implementing a simple working quant investing trading rule that outperforms Bitcoin buy-and-hold investment. We will see that we can indeed outperform buy and hold, by a wide margin.

Nothing in this article is financial advice. All content is for informational and educational purposes only. Make sure you read the risk paragraph in this article.

Data, Information, Knowledge, Wisdom

Quant investing is both art and science. It uses data, information, knowledge and wisdom (DIKW) models for investment decisions. The concept of DIKW describes the relationships between these four entities — Data, Information, Knowledge and Wisdom [2][3]. In my opinion, DIKW aligns beautifully with the four process steps in quant investing. All DIKW steps are equally important — if the data is of low quality, information is low signal, or if the correlations are spurious, then the trading rules are useless.

Data

Data consists of facts and observations, which are unorganized and unprocessed. In quant investing, we mainly use price data. Sometimes other data is available, like volume data, order book data (bid-ask) and sentiment data. With Bitcoin, we also have a unique and freely available database that contains all on-chain transactions: the Bitcoin blockchain. An important aspect is the source and quality of the data. Garbage in is garbage out. I know cases where investment funds failed because of data errors, so I like to have at least two sources for the same data.

Data cleaning is another topic. Data can contain errors or missing data. Smoothing is one technique that averages data points to get rid of data errors. Error correction and filtering techniques are intriguing areas of research.

Information

Information is processed and structured data. Examples of information are tables and charts.

Processing and transforming data into usable information for analysis is a real art, requiring

experience and creativity. If data processing is done correctly, the next step can be straightforward. The data processing step is so critical that it is sometimes called feature engineering. In quant investing, we create all kinds of indicators from raw data: Patterns, averages, indexes and indicators. Most indexes and indicators are well-known and freely available, but some are the "secret sauce" of quant funds.

Knowledge

Knowledge combines information with a goal. It's all about analyzing and modeling patterns between the information available and a target. The goal/target in quant investing is usually the price level, or the return of a financial asset. The three common analysis/modeling approaches in quant investing are:

1. Technical Analysis (TA), which looks for patterns in historical price charts. TA uses many patterns and indicators that mark momentum, trends and reversals. Examples of TA patterns are flags, triangles, rectangles, wedges, cup and handle, and head and shoulders. Examples of TA indicators are moving averages, relative strength index (RSI), Bollinger Bands® and Ichimoku Clouds. Some investors call TA "astrology for men," but most traders use TA in their daily work. A good read on TA is Curtis Faith's Way of the Turtle. [4]

2. Statistics goes beyond just looking for patterns. Statistics applies mathematical techniques to distinguish between random, spurious patterns or nonrandom, statistically significant correlations. Examples of statistical tools used in quant investing are correlation, regression, principal component and cluster analysis. Statistics is not about certainty, but about uncertainty and probability. Statistics on economic and investment data is called econometrics. Many quant investors have studied econometrics. A great intro to econometrics is Marno Verbeek's A Guide to Modern Econometrics. [5]

3. Artificial Intelligence (AI) is the statistical analysis of big data sets with fast, dedicated computers. AI uses tools like neural nets, genetic algorithms and machine learning. A good book on AI is Vinod Chandra and Anand Hareendran's Artificial Intelligence and Machine Learning. [6] Although AI is great at finding patterns in big data sets, it also amplifies a well-known statistical problem: overfitting. Overfitting occurs when an algorithm memorizes a data set (including the noise) instead of generalizing the underlying signal. Overfitting gives good model performance when making a model, but poor model performance on new out-of sample data. Preventing overfitting is an art in TA, statistics and AI. My preferred solution is to keep the model as simple as possible (few variables, few parameters) and to fit multiple data sets simultaneously (this does require a specialized fitting tool).

overfitting_2_11zon.webp

All models (TA, statistical and AI) are simplifications of reality. So all models are wrong, because they are not exactly the same as reality. Models try to generalize, instead of memorizing reality. Generalization tries to cut through the noise and capture the underlying signal. There is always some variable that's different or missing. Models try to capture similarities and structures. Take this simple beach visitor model that predicts the number of beach visitors (y-axis) based on temperature (x-axis):

beach_1_11zon.webp

The model shows a positive relationship between temperature and visitors: the higher the temperature, the more visitors. The model is not flawless, it is not always correct and there is uncertainty. Of course, this model doesn't include all relevant variables, such as rain, weekends, holidays, etc. For example, the rain could have caused the 87°F/130 visitors outlier, and a holiday weekend could have caused the 89°F/525 visitors outlier. However, this simple model could be sufficient for beach bar staff planning.

Wisdom

Wisdom is knowledge applied in action. Using an example of a beach bar owner, we could use the beach visitors model for a staff planning decision rule: If the temperature is below 88°F, then one person in the bar; otherwise, two persons in the bar. In quant investing, the decision rule is usually a trading rule (buy and sell) based on a correlation captured by a TA, statistical or AI model.

A crucial step in making quant investing rules is backtesting, which means evaluating how a trading rule performs over some historical period in terms of risk and return. The holy grail of quant investing is high return with low risk. Most quant investors use risk-adjusted return as a performance criterion.The Sharpe ratio (return divided by the standard deviation of returns), Sortino ratio (return divided by the standard deviation of negative returns) and Calmar ratio (return divided by drawdown) are examples of risk-adjusted return performance criteria.

Quant Investing Example

Enough theory. Let's create and implement a real-life quant investing trading rule!

This trading rule will be simple, based only on monthly Bitcoin (BTC) data and the relative strength index (RSI). The goal is to outperform buy-and-hold BTC.

BTC buy and hold: If you bought 1 BTC in April 2011 for $3.50 and HODLed until June 2022, you would have 1 BTC worth $19,995. That's a 117% annualized return. However, you would have to stomach big risks, like −82% drawdown (max cumulative loss) in 2014.

Data

Our BTC price data source is TradingView. They provide free data and charts [7].

We use Jan. 2011 – June 2022 BTC monthly closing data.

Information

From the BTC monthly closing data, we calculate RSI (14 months). RSI is a well-known TA

momentum indicator, calculated as an index with a 0–100 scale [8]. It can be used to recognize overbought and oversold conditions.

Traditionally, RSI above 70 indicates an overbought situation, while RSI below 30 indicates an oversold condition.

Note that BTC's range is different, because the BTC RSI can go as high as 90–100 and has never been lower than 40.

rsi_3_11zon.webp

You can see 2011–2022 RSI going from below 50 to over 90, and back below 50 again.

Knowledge

rsibtc_4_11zon.webp

So how does RSI correlate with our target BTC?

We can see that 2011, 2013, 2017 and 2021 BTC tops correlate with high RSI. Similarly, 2011, 2015, 2018/19 and 2022 BTC bottoms correlate with low RSI. Bull markets seem to run out of steam when RSI > 90. Bear markets seem to fizzle out when RSI

This pattern can be used for a trading rule that avoids bear markets and outperforms buy-and-hold BTC.

Wisdom

Optimization over multiple periods on the Calmar ratio results in the following trading rule:

  • If (RSI was above 90% the last six months and drops below 65%), then sell

  • If (RSI was below 50% the last six months and jumps +2% from the low), then buy, otherwise hold.

This strategy would have turned our $3.50 start capital in April 2011 into $229K (or 11 BTC) in June 2022, with 11x buy-and-hold outperformance, 170% annualized return and less risk (−58% drawdown).

rsibtcrule_5_11zon.webp

Since the trading rule can avoid bear markets, we could add a little leverage. This can be done with futures, and with in-the-money (ITM) Call Options. ITM Call Options have a strike (X) below the Spot price (S). The benefit of Options is that no stop-loss is needed, and positions cannot be liquidated. The downside is that leverage is low. We use 4x leverage and limit the maximum position size to 33%.

rsibtcrulelev_6_11zon.webp

This strategy would have turned our $3.50 start capital in April 2011 into $5M (or 250 BTC) in June 2022, with 250x buy-and-hold outperformance, 256% annualized return and less risk (−58% drawdown).

In this example, I use 4x leverage (which we can implement with futures or options) and a position size of only 33% (which means 67% is in cash with little risk). So, if there's a negative BTC month, or even if the position is liquidated, our maximum loss would still be −33% per month. It's exciting that this trading rule gives us a BUY signal based on the July 2022 BTC closing price — because RSI was below 50% the last six months, and now jumped +2% above the low in July!.

Conclusion

The hypothesis in this article is as follows: Is it possible to create and implement a simple working quant investing trading rule that outperforms a Bitcoin buy-and-hold investment? Following a four-step DIKW (data, information, knowledge, wisdom) process, we are indeed able to construct a simple trading rule based on RSI that outperforms buy-and-hold BTC 11x (no leverage) and 250x (4x leverage, 33% position size) with lower risk (measured as max drawdown) than by using buy-and-hold.

It's also exciting that this trading rule has given us a BUY signal based on the BTC July 2022 closing price!

No investment is without risk. Make sure you read the paragraph below on risks, disclosures and disclaimers.

Do It Yourself

Since I believe in learning by doing, it would be great if some of you would replicate my analysis to check to see that I haven't made any errors. Also, I will implement the trading rule with real money and report on the out-of sample performance. If you'd like, you can copy my trades and do it yourself (DIY) with the trading rule above. Education is the purpose of this article. Everything is open-source, so everyone can benefit. 

Click below to sign up for a Bybit Account and get started on Copy Trading!

Sign Up Now

Risks, Disclosures and Disclaimers

No investment is without risk:

• Data: The data could contain errors.

• Information: The calculation of the RSI ratio could be wrong.

• Knowledge: The correlation between RSI and BTC could be spurious.

• Wisdom: There could be overfitting of the trading rule, the backtest could be wrong, there could be black swans, and the future could be completely different than the past.

• Trading: There is credit risk on exchanges and operational risk in trading.

• Do not invest or trade more than you are willing and able to lose.

• I do not promise or guarantee anything.

Disclosures and disclaimers:

• My BTC portfolio is 90% buy-and-hold, and only 10% trading (this article is about that 10%).

• I partner with the Bybit exchange.

• Nothing in this article is financial advice.

• All content is for informational and educational purposes only.

• Past performance is no guarantee of future results.

References

[1] T.S. Eliot, Choruses from The Rock (1934).

[2] Kenneth Boulding (1955). "Notes on the Information Concept." Exploration (Toronto) 6: pp. 103–112.

[3] Nicholas L. Henry (1974). "Knowledge Management: A New Concern for Public Administration." Public Administration Review: PAR(Hoboken, NJ): Wiley, ISSN 0033-3352, ZDB-ID 209502-6. Vol. 34. 1974, 3, pp. 189–196. 

[4] Curtis Faith, Way of the Turtle, McGraw-Hill (2007).

[5] M. Verbeek, A Guide to Modern Econometrics, Wiley Custom (2004).

[6] V. Chandra & A. Hareendran, Artificial Intelligence and Machine Learning, PHI Learning (2014).

[7] https://www.tradingview.com

[8] J. Welles Wilder Jr., New Concepts in Technical Trading Systems, Trend Research (1978).

Source: Bybit Blog


Unsubscribe to no longer receive posts from Crypto Breaking News.
Change your email settings at manage subscriptions.

Trouble clicking? Copy and paste this URL into your browser:
https://cryptobreaking.com/quant-investing-101/

Powered by Jetpack
Download on the App Store Get it on Google Play
at August 15, 2022
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

CG BOSS Posts from Gargoyles Reboot thanks to creator kept it alive | CG BOSS Games for 04/26/2026

CG BOSS Blog Post Updates ...

  • [New post] 5 Key Technologies Streamlining the Crypto User Experience
    ...
  • CG BOSS Posts from Gargoyles Reboot thanks to creator kept it alive | CG BOSS Games for 04/26/2026
    CG BOSS Blog Post Updates ...
  • Why is Ninoy Aquino Day important to you? Join Rappler’s chat on August 21!
    Hi daily! Who is Ninoy Aquino to you? What lessons from his life still spea...

Search This Blog

  • Home

About Me

Daily Newsletters PH
View my complete profile

Report Abuse

Labels

  • Last Minute Online News

Blog Archive

  • April 2026 (1)
  • February 2026 (1)
  • January 2026 (7)
  • December 2025 (8)
  • November 2025 (4)
  • October 2025 (2)
  • September 2025 (1)
  • August 2025 (2)
  • July 2025 (5)
  • June 2025 (3)
  • May 2025 (2)
  • April 2025 (2)
  • February 2025 (2)
  • December 2024 (1)
  • October 2024 (2)
  • September 2024 (1459)
  • August 2024 (1360)
  • July 2024 (1614)
  • June 2024 (1394)
  • May 2024 (1376)
  • April 2024 (1440)
  • March 2024 (1688)
  • February 2024 (2833)
  • January 2024 (3130)
  • December 2023 (3057)
  • November 2023 (2826)
  • October 2023 (2228)
  • September 2023 (2118)
  • August 2023 (2611)
  • July 2023 (2736)
  • June 2023 (2844)
  • May 2023 (2749)
  • April 2023 (2407)
  • March 2023 (2810)
  • February 2023 (2508)
  • January 2023 (3052)
  • December 2022 (2844)
  • November 2022 (2673)
  • October 2022 (2196)
  • September 2022 (1973)
  • August 2022 (2306)
  • July 2022 (2294)
  • June 2022 (2363)
  • May 2022 (2299)
  • April 2022 (2233)
  • March 2022 (1993)
  • February 2022 (1358)
  • January 2022 (1323)
  • December 2021 (2064)
  • November 2021 (3141)
  • October 2021 (3240)
  • September 2021 (3135)
  • August 2021 (1782)
  • May 2021 (136)
  • April 2021 (294)
Simple theme. Powered by Blogger.