当前位置:网站首页>How to choose stocks? Which indicator strategy is reliable? Quantitative analysis and comparison of strategic returns of vrsi, bbiboll, WR, bias and RSI indicators
How to choose stocks? Which indicator strategy is reliable? Quantitative analysis and comparison of strategic returns of vrsi, bbiboll, WR, bias and RSI indicators
2022-06-13 00:55:00 【Your name is Yu yuezheng】
Preface
From the stock market to the present , Many indicators have been developed , But when you use it, you will find , Due to the unknown fluctuation of the share price the next day , The indicators are not always accurate , There will always be miscalculations . For this inevitable situation , We can only try to quantify it 、 Calculate the yield after operation according to the strategy 、 Estimate the probability of misjudgment, etc
This article first selects VRSI、BBIBOLL、WR、BIAS、RSI Five indicators to quantify ( A total of More than 30 indicators , Due to the space problem, five kinds of ), Then use ten stocks to test the effectiveness of these five strategies ( The actual situation is that 3600+ Stock to calculate the effect of strategy , It is not convenient to display the results at present )
disclaimer
Nothing in this vision and analysis should be interpreted as investment advice , Past performance does not necessarily indicate future results .
Quantitative analysis of index strategy
Data preparation
I chose 600519 Guizhou Moutai 、600031 Sany heavy industry 、002594 BYD 、601633 Great Wall motor 、002074 GuoXuan high tech 、300750 Ningde era 、300014 Yiwei lithium energy 、000591 The solar energy 、002475 State - precision 、600862 China Aviation hi tech These ten stocks 2020 year 1 month 1 Japan ~ 2021 year 1 month 15 Japan To test
Part of the code fragment
import pandas_datareader.data as web
import datetime
start = datetime.datetime(2020, 1, 1)
end = datetime.datetime(2021, 1, 15)
df = web.DataReader(ticker, "yahoo", start, end)
Index Introduction
VRSI indicators
sma It is the calculation function of smooth moving index
def vrsi(df, n=6):
_vrsi = pd.DataFrame()
_vrsi['date'] = df['date']
px = df['volume'] - df['volume'].shift(1)
px[px < 0] = 0
_vrsi['vrsi'] = sma(px, n) / sma((df['volume'] - df['volume'].shift(1)).abs(), n) * 100
return _vrsi
BBIBOLL indicators
_ma Is a function of the moving average ,_md Is a function of the standard deviation
def bbiboll(df, n=10, k=3):
# pd.set_option('display.max_rows', 1000)
_bbiboll = pd.DataFrame()
_bbiboll['date'] = df.date
_bbiboll['bbi'] = (_ma(df.close, 3) + _ma(df.close, 6) + _ma(df.close, 12) + _ma(df.close, 24)) / 4
_bbiboll['boll_md'] = _md(_bbiboll.bbi, n)
_bbiboll['upr'] = _bbiboll.bbi + k * _bbiboll.boll_md
_bbiboll['dwn'] = _bbiboll.bbi - k * _bbiboll.boll_md
return _bbiboll
WR indicators
_ema Is a function of the exponential moving average
def wr(df, n=14):
_wr = pd.DataFrame()
_wr['date'] = df['date']
higest = df.high.rolling(n).max()
_wr['wr'] = (higest - df.close) / (higest - df.low.rolling(n).min()) * 100
return _wr
BIAS indicators
sma It is the calculation function of smooth moving index
def bias(df, n=12):
_bias = pd.DataFrame()
_bias['date'] = df.date
_mav = df.close.rolling(n).mean()
_bias['bias'] = (np.true_divide((df.close - _mav), _mav)) * 100
return _bias
RSI indicators
_md Is a function of the standard deviation
def rsi(df, n=6):
_rsi = pd.DataFrame()
_rsi['date'] = df['date']
px = df.close - df.close.shift()
px[px < 0] = 0
_rsi['rsi'] = sma(px, n) / sma((df['close'] - df['close'].shift()).abs(), n) * 100
return _rsi
The final quantitative results
Due to the inconvenience of space and display , Do not show the visual buying and selling points and the fund change curve in the article
In order to understand the effect of the strategy most succinctly , The initial capital is set to 10000 element , And for the sake of simplicity, we don't consider the restriction that we must buy the whole hand , Every time 10000 Yuan to buy all , Test the effect of five index strategies at the same time 2020.1.1 Buy and hold until 2021.1.15 The strategy of , Compare the final funds to measure the effectiveness of the strategy
HOLD Line is a representation 2020.1.1 Buy and hold until 2021.1.15 The final fund of the strategy

Data visualization is not shown here , After having data, you can draw and tabulate according to your habits ; More evaluation data are not shown
In the chart we notice
600031 This stock uses WR indicators The return of strategy is higher than that of holding strategy
also WR indicators The strategy is 601633 This one also has a better performance than the one who has always held the strategy
000591 This stock uses BIAS indicators The return of strategy is higher than that of holding strategy
Although in most cases, the effect of operating according to indicators is not as good as that of long-term holding strategy , But when the strategy does not hold shares, as a trader, of course, he will look for new opportunities , Generate revenue !
边栏推荐
- MySQL异常:com.mysql.jdbc.PacketTooBigException: Packet for query is too large(4223215 > 4194304)
- [JS component library] drag sorting component
- What is pytorch? Explain the basic concepts of pytorch
- 人神共愤,唐山“群殴女性事件”细节...
- [JS component] floating text
- 阿姨学代码续集:能力吊打大批程序员
- Expression tree - medium order printout
- OceanBase 雄踞墨天轮2021年度中国数据库魔力象限领导者
- kotlin 协程withContext切换线程
- Kotlin coroutine suspend function suspend keyword
猜你喜欢

What is the difference between pytorch and tensorflow?
![[JS component] browse progress bar](/img/cb/913f446db2cacdb965a3bf619aa478.jpg)
[JS component] browse progress bar

Composite key relationships using Sqlalchemy - relationships on composite keys using Sqlalchemy
![[JS component library] drag sorting component](/img/f9/4090b52da1a5784b834cb7dbbb948c.jpg)
[JS component library] drag sorting component

Assembly language learning
![[JS component] dazzle radio box and multi box](/img/2a/00620bee312972db93e1db4313385f.jpg)
[JS component] dazzle radio box and multi box

Today's sleep quality record 74 points

pytorch是什么?解释pytorch的基本概念

什么是 Meebits?一个简短的解释

Mysql批量插入数据时如何解决重复问题?
随机推荐
Stack overflow learning summary
三角波与三角波卷积
Illustrator tutorial, how to add dashes and arrows in illustrator?
Set sail
Androi天氣
Dynamic planning - good article link
Et5.0 configuring Excel
今日在家休息
深度学习训练多少轮?迭代多少次?
(01). Net Maui actual construction project
How to determine whether T is a value type in a generic type or a reference class- How to determine whether T is a value type or reference class in generic?
Aunt learning code sequel: ability to sling a large number of programmers
[JS component] customize the right-click menu
[JS] battle chess
Kotlin 协程挂起函数 suspend 关键字
Download nail live playback through packet capturing
Introduction to ROS from introduction to mastery (zero) tutorial
People and gods are angry. Details of Tangshan "mass beating of women incident"
Binary tree -- using hierarchical sequence and middle sequence to determine a tree
[JS component library] drag sorting component