In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to achieve the quantitative typing rate trading strategy on the Internet. I hope you will gain something after reading this article. Let's discuss it together.
The Origin of quantitative Classification rate Trading Strategy
The inspiration of quantitative typing rate system mainly comes from physics.
In physics, speed is defined as the distance moved per unit of time.
If the price is regarded as the distance, then in the financial market, the definition of speed-the large price change per unit time * r / > if the price changes greatly in the unit time, this kind of market is usually called the fast quotation; if the price changes little in the unit time, it is called the slow quotation. Therefore, speed is a natural law that combines time and price, and an in-depth understanding of speed can help us to understand the market to a greater extent.
If the rate rises, it means that the energy is increasing, which can effectively predict the upward trend of the market.
If the rate drops, it represents energy exhaustion, and the risk of a flat or falling market can be sensed.
Each transaction uses a certain number of hands to complete the transaction, so it is called the quantitative classification rate trading system.
Knowledge to be prepared
Highest price (HHV): the highest price reached in a given period.
Lowest price (LLV): the lowest price reached in a particular period.
Moving average (MA): the connection of the average closing price for a particular period.
Regression slope (SLOPE): the slope of linear regression for a specific period. (that is, what we call the speed)
The linear equation OLS slope formula is as follows:
The mathematical formula is very complicated, but we have already written the Mai language grammar formula (SLOPE) for us on the FMZ platform.
If we look at the grammar manual of McLaren, we can see that the algorithm is as follows:
The process is a little complicated, but we don't have to think about it at all. Just call the formula directly.
Indicator design:
1. First calculate the highest and lowest prices in a certain period of time.
two。 Take the average of these two prices
3. Calculate a moving average for the average
4. Find the regression slope of the moving average
Through the design of the index, we run the back test and we can see that in the main diagram, we get the highest point of 35 cycles (yellow line),
The lowest point (green line), their average (red line), and the smooth price average calculated for the red line (thick purple line)
Then we can calculate the regression slope ss in the attached figure, which represents the rising and falling rate of the moving average.
Transaction strategy design:
As can be seen from the above picture, the green arrows represent the inflection points at the lowest slope, and the orange arrows indicate the inflection points at the high slope.
As reflected in the k-line, you can also feel the weakening position of the rise and the decline.
If you buy and sell at the inflection point, you can effectively operate the market in advance, rather than chasing the rise or fall at the high or low.
The design idea is:
The rising slope means that the momentum of the market increases, which may stop falling or rising.
The falling slope means that the momentum of the market is weak and may stop rising or falling.
The design expressions in Mac language are as follows:
Back test and summary
In this way, we have completed the design of the algorithm, and then we use the system to test the situation for a year.
The subject matter is okex quarterly contract btc
The return test period is from January 1, 2019 to the present, with a time period of 1 hour.
There are 3 btc in the initial account, and the handling fee is $10,000.
Set the number of orders per transaction to be fixed at 200.
Through the back test, we can see that this benefit is relatively smooth and steady.
In this return test, there were 1261 transactions in the whole year.
Estimated income of 4.68 yuan
Annualized income of about 140%
Maximum withdrawal of 14%
The Sharp ratio is 0.117.
Source code sharing: (* backteststart: 2019-01-01 00:00:00end: 2020-02-03 00:00:00period: 1hexchanges: [{"eid": "Futures_OKCoin", "currency": "BTC_USD"}] args: [["TradeAmount", 200pc126961], ["ContractType", "quarter", 126961]] *) the number of len:=35;// design cycles hh ^ HHV (Hlen); / / take the highest price within a certain period / / take the lowest price in a certain period, hh+ll ^ / 2 BPK;// / the average of the highest and lowest prices, avg ^ ^ MA (hl2,5); / / a pair of averages to calculate the smooth moving average ss:SLOPE (avg,len); / / a pair of averages to calculate the regression slope ssREF (ss,1), when the slope becomes larger, it means that the kinetic energy of the market continues to increase, there is an upward trend, flat long AUTOFILTER After reading this article, I believe you have a certain understanding of "how to achieve quantitative typing rate trading strategy on the Internet". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 248
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.