{"product_id":"stcov321deof","title":"Stocks \u0026 Commodities V. 32:2 (10-15): Degree Of Complexity by Oscar G. Cagigas","description":"Degree Of Complexity by Oscar G. Cagigas\u003cbr\u003e\u003cbr\u003eGoodness, It Doesnt Fit\u003cbr\u003e\u003cbr\u003eWhen designing trading systems, its easy to keep adding\nparameters or filters. But does the system perform better\nwhen its more complex? Heres how you can keep your\nsystem efficient and only add more when its necessary.\u003cbr\u003e\u003cbr\u003eAlthough complex trading systems deliver good insample\nstatistics, they inevitably fail when it comes\nto out-of-sample or real-time trading. In this article, I\nwill present a simple theoretical model to show how important it is to keep complexity low when designing trading\nsystems. As an example, I will show you a Donchian-based\ntrading system that generates favorable in-sample statistics\nwhen its complexity is increased but deteriorates in the outof-\nsample tests as the complexity gradually increases.\nTheoretical model\nI am going to use a simple model that simulates an uptrend\nwith some volatility. The model is as follows:\u003cbr\u003e\u003cbr\u003ePrice = C1*N + C2*sin(N) (1)\u003cbr\u003e\u003cbr\u003ewhere:\u003cbr\u003e\u003cbr\u003eN is the number of bars (the time variable)\nsin is the sine wave function\nC1 and C2 are coefficients that affect the slope\nof the rising price curve.\u003cbr\u003e\u003cbr\u003eBasically, equation (1) is the sum of a\nstraight line plus a sinusoidal wave. I have\nassigned the values of 10 and 40 to C1 and C2,\nrespectively. In Figure 1 you can see a graphical\nrepresentation of the price model.\u003cbr\u003e\u003cbr\u003eAfter the price model is defined, I perform\na polynomial interpolation of the model\nwith the degree rising to three (from one).\nPolynomial interpolation finds a polynomial\ncurve of the price variable that goes through\nthe data points. The higher the degree of the\npolynomial, the more accurate.\u003cbr\u003e\u003cbr\u003eThe idea is to estimate the future behavior\nof the price model using a fit with increasing\ncomplexity. In Figure 2 you see the first,\nsecond, and third degrees of polynomial\ninterpolations of the price model. As you can\nsee, the three approaches look similar.\u003cbr\u003e\u003cbr\u003eThe goodness of fit R2 can be seen in the\ntable in Figure 3. According to this table, the\nmore complex polynomial, the third degree,\nhas the best fit for the in-sample tests. It has\nthe highest R2 value of 0.799.","brand":"store-traders-com","offers":[{"title":"Default Title","offer_id":52134086443377,"sku":"V32C02_708CAGI","price":3.95,"currency_code":"USD","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0900\/3843\/6209\/files\/unnamed_f066f5a7-e38a-47c8-979e-72dcc4d2154c.jpg?v=1739665512","url":"https:\/\/shop.traders.com\/products\/stcov321deof","provider":"Stocks \u0026 Commodities","version":"1.0","type":"link"}