finding the minimum of an equation | Traders Hideout


futures.io - futures trading strategies, market news, trading charts and platforms


Traders Hideout


Discuss day trading practices and futures trading strategies on this forum for all markets. This forum is also for discussing and reviews for brokers, data feeds, and commercial or third party add-ons




 

finding the minimum of an equation

  #10 (permalink)

Budapest, Hungary
 
Trading Experience: None
Platform: ninjatrader
Favorite Futures: FGBL / FESX / ES / ZN / ZB
 
adamov's Avatar
 
Posts: 84 since Jun 2012
Thanks: 37 given, 49 received



Fat Tails View Post
This is a funny little puzzle!

If I look at your function it is built from six components, each component being the absolute amount of a linear function. Now let us look at a component function, for example

y1 = |-22-16x|

This function has two linear legs, a descending leg on the left side and and a rising leg on the right side. For x = -1.375 it takes the value zero.

The same is true for the other five component functions. Each of them is built from two legs and has a low point, where it takes the value 0. I conclude that the function y that you have exposed, has six points where it is not differentiable. Newton-Raphson cannot be used.

However, your function has another property, which makes a solution easy. With the exception of the low points of the six component functions your function can be built by adding six linear functions. Therefore it is linear itself between two low points. As a consequence one of the low points of the component function is the minimum for which you are looking.

Therefore you just need to calculate x1, x2, x3, x4, x5, x6 representing the low points of the component functions and then find out for which of those the function

y = |-22-16x|+|44-22x|+|21-25x|+|40-22x|+|6-11x|+|12-4x|

takes the lowest value.

Awsome!!
Thinking out of the box.

I had some similar reasoning in my head. I was sure the it has to be somewhere between the biggest and smallest root of the components like you explained.
I was experimenting to calculate the minimum point from all the roots somehow, but I wouldn't thought its gonna be one of them.

Flawless logic!
Thanks you and everybody who contributed!

Reply With Quote
The following user says Thank You to adamov for this post: