Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Optimizing trades on a hypothetical, theoretical, continuous stock market via mathematical, analytical procedure

1 view
Skip to first unread message

Jan Bours

unread,
Mar 19, 2012, 10:02:21 PM3/19/12
to
I am trying to model transactions on a stock market in a theoretical way.
That is to say, regard the quotes of underlying value as continuous function
K of time (K = K(t)),
on a closed time interval of, say [0,T].

What I would like to develop is a way (an algorithm, a (set of) equations)
to calculate a set of optimal times (in this case with hindsight of course)
at which specific transactions (buys and sells of a hypothetical stock
with the same value as the function K(t) at those times)
should have been done, so that the resulting net gross return
of all those transactions together is optimal.

I would like the function K(t) to be as general as possible,
but I assume continuity and differentiablity are also nice in this context.

Later on I hope to be able to generalize or transform the result to a
discrete variant.

For instance, as a thought experiment, imagine that K(t) = 200 + 100 * sin
(2*PI*t/100)
on the interval for t [0,100].

A few points of K(t) would thus be:

K( 0) = 200
K( 25) = 300
K( 50) = 200
K( 75) = 100
K(100) = 200

etc. etc.

Long and short positions are allowed,
so you can start with an open buy (long position) OR an open sell (short
position).

In this case good transactions (in fact: the best transactions) would have
been:

t K(t) transaction Cumulative net return (no costs !)
------ ------ ------------ ----------------------------------
0

0 K( 0) = 200 Open Buy -200
25 K( 25) = 300 Close Sell 100

25 K( 25) = 300 Open Sell 400
75 K( 75) = 100 Close Buy 300

75 K( 75) = 100 Open Buy 200
100 K(100) = 200 Close Sell 400
====

So 400 is the OPTIMAL net return.

What I am interested is the optimal transaction timing:
the sequence set of time {0,25,75, 100}.

In fact I am of course also interested in the actions that are associated
with the times times in this set.
On time t=0 and t=100 there is a single action (Open Buy and Close Sell
respectively),
but on times t=25 and t=75 there are 2 actions each:
on t=25 a Close Sell of the previous position and a Open Sell for the next
position, and
on t=75 a Close Buy of the previous position and a Open Buy for the next
position.

So that information I would like to be calculated to.

But now here is my question:
how can I come up with an analytical procedure (not by numerical
approximation,
although that would be nice for a next, more practical step).

I already have thought about this and I have 2 (or 3) mathematical tools in
mind
with which I hope to tackle this problem.

So the input would be K(t), and the interval for t (let say [0,T] );
the output would be a set of optimal transaction times, a set of actions at
these times
and of course the optimal net profit / return associated with these 2 sets.
And I regard this problem as a continuous one, not discrete !
The solution has to be analytical (and in closed form ?).

The proof of the concept would be, that it would calculate exactly the same
output
as given in my thougt experiment example described above.

I will not unveil the 3 mathematical tools I have in mind yet,
in order to not influence anyone who would like to share his thoughts with
me cq this newsgroup!

Thank you for your inputs in advance !

Jan Bours

Jasen Betts

unread,
Mar 22, 2012, 9:09:46 AM3/22/12
to
On 2012-03-20, Jan Bours <jboursne...@hotmail.com> wrote:

stock trading is simple.
buy at minima, sell at maxima.

without brokerage fees the short position wins.

if you allow selling short, sell also between the maxima and the next minima.

--
⚂⚃ 100% natural
0 new messages