excel functions: profit/loss calculations

T

timber

hi, i have been looking for solution for this task quite a while and n
one has it, and if no one can help here maybe i'll move to 'commercia
exchange...' forum site. i hope i can find my solution here. THANKS.

just write below text/numbers in your worksheet. no formulas involved:

A1 is PRICE, A2:A15 are 10,9,7,8,11,10,12,11,13,12,15,16,14,15,
A16 is TOTAL
B1 is B SIG, B2 is 2, B5 is 1, B8 is 3, B16 is 6B,
C1 is S SIG, C6 is 1, C11 is 3, C16 is 6S,
D1 is P/L, D6 is 1, D11 is 2+4+0=6, D15 is 3+3=6, D16 is 13
E1 is BAL. SIG, E2 is 2B, E5 is 3B, E6 is 2B, E8 is 5B, E11 is 2B, E1
is -,
F1 is BAL. PRICE, F2 is 10,10
F5 is 10, 10, 8
F6 is 10, 8
F8 is 10,8,12,12,12
F11 is 12,12
F15 is -

A1:C16 is given data. D1:D16 is what i want. E1:F16 are my manua
description about P/L calculation.

description:
BAL. SIG means how many buy or sell have done
BAL. PRICE means the prices of the BAL. SIG for you to see an
understand the calculation
At E5: since previous done 2B & not been offset, now buy again so ad
up 2B+1B=3B
At D6, 1S now is offset by 1B done before. 11-10=1. NOTE: ALWAYS tak
first in first out basis. First buy is at 10, so 10 out first.
At F5, 10,10,8 represents previous 2B and 8 represents 1B done now.

the following D6:F16 follow the same principle as at above E5,D6,F5
the principle is 1B is offset with 1S or vice versa (xB is offset wit
xS or vice versa). buy or sell that are not offset are stored to b
offset by later opposite signal. offset price follow first in first ou
basis. SELL can be more than buy as often as buy more than sell. extr
sell to be offset by buy later. at some times buy are more than sel
and at some times vice versa. at the end of the day, both buy and sel
volume are equal. try reverse the volume of S SIG with B SIG. th
answer should be -1,-6,-6 at F6,F11,F15; reverse result and total i
-13.

in future market, we can sell first before buy and vice versa. when
sell more than bought, the sell volume and sell price are to be offse
by the next same buy volume at the buy prices that time. xbuy offse
with xsell or vice versa. whatever more now will offset by next sam
volume of opposite signal (buy/sell). whatever more first will b
offset first in price selection (FIFO). therefore, when the signa
changed, loss -13 incurred. (p/l statement ends with equal buy and sel
signal. there are 6 buy and 6 sell and therefore 6 turnroun
(1+2+4+0+3+3=13) because six offsets and can result in profit or los
depending on signal and price.)

can someone help? thanks

i have no idea the formulas to this calculation. thank you
 

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