Quantification: market timing recurrence based on RSRS

resource

"Resistance and Support Relative Strength RSRS Research Report"
link: https://pan.baidu.com/s/1EhtoC25WSO7WpNiyZpcKYA
extraction code: 2023Hewu
~~~ I wish you smooth and happy investment!

Research Presentation Series (5) Market Timing Based on Relative Strength of Resistance and Support (RSRS)

Interpretation of research reports

concept

The traditional strategy regards the resistance and support levels as the threshold of the price range, which is a fixed value. However, this strategy has a lag when waiting for a breakthrough and performs poorly in a volatile market.

This research report considers the relative strength between resistance and support levels and treats it as a variable. Resistance and support levels reflect traders’ expected judgments about the top and bottom of the current market state, and strength represents this certainty of judgment. For example: In a falling bear market, if the support strength is significantly greater than the resistance strength, the bear market is about to end and the price has bottomed out.

Q&A

  • How to quantitatively define support and resistance levels?
    The daily high and low prices reflect the resistance and support recognized by the trading behavior of all market participants on that day. Use relative position changes (similar to delta-high / delta-low) to describe relative strength.

  • How can their relative strengths be defined and quantified?
    Establish linear regression as follows:
    Insert image description here
    beta is the required slope. When the beta value is large, it means that the support strength is significantly greater than the resistance strength.

RSRS indicator construction

Insert image description here
Insert image description hereThe source code uses the standard score as the RSRS indicator.

The standard score, also called the z-score, is a quantity with equal units. It is the quotient of the difference between the raw score and the group mean divided by the standard deviation. It is a measure of how many standard deviations the raw score is above or below the mean, in units of standard deviation. How many standard deviations.

Trading straregy

Insert image description here

Source code

Source code

ETF momentum rotation strategy based on RSRS standard score.
Description: It is generally divided into two modules: stock selection and timing. The stock selection module obtains the closing price of each target in the past month from Jukuan and performs first-order polynomial fitting, using annualized returns and R-squared comprehensive scores and rankings. The timing module uses 600 trading days as the observation period to calculate the RSRS slope of the previous 600 days and the RSRS slope of the current day. The calculation method is to obtain the high and low price data of the previous 18 days and perform first-order polynomial fitting to obtain the slope, and then calculate the current day's RSRS slope. The Z standard score of the RSRS slope. If it is greater than the threshold, then buy, if it is less than the opposite number of the threshold, then sell. After backtesting, the daily increase is calculated based on the closing price, and the daily rate of return of the strategy is obtained based on the daily increase and position status. After multiplication, the net value of the strategy is obtained and displayed using matplotlib. The results of the original research report are basically reproduced, from 2005 to 2017. Year, the cumulative net worth is around 13.37.

Guess you like

Origin blog.csdn.net/weixin_43249758/article/details/132678269