Trading task in classic mechanics

In physics, action is an attribute of system dynamics. By definition it is a functional over trajectory or history of the system:
where L is the Lagrangian. The real beauty of such description lies in developed and well studied mechanism of equation solutions.

Let’s link it with our trading problem of one security and define profit function in the same way as action:
where q is price (quote) and p is position, positive is long and negative is short. Therefore, the Lagrangian is:
As we can see it doesn’t depend on time and position itself, therefore, according to Noether’s theorem 2 conservation laws follow:
Ignoring the fact we obtain:
I.e. classic buy-and-hold strategy.

Control function

Let’s introduce control function which doesn’t depend on time elapsed:
In fact we state that position depends only on current price dynamics. Thus, the Lagrangian becomes:
The extremum of action is defined by Lagrange equations:
As the Lagrangian doesn’t depend on time the equation reduces to:

Time-independent solutions

If we assume that the control function doesn’t depend on time, then under this assumption energy is motion integral of the system:
where is a constant, starting energy. Let’s simplify and say that control function doesn’t depend on price derivative:
By definition of control function:
We obtain the following solution
In fact it is unsatisfactory solution as it is a continuous buying of the security, non-bounded at all.

In case if price change speed is taken into account, partial derivative equation becomes:
And it has generic solution:
where is an arbitrary function of q. And this solution is in complex plane in general, thus contradicting the initial setup.

Further ideas

It seems that continuous approach to the task is not productive. So, in next articles I’ll try to follow discrete formulation of the task.