Back-testing trade data

G

Guest

Hi all,

I've had no luck with a formula to calculate profit and loss based on a
strategy in the market all the time either long or short.

Column A is market position: 1 or -1
Column B is the entry price:
Column C is the profit (difference between sell and buy price or buy and
sell price:

For instance:

Market position, price:
-1, 98 12/32
1, 99 14/32
-1, 99 3/32
1, 99 2/32
-1, 97 16/32
1, 99 1/32

Therefore:
(98 12/32 -(99 14/32) + ( 99 3/32 - 99 14/32) + (99 3/32 - 99 2/32) + (97
16/32 - 99 2/32) =

Thanks,

Scott
 
M

Myrna Larson

Can you explain the logic of the formula you show at the bottom? If you label
the data points A through F, your formula is

A-B + C-B + C-D + E-D

You could also write this as: A-B - (B-C) + (C-D) - (D-E)

Why no segment that deals with E and F?

What determines whether you add or subtract the difference between 2
consecutive entries?

Which entries are buys and which are sells? Is this in fact paired data, so
that A is a buy and B the corresponding sell (or vice-versa)?

If you used just one column with a negative sign meaning a buy and positive
meaning a sell, you could just sum the column, no?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top