The resource loading... loading...

Ice and Fire: Live and retest

Author: Inventors quantify - small dreams, Created: 2016-09-18 10:49:10, Updated: 2019-08-01 09:50:55

During the inventor's quantitative learning, a lot of strange ideas were put into practice, and a lot of code was written. Some of the strategies were simply to retrieve a quick calculation of a thousand million horses, a real-time reversal of a millionaire!

  • Wrong calculation, this is probably the reason for the error when retesting results in significant profitability. For example, a negative number is omitted during the calculation, profitability algorithm has a problem, percentage is forgotten except when calling the revenue API parameter, etc. etc. often gives a bullish result. The most reliable approach is to compare the initial account and the current account information, analyze the differences, analyze the changes, and calculate the profit and loss. As long as you understand the two states of the account, the calculation of the earnings is basically not wrong.

  • Future functions, this problem is easy to happen. What is troubling is the unknowing of the future functions. For example, a well-known analyst: The bull actively builds stocks at the end of the downside of the market, and the bull sells the bid at the end of the upside, here I just want to say one sentence: the importance of forecasting the future! To avoid it, you need to be careful, as the boss says: everything in the strategic review that is related to predicting the future may have introduced a factor for the future function. Avoid the existence of such factors.

  • Survivor anomaly. This is the king of the future function in the family of consonants, taken separately. The following is from Wikipedia: Survivorship bias, also translated as "survivor bias"[1] or "survivor bias"; in common parlance, a dying person does not speak to explain their cause. This means that when information is obtained through a pipeline, only from a survivor (because there is no source from the deceased), this information may be biased against the reality. Common in financial finance articles. This is often the case in investment finance programs or articles, for example, when an investment finance television program only invites successful investors to talk about their experiences of successful investing, the viewers will see the way the successful investor invests as a high-success investment method, but the viewers will not see investors in the same or similar investment method, but ultimately fail, and therefore overestimate the chances of success of this investment method. Comrades who are testing long-term trading strategies using an index or a market sample, please be careful about the impact of changes in the index component stocks and the impact of stock delisting on the strategy!

  • The real trading environment is restricted. In the real trading environment, there are all sorts of problems that cannot be encountered in a feedback system, such as trading friction, slippage factors, shock costs, network errors, data errors, network latency, and so on!

  • Strategy cycles ─ strategies are cyclical, stand on the windpipe, pigs will fly ─ in the trend market, the strategy will lose, in the trend market, the strategy will lose ─ then I use technical means, distinguish the trend market and the trend market?

  • The right way to look at retrospective analysis. Many people focus on retrospective data analysis, which focuses on annualized returns and maximum retracement rates.

    • 1.交易次数,如果交易次数太少,那么这个回测数据可信度不高。
    • 2.最大连续盈利区间以及最盈利的一笔交易,重点分析它为什么盈利,分析策略的盈利的来源,并分析这样的行情是否可能再次来临。
    • 3.最大连续亏损区间以及亏损最严重的一笔交易,分析策略的亏损原因,并分析这样的行情是否可能再次发生,在什么情况下亏损会更糟糕。以及如何做好防范措施。
    • 4.回测的目的不是为了证明交易策略多么优秀,盈利率如何的高,而是为了发现尽可能多的缺陷,包括程序的BUG和交易逻辑的不合理之处。

    It is impossible to sanctify quantitative trading. Quantitative trading is essentially a programming of investment strategies, and quantitative trading systems are essentially a software tool. Philosophically, there is no trading holy grail. Any strategy has its pros and cons, like the two sides of a coin, opposite and united.


More